diff options
Diffstat (limited to 'linden/indra/newview/llviewergesture.cpp')
-rw-r--r-- | linden/indra/newview/llviewergesture.cpp | 75 |
1 files changed, 1 insertions, 74 deletions
diff --git a/linden/indra/newview/llviewergesture.cpp b/linden/indra/newview/llviewergesture.cpp index fd98070..de8a098 100644 --- a/linden/indra/newview/llviewergesture.cpp +++ b/linden/indra/newview/llviewergesture.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 5 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -142,69 +143,6 @@ LLViewerGestureList::LLViewerGestureList() | |||
142 | mIsLoaded = FALSE; | 143 | mIsLoaded = FALSE; |
143 | } | 144 | } |
144 | 145 | ||
145 | void LLViewerGestureList::saveToServer() | ||
146 | { | ||
147 | U8 *buffer = new U8[getMaxSerialSize()]; | ||
148 | |||
149 | U8 *end = serialize(buffer); | ||
150 | |||
151 | if (end - buffer > getMaxSerialSize()) | ||
152 | { | ||
153 | llerrs << "Wrote off end of buffer, serial size computation is wrong" << llendl; | ||
154 | } | ||
155 | |||
156 | //U64 xfer_id = gXferManager->registerXfer(buffer, end - buffer); | ||
157 | // write to a file because mem<->mem xfer isn't implemented | ||
158 | LLUUID random_uuid; | ||
159 | char filename[LL_MAX_PATH]; /* Flawfinder: ignore */ | ||
160 | random_uuid.generate(); | ||
161 | random_uuid.toString(filename); | ||
162 | strcat(filename,".tmp"); /* Flawfinder: ignore */ | ||
163 | |||
164 | char filename_and_path[LL_MAX_PATH]; /* Flawfinder: ignore */ | ||
165 | snprintf(filename_and_path, LL_MAX_PATH, "%s%s%s", /* Flawfinder: ignore */ | ||
166 | gDirUtilp->getTempDir().c_str(), | ||
167 | gDirUtilp->getDirDelimiter().c_str(), | ||
168 | filename); | ||
169 | |||
170 | FILE* fp = LLFile::fopen(filename_and_path, "wb"); /* Flawfinder: ignore */ | ||
171 | |||
172 | if (fp) | ||
173 | { | ||
174 | fwrite(buffer, end - buffer, 1, fp); | ||
175 | fclose(fp); | ||
176 | |||
177 | gMessageSystem->newMessageFast(_PREHASH_GestureUpdate); | ||
178 | gMessageSystem->nextBlockFast(_PREHASH_AgentBlock); | ||
179 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
180 | gMessageSystem->addStringFast(_PREHASH_Filename, filename); | ||
181 | gMessageSystem->addBOOLFast(_PREHASH_ToViewer, FALSE); | ||
182 | gMessageSystem->sendReliable(gUserServer); | ||
183 | } | ||
184 | |||
185 | delete[] buffer; | ||
186 | } | ||
187 | |||
188 | /* | ||
189 | void LLViewerGestureList::requestFromServer() | ||
190 | { | ||
191 | gMessageSystem->newMessageFast(_PREHASH_GestureRequest); | ||
192 | gMessageSystem->nextBlockFast(_PREHASH_AgentBlock); | ||
193 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, agent_get_id()); | ||
194 | gMessageSystem->addU8("Reset", 0); | ||
195 | gMessageSystem->sendReliable(gUserServer); | ||
196 | } | ||
197 | |||
198 | void LLViewerGestureList::requestResetFromServer( BOOL is_male ) | ||
199 | { | ||
200 | gMessageSystem->newMessageFast(_PREHASH_GestureRequest); | ||
201 | gMessageSystem->nextBlockFast(_PREHASH_AgentBlock); | ||
202 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, agent_get_id()); | ||
203 | gMessageSystem->addU8("Reset", is_male ? 1 : 2); | ||
204 | gMessageSystem->sendReliable(gUserServer); | ||
205 | mIsLoaded = FALSE; | ||
206 | } | ||
207 | */ | ||
208 | 146 | ||
209 | // helper for deserialize that creates the right LLGesture subclass | 147 | // helper for deserialize that creates the right LLGesture subclass |
210 | LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size) | 148 | LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size) |
@@ -266,14 +204,3 @@ void LLViewerGestureList::xferCallback(void *data, S32 size, void** /*user_data* | |||
266 | llwarns << "Unable to load gesture list!" << llendl; | 204 | llwarns << "Unable to load gesture list!" << llendl; |
267 | } | 205 | } |
268 | } | 206 | } |
269 | |||
270 | // static | ||
271 | void LLViewerGestureList::processGestureUpdate(LLMessageSystem *msg, void** /*user_data*/) | ||
272 | { | ||
273 | char remote_filename[MAX_STRING]; /* Flawfinder: ignore */ | ||
274 | msg->getStringFast(_PREHASH_AgentBlock, _PREHASH_Filename, MAX_STRING, remote_filename); | ||
275 | |||
276 | |||
277 | gXferManager->requestFile(remote_filename, LL_PATH_CACHE, msg->getSender(), TRUE, xferCallback, NULL, | ||
278 | LLXferManager::HIGH_PRIORITY); | ||
279 | } | ||