void LLAvatarPropertiesProcessor::sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data) { if(!c_data) { return; } LLMessageSystem* msg = gMessageSystem; msg->newMessage(_PREHASH_ClassifiedInfoUpdate); msg->nextBlock(_PREHASH_AgentData); msg->addUUID(_PREHASH_AgentID, gAgent.getID()); msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlock(_PREHASH_Data); msg->addUUID(_PREHASH_ClassifiedID, c_data->classified_id); msg->addU32(_PREHASH_Category, c_data->category); msg->addString(_PREHASH_Name, c_data->name); msg->addString(_PREHASH_Desc, c_data->description); msg->addUUID(_PREHASH_ParcelID, c_data->parcel_id); msg->addU32(_PREHASH_ParentEstate, 0); msg->addUUID(_PREHASH_SnapshotID, c_data->snapshot_id); msg->addVector3d(_PREHASH_PosGlobal, c_data->pos_global); msg->addU8(_PREHASH_ClassifiedFlags, c_data->flags); msg->addS32(_PREHASH_PriceForListing, c_data->price_for_listing); gAgent.sendReliableMessage(); }
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick) { if (!new_pick) return; LLMessageSystem* msg = gMessageSystem; msg->newMessage(_PREHASH_PickInfoUpdate); msg->nextBlock(_PREHASH_AgentData); msg->addUUID(_PREHASH_AgentID, gAgent.getID()); msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlock(_PREHASH_Data); msg->addUUID(_PREHASH_PickID, new_pick->pick_id); msg->addUUID(_PREHASH_CreatorID, new_pick->creator_id); //legacy var need to be deleted msg->addBOOL(_PREHASH_TopPick, FALSE); // fills in on simulator if null msg->addUUID(_PREHASH_ParcelID, new_pick->parcel_id); msg->addString(_PREHASH_Name, new_pick->name); msg->addString(_PREHASH_Desc, new_pick->desc); msg->addUUID(_PREHASH_SnapshotID, new_pick->snapshot_id); msg->addVector3d(_PREHASH_PosGlobal, new_pick->pos_global); // Only top picks have a sort order msg->addS32(_PREHASH_SortOrder, 0); msg->addBOOL(_PREHASH_Enabled, new_pick->enabled); gAgent.sendReliableMessage(); LLAgentPicksInfo::getInstance()->requestNumberOfPicks(); }
void LLPanelPick::sendPickInfoUpdate() { // If we don't have a pick id yet, we'll need to generate one, // otherwise we'll keep overwriting pick_id 00000 in the database. if (mPickID.isNull()) { mPickID.generate(); } LLMessageSystem* msg = gMessageSystem; msg->newMessage("PickInfoUpdate"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->nextBlock("Data"); msg->addUUID("PickID", mPickID); msg->addUUID("CreatorID", mCreatorID); msg->addBOOL("TopPick", mTopPick); // fills in on simulator if null msg->addUUID("ParcelID", mParcelID); msg->addString("Name", mNameEditor->getText()); msg->addString("Desc", mDescEditor->getText()); msg->addUUID("SnapshotID", mSnapshotCtrl->getImageAssetID()); msg->addVector3d("PosGlobal", mPosGlobal); // Only top picks have a sort order S32 sort_order; if (mTopPick) { sort_order = atoi(mSortOrderEditor->getText().c_str()); } else { sort_order = 0; } msg->addS32("SortOrder", sort_order); msg->addBOOL("Enabled", mEnabledCheck->get()); gAgent.sendReliableMessage(); }
static void postcard_upload_callback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) { LLSD* postcard_data = (LLSD*)user_data; if (result) { // TODO: display the error messages in UI llwarns << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << llendl; LLPostCard::reportPostResult(false); } else { // only create the postcard once the upload succeeds // request the postcard const LLSD& data = *postcard_data; LLMessageSystem* msg = gMessageSystem; msg->newMessage("SendPostcard"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->addUUID("AssetID", data["asset-id"].asUUID()); msg->addVector3d("PosGlobal", LLVector3d(data["pos-global"])); msg->addString("To", data["to"]); msg->addString("From", data["from"]); msg->addString("Name", data["name"]); msg->addString("Subject", data["subject"]); msg->addString("Msg", data["msg"]); msg->addBOOL("AllowPublish", FALSE); msg->addBOOL("MaturePublish", FALSE); gAgent.sendReliableMessage(); LLPostCard::reportPostResult(true); } delete postcard_data; }
// static void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLFloaterPostcard *self = (LLFloaterPostcard *)user_data; LLUploadDialog::modalUploadFinished(); if (result) { LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); LLNotificationsUtil::add("ErrorUploadingPostcard", args); } else { // only create the postcard once the upload succeeds // request the postcard LLMessageSystem* msg = gMessageSystem; msg->newMessage("SendPostcard"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->addUUID("AssetID", self->mAssetID); msg->addVector3d("PosGlobal", self->mPosTakenGlobal); msg->addString("To", self->getChild<LLUICtrl>("to_form")->getValue().asString()); msg->addString("From", self->getChild<LLUICtrl>("from_form")->getValue().asString()); msg->addString("Name", self->getChild<LLUICtrl>("name_form")->getValue().asString()); msg->addString("Subject", self->getChild<LLUICtrl>("subject_form")->getValue().asString()); msg->addString("Msg", self->getChild<LLUICtrl>("msg_form")->getValue().asString()); msg->addBOOL("AllowPublish", FALSE); msg->addBOOL("MaturePublish", FALSE); gAgent.sendReliableMessage(); } self->closeFloater(); }
// static void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLFloaterPostcard *self = (LLFloaterPostcard *)user_data; LLUploadDialog::modalUploadFinished(); if (result) { LLStringBase<char>::format_map_t args; args["[REASON]"] = std::string(LLAssetStorage::getErrorString(result)); gViewerWindow->alertXml("ErrorUploadingPostcard", args); } else { // only create the postcard once the upload succeeds // request the postcard LLMessageSystem* msg = gMessageSystem; msg->newMessage("SendPostcard"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->addUUID("AssetID", self->mAssetID); msg->addVector3d("PosGlobal", self->mPosTakenGlobal); msg->addString("To", self->childGetValue("to_form").asString()); msg->addString("From", self->childGetValue("from_form").asString()); msg->addString("Name", self->childGetValue("name_form").asString()); msg->addString("Subject", self->childGetValue("subject_form").asString()); msg->addString("Msg", self->childGetValue("msg_form").asString()); msg->addBOOL("AllowPublish", self->childGetValue("allow_publish_check").asBoolean()); msg->addBOOL("MaturePublish", self->childGetValue("mature_check").asBoolean()); gAgent.sendReliableMessage(); } self->close(); }