BOOL LLGestureStepChat::deserialize(LLDataPacker& dp) { dp.unpackString(mChatText, "chat_text"); dp.unpackU32(mFlags, "flags"); return TRUE; }
BOOL LLGestureStepSound::deserialize(LLDataPacker& dp) { dp.unpackString(mSoundName, "sound_name"); dp.unpackUUID(mSoundAssetID, "asset_id"); dp.unpackU32(mFlags, "flags"); return TRUE; }
BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) { dp.unpackString(mFilename, "Filename"); U8 delete_flag; dp.unpackU8(delete_flag, "Delete"); mDeleteOnCompletion = delete_flag; llinfos << "Unpacked filename: " << mFilename << llendl; return TRUE; }
BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp) { dp.unpackString(mAnimName, "anim_name"); // Apparently an earlier version of the gesture code added \r to the end // of the animation names. Get rid of it. JC if (!mAnimName.empty() && mAnimName[mAnimName.length() - 1] == '\r') { // chop the last character mAnimName.resize(mAnimName.length() - 1); } dp.unpackUUID(mAnimAssetID, "asset_id"); dp.unpackU32(mFlags, "flags"); return TRUE; }
BOOL LLMultiGesture::deserialize(LLDataPacker& dp) { S32 version; dp.unpackS32(version, "version"); if (version != GESTURE_VERSION) { llwarns << "Bad LLMultiGesture version " << version << " should be " << GESTURE_VERSION << llendl; return FALSE; } dp.unpackU8(mKey, "key"); dp.unpackU32(mMask, "mask"); dp.unpackString(mTrigger, "trigger"); dp.unpackString(mReplaceText, "replace"); S32 count; dp.unpackS32(count, "step_count"); if (count < 0) { llwarns << "Bad LLMultiGesture step count " << count << llendl; return FALSE; } S32 i; for (i = 0; i < count; ++i) { S32 type; dp.unpackS32(type, "step_type"); EStepType step_type = (EStepType)type; switch(step_type) { case STEP_ANIMATION: { LLGestureStepAnimation* step = new LLGestureStepAnimation(); BOOL ok = step->deserialize(dp); if (!ok) return FALSE; mSteps.push_back(step); break; } case STEP_SOUND: { LLGestureStepSound* step = new LLGestureStepSound(); BOOL ok = step->deserialize(dp); if (!ok) return FALSE; mSteps.push_back(step); break; } case STEP_CHAT: { LLGestureStepChat* step = new LLGestureStepChat(); BOOL ok = step->deserialize(dp); if (!ok) return FALSE; mSteps.push_back(step); break; } case STEP_WAIT: { LLGestureStepWait* step = new LLGestureStepWait(); BOOL ok = step->deserialize(dp); if (!ok) return FALSE; mSteps.push_back(step); break; } default: { llwarns << "Bad LLMultiGesture step type " << type << llendl; return FALSE; } } } return TRUE; }