本文整理汇总了C++中LLMessageSystem::addString方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::addString方法的具体用法?C++ LLMessageSystem::addString怎么用?C++ LLMessageSystem::addString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::addString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendReportViaLegacy
void LLFloaterReporter::sendReportViaLegacy(const LLSD & report)
{
LLViewerRegion *regionp = gAgent.getRegion();
if (!regionp) return;
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UserReport);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ReportData);
msg->addU8Fast(_PREHASH_ReportType, report["report-type"].asInteger());
msg->addU8(_PREHASH_Category, report["category"].asInteger());
msg->addVector3Fast(_PREHASH_Position, LLVector3(report["position"]));
msg->addU8Fast(_PREHASH_CheckFlags, report["check-flags"].asInteger());
msg->addUUIDFast(_PREHASH_ScreenshotID, report["screenshot-id"].asUUID());
msg->addUUIDFast(_PREHASH_ObjectID, report["object-id"].asUUID());
msg->addUUID("AbuserID", report["abuser-id"].asUUID());
msg->addString("AbuseRegionName", report["abuse-region-name"].asString());
msg->addUUID("AbuseRegionID", report["abuse-region-id"].asUUID());
msg->addStringFast(_PREHASH_Summary, report["summary"].asString());
msg->addString("VersionString", report["version-string"]);
msg->addStringFast(_PREHASH_Details, report["details"] );
msg->sendReliable(regionp->getHost());
}
示例2: sendClassifiedInfoUpdate
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();
}
示例3: send_generic_message
void send_generic_message(const std::string& method,
const std::vector<std::string>& strings,
const LLUUID& invoice)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("GenericMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", method);
msg->addUUID("Invoice", invoice);
if(strings.empty())
{
msg->nextBlock("ParamList");
msg->addString("Parameter", NULL);
}
else
{
std::vector<std::string>::const_iterator it = strings.begin();
std::vector<std::string>::const_iterator end = strings.end();
for(; it != end; ++it)
{
msg->nextBlock("ParamList");
msg->addString("Parameter", *it);
}
}
gAgent.sendReliableMessage();
}
示例4: send_estate_message
static void send_estate_message(
const char* request,
const LLUUID &target)
{
LLMessageSystem* msg = gMessageSystem;
LLUUID invoice;
// This seems to provide an ID so that the sim can say which request it's
// replying to. I think this can be ignored for now.
invoice.generate();
llinfos << "Sending estate request '" << request << "'" << llendl;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", request);
msg->addUUID("Invoice", invoice);
// Agent id
msg->nextBlock("ParamList");
msg->addString("Parameter", gAgent.getID().asString().c_str());
// Target
msg->nextBlock("ParamList");
msg->addString("Parameter", target.asString().c_str());
msg->sendReliable(gAgent.getRegion()->getHost());
}
示例5: queryCore
void LLPanelDirPlaces::queryCore(const std::string& name,
S32 category,
U32 flags)
{
setupNewSearch();
// JC: Sorting by dwell severely impacts the performance of the query.
// Instead of sorting on the dataserver, we sort locally once the results
// are received.
// IW: Re-enabled dwell sort based on new 3-character minimum description
// Hopefully we'll move to next-gen Find before this becomes a big problem
flags |= DFQ_DWELL_SORT;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("DirPlacesQuery");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("QueryData");
msg->addUUID("QueryID", getSearchID());
msg->addString("QueryText", name);
msg->addU32("QueryFlags", flags);
msg->addS8("Category", (S8)category);
// No longer support queries by region name, too many regions
// for combobox, no easy way to do autocomplete. JC
msg->addString("SimName", "");
msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
gAgent.sendReliableMessage();
}
示例6: really_send_chat_from_viewer
// This should do nothing other than send chat, with no other processing.
void really_send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
{
LLMessageSystem* msg = gMessageSystem;
if(channel >= 0)
{
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, utf8_out_text);
msg->addU8Fast(_PREHASH_Type, type);
msg->addS32("Channel", channel);
}
else
{
msg->newMessage("ScriptDialogReply");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("ObjectID", gAgent.getID());
msg->addS32("ChatChannel", channel);
msg->addS32("ButtonIndex", 0);
msg->addString("ButtonLabel", utf8_out_text);
}
gAgent.sendReliableMessage();
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
}
示例7: sendAvatarPropertiesUpdate
void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props)
{
llinfos << "Sending avatarinfo update" << llendl;
// This value is required by sendAvatarPropertiesUpdate method.
//A profile should never be mature. (From the original code)
BOOL mature = FALSE;
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_AvatarPropertiesUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast( _PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
msg->nextBlockFast(_PREHASH_PropertiesData);
msg->addUUIDFast( _PREHASH_ImageID, avatar_props->image_id);
msg->addUUIDFast( _PREHASH_FLImageID, avatar_props->fl_image_id);
msg->addStringFast( _PREHASH_AboutText, avatar_props->about_text);
msg->addStringFast( _PREHASH_FLAboutText, avatar_props->fl_about_text);
msg->addBOOL(_PREHASH_AllowPublish, avatar_props->allow_publish);
msg->addBOOL(_PREHASH_MaturePublish, mature);
msg->addString(_PREHASH_ProfileURL, avatar_props->profile_url);
gAgent.sendReliableMessage();
}
示例8: sendPickInfoUpdate
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();
}
示例9: apply
void LLPrefsIMImpl::apply()
{
LLTextEditor* busy = getChild<LLTextEditor>("busy_response");
LLWString busy_response;
if (busy) busy_response = busy->getWText();
LLWStringUtil::replaceTabsWithSpaces(busy_response, 4);
LLWStringUtil::replaceChar(busy_response, '\n', '^');
LLWStringUtil::replaceChar(busy_response, ' ', '%');
if(mGotPersonalInfo)
{
gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response)));
gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean());
gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean());
gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean());
gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean());
gSavedPerAccountSettings.setBOOL("LogInstantMessages",childGetValue("log_instant_messages").asBoolean());
gSavedPerAccountSettings.setBOOL("LogChat",childGetValue("log_chat").asBoolean());
gSavedPerAccountSettings.setBOOL("LogShowHistory",childGetValue("log_show_history").asBoolean());
gSavedPerAccountSettings.setBOOL("IMLogTimestamp",childGetValue("log_instant_messages_timestamp").asBoolean());
gSavedPerAccountSettings.setBOOL("LogChatTimestamp",childGetValue("log_chat_timestamp").asBoolean());
gSavedPerAccountSettings.setBOOL("LogChatIM",childGetValue("log_chat_IM").asBoolean());
gSavedPerAccountSettings.setBOOL("LogTimestampDate",childGetValue("log_date_timestamp").asBoolean());
gSavedPerAccountSettings.setBOOL("LogFileNamewithDate",childGetValue("logfile_name_datestamp").asBoolean());
bool new_im_via_email = childGetValue("send_im_to_email").asBoolean();
bool new_hide_online = childGetValue("online_visibility").asBoolean();
if((new_im_via_email != mOriginalIMViaEmail)
||(new_hide_online != mOriginalHideOnlineStatus))
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateUserInfo);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_UserData);
msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email);
// This hack is because we are representing several different
// possible strings with a single checkbox. Since most users
// can only select between 2 values, we represent it as a
// checkbox. This breaks down a little bit for liaisons, but
// works out in the end.
if(new_hide_online != mOriginalHideOnlineStatus)
{
if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN;
else mDirectoryVisibility = VISIBILITY_DEFAULT;
//Update showonline value, otherwise multiple applys won't work
mOriginalHideOnlineStatus = new_hide_online;
}
msg->addString("DirectoryVisibility", mDirectoryVisibility);
gAgent.sendReliableMessage();
}
}
}
示例10: really_send_chat_from_nearby_floater
//<FS:TS> FIRE-787: break up too long chat lines into multiple messages
// This function just sends the message, with no other processing. Moved out
// of send_chat_from_viewer.
void really_send_chat_from_nearby_floater(std::string utf8_out_text, EChatType type, S32 channel)
{
LLMessageSystem* msg = gMessageSystem;
// <FS:ND> gMessageSystem can be 0, not sure how it is exactly to reproduce, maybe during viewer shutdown?
if( !msg )
return;
// </FS:ND>
if(channel >= 0)
{
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, utf8_out_text);
msg->addU8Fast(_PREHASH_Type, type);
msg->addS32("Channel", channel);
}
else
{
msg->newMessage("ScriptDialogReply");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("ObjectID", gAgent.getID());
msg->addS32("ChatChannel", channel);
msg->addS32("ButtonIndex", 0);
msg->addString("ButtonLabel", utf8_out_text);
}
gAgent.sendReliableMessage();
}
示例11: find
void LLFloaterAvatarPicker::find()
{
const std::string& text = childGetValue("Edit").asString();
mQueryID.generate();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("AvatarPickerRequest");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("QueryID", mQueryID); // not used right now
msg->nextBlock("Data");
msg->addString("Name", text);
gAgent.sendReliableMessage();
if (mListNames)
{
mListNames->deleteAllItems();
mListNames->addCommentText(std::string("Searching...")); // *TODO: Translate
}
childSetEnabled("Select", FALSE);
mResultsReturned = FALSE;
}
示例12: leftMouseCallback
// static
void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
{
LLToolPie::getInstance()->mPick = pick_info;
LLToolPie::getInstance()->pickAndShowMenu(FALSE);
if(gSavedSettings.getBOOL("EmeraldClickSendTouchPos"))
{
//if(gKeyboard->getKeyDown(KEY_CONTROL))
{
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
std::string message = llformat("<%.6f, %.6f, %.6f>",(F32)(pos.mdV[VX]),(F32)(pos.mdV[VY]),(F32)(pos.mdV[VZ]));
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_ScriptDialogReply);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ObjectID, gAgent.getID());
msg->addS32(_PREHASH_ChatChannel, -65536);
msg->addS32(_PREHASH_ButtonIndex, 0);
msg->addString(_PREHASH_ButtonLabel, message);
gAgent.sendReliableMessage();
}
}
}
示例13: sendRequest
// static
void LLPanelRequestTools::sendRequest(const std::string& request,
const std::string& parameter,
const LLHost& host)
{
LL_INFOS() << "Sending request '" << request << "', '"
<< parameter << "' to " << host << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("GodlikeMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", request);
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", parameter);
msg->sendReliable(host);
}
示例14: onKick
void LLFloaterTopObjects::onKick(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", "kickestate");
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", taskid.asString().c_str());
msg->sendReliable(gAgent.getRegionHost());
}
示例15: updateRemove
void LLMuteList::updateRemove(const LLMute& mute)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RemoveMuteListEntry);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MuteData);
msg->addUUIDFast(_PREHASH_MuteID, mute.mID);
msg->addString("MuteName", mute.mName);
gAgent.sendReliableMessage();
}