本文整理汇总了C++中LLMessageSystem::addS32方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::addS32方法的具体用法?C++ LLMessageSystem::addS32怎么用?C++ LLMessageSystem::addS32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::addS32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateBeamChat
void lggBeamMaps::updateBeamChat(const LLVector3d& currentPos)
{
static LLCachedControl<bool> FSParticleChat(gSavedSettings, "FSParticleChat");
if (FSParticleChat)
{
if (!mPartsNow)
{
mPartsNow = true;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgentID);
msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, "start");
msg->addU8Fast(_PREHASH_Type, 0);
msg->addS32("Channel", 9000);
gAgent.sendReliableMessage();
}
if ((mBeamLastAt - currentPos).length() > .2f)
{
mBeamLastAt = currentPos;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgentID);
msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, llformat("<%.6f, %.6f, %.6f>",(F32)(mBeamLastAt.mdV[VX]), (F32)(mBeamLastAt.mdV[VY]), (F32)(mBeamLastAt.mdV[VZ])));
msg->addU8Fast(_PREHASH_Type, 0);
msg->addS32("Channel", 9000); // *TODO: make configurable
gAgent.sendReliableMessage();
}
}
}
示例2: FriendImportState
void LLPanelFriends::FriendImportState(LLUUID id, bool accepted)
{
std::string importstate = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "friendimportstate.dat");
if(LLFile::isfile(importstate))
{
llifstream importer(importstate);
LLSD data;
LLSDSerialize::fromXMLDocument(data, importer);
if(!data.has(id.asString()))return;
LLSD user = data[id.asString()];
if(accepted)
{
BOOL can_map = user["can_map"].asBoolean();
BOOL can_mod = user["can_mod"].asBoolean();
BOOL see_online = user["see_online"].asBoolean();
S32 rights = 0;
if(can_map)rights |= LLRelationship::GRANT_MAP_LOCATION;
if(can_mod)rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
if(see_online)rights |= LLRelationship::GRANT_ONLINE_STATUS;
if(is_agent_friend(id))//is this legit shit yo
{
const LLRelationship* friend_status = LLAvatarTracker::instance().getBuddyInfo(id);
if(friend_status)
{
S32 tr = friend_status->getRightsGrantedTo();
if(tr != rights)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GrantUserRights);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Rights);
msg->addUUID(_PREHASH_AgentRelated, id);
msg->addS32(_PREHASH_RelatedRights, rights);
gAgent.sendReliableMessage();
}
}
}
}
data.erase(id.asString());//if they declined then we need to forget about it, if they accepted it is done
llofstream export_file;
export_file.open(importstate);
LLSDSerialize::toPrettyXML(data, export_file);
export_file.close();
}
}
示例3: fetchDescendents
bool LLViewerInventoryCategory::fetchDescendents()
{
// <edit>
if((mUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot))) return false;
// </edit>
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.reset();
mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
// bitfield
// 1 = by date
// 2 = folders by date
// Need to mask off anything but the first bit.
// This comes from LLInventoryFilter from llfolderview.h
U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
std::string url = gAgent.getCapability("agent/inventory"); // OGPX : was WebFetchInventoryDescendents
if (url.empty()) //OGPX : agent/inventory Capability not found on agent domain. See if the region has one.
{
LL_INFOS_ONCE("fetchDescendents") << " agent/inventory not on AD, checking fallback to region " << LL_ENDL; //OGPX
url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
}
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
LLInventoryModel::startBackgroundFetch(mUUID);
}
else
{ //Deprecated, but if we don't have a capability, use the old system.
LL_INFOS_ONCE("fetchDescendents") << "WebFetchInventoryDescendents or agent/inventory capability not found. Using deprecated UDP message." << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("FetchInventoryDescendents");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("InventoryData");
msg->addUUID("FolderID", mUUID);
msg->addUUID("OwnerID", mOwnerID);
msg->addS32("SortOrder", sort_order);
msg->addBOOL("FetchFolders", FALSE);
msg->addBOOL("FetchItems", TRUE);
gAgent.sendReliableMessage();
}
return true;
}
return false;
}
示例4: really_send_chat_from_viewer
//<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_viewer(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();
}
示例5: send_chat_from_viewer
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
{
LLMessageSystem* msg = gMessageSystem;
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);
gAgent.sendReliableMessage();
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
}
示例6: fetchDescendents
bool LLViewerInventoryCategory::fetchDescendents()
{
// <edit>
if((mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return false;
// </edit>
if (VERSION_UNKNOWN == mVersion &&
(!mDescendentsRequested.getStarted() ||
mDescendentsRequested.hasExpired())) // Expired check prevents multiple downloads.
{
const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.start(FETCH_TIMER_EXPIRY);
// bitfield
// 1 = by date
// 2 = folders by date
// Need to mask off anything but the first bit.
// This comes from LLInventoryFilter from llfolderview.h
U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
LLInventoryModel::startBackgroundFetch(mUUID);
}
else
{ //Deprecated, but if we don't have a capability, use the old system.
//llinfos << "FetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("FetchInventoryDescendents");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("InventoryData");
msg->addUUID("FolderID", mUUID);
msg->addUUID("OwnerID", mOwnerID);
msg->addS32("SortOrder", sort_order);
msg->addBOOL("FetchFolders", FALSE);
msg->addBOOL("FetchItems", TRUE);
gAgent.sendReliableMessage();
}
return true;
}
return false;
}
示例7: sendClassifiedInfoUpdate
void LLPanelClassified::sendClassifiedInfoUpdate()
{
// If we don't have a classified id yet, we'll need to generate one,
// otherwise we'll keep overwriting classified_id 00000 in the database.
if (mClassifiedID.isNull())
{
// TODO: Don't do this on the client.
mClassifiedID.generate();
}
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ClassifiedInfoUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ClassifiedID, mClassifiedID);
// TODO: fix this
U32 category = mCategoryCombo->getCurrentIndex() + 1;
msg->addU32Fast(_PREHASH_Category, category);
msg->addStringFast(_PREHASH_Name, mNameEditor->getText());
msg->addStringFast(_PREHASH_Desc, mDescEditor->getText());
// fills in on simulator if null
msg->addUUIDFast(_PREHASH_ParcelID, mParcelID);
// fills in on simulator if null
msg->addU32Fast(_PREHASH_ParentEstate, 0);
msg->addUUIDFast(_PREHASH_SnapshotID, mSnapshotCtrl->getImageAssetID());
msg->addVector3dFast(_PREHASH_PosGlobal, mPosGlobal);
BOOL mature = mMatureCombo->getCurrentIndex() == MATURE_CONTENT;
BOOL auto_renew = FALSE;
if (mAutoRenewCheck)
{
auto_renew = mAutoRenewCheck->get();
}
// These flags doesn't matter here.
const bool adult_enabled = false;
const bool is_pg = false;
U8 flags = pack_classified_flags_request(auto_renew, is_pg, mature, adult_enabled);
msg->addU8Fast(_PREHASH_ClassifiedFlags, flags);
msg->addS32("PriceForListing", mPriceForListing);
gAgent.sendReliableMessage();
mDirty = false;
}
示例8: updateAdd
void LLMuteList::updateAdd(const LLMute& mute)
{
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
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->addStringFast(_PREHASH_MuteName, mute.mName);
msg->addS32("MuteType", mute.mType);
msg->addU32("MuteFlags", mute.mFlags);
gAgent.sendReliableMessage();
mIsLoaded = TRUE; // why is this here? -MG
}
示例9: onClickOK
// static
void LLFloaterAuction::onClickOK(void* data)
{
LLFloaterAuction* self = (LLFloaterAuction*)(data);
if(self->mImageID.notNull())
{
LLSD parcel_name = self->childGetValue("parcel_text");
// create the asset
std::string* name = new std::string(parcel_name.asString());
gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_IMAGE_TGA,
&auction_tga_upload_done,
(void*)name,
FALSE);
self->getWindow()->incBusyCount();
std::string* j2c_name = new std::string(parcel_name.asString());
gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_TEXTURE,
&auction_j2c_upload_done,
(void*)j2c_name,
FALSE);
self->getWindow()->incBusyCount();
LLNotifyBox::showXml("UploadingAuctionSnapshot");
}
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ViewerStartAuction");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("ParcelData");
msg->addS32("LocalID", self->mParcelID);
msg->addUUID("SnapshotID", self->mImageID);
msg->sendReliable(self->mParcelHost);
// clean up floater, and get out
self->mImageID.setNull();
self->mImage = NULL;
self->mParcelID = -1;
self->mParcelHost.invalidate();
self->close();
}
示例10: sendFriendRights
void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32 rights)
{
if(!avatar_id.isNull())
{
LLMessageSystem* msg = gMessageSystem;
// setup message header
msg->newMessageFast(_PREHASH_GrantUserRights);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Rights);
msg->addUUID(_PREHASH_AgentRelated, avatar_id);
msg->addS32(_PREHASH_RelatedRights, rights);
gAgent.sendReliableMessage();
}
}
示例11: rlvSendChatReply
// Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e
bool rlvSendChatReply(S32 nChannel, const std::string& strReply)
{
if (!rlvIsValidReplyChannel(nChannel))
return false;
// Copy/paste from send_chat_from_viewer()
LLMessageSystem* msg = gMessageSystem;
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, strReply);
msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_SHOUT);
msg->addS32("Channel", nChannel);
gAgent.sendReliableMessage();
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
return true;
}
示例12: sendPickInfoUpdate
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();
}
示例13: stopBeamChat
void lggBeamMaps::stopBeamChat()
{
if(gSavedSettings.getBOOL("EmeraldParticleChat"))
{
if(sPartsNow != FALSE)
{
sPartsNow = FALSE;
LLMessageSystem* msg = gMessageSystem;
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, "stop");
msg->addU8Fast(_PREHASH_Type, 0);
msg->addS32("Channel", 9000);
gAgent.sendReliableMessage();
sBeamLastAt = LLVector3d::zero;
}
}
}
示例14: stopBeamChat
void lggBeamMaps::stopBeamChat()
{
static LLCachedControl<bool> FSParticleChat(gSavedSettings, "FSParticleChat");
if (FSParticleChat)
{
if (mPartsNow)
{
mPartsNow = false;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgentID);
msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, "stop");
msg->addU8Fast(_PREHASH_Type, 0);
msg->addS32("Channel", 9000);
gAgent.sendReliableMessage();
mBeamLastAt = LLVector3d::zero;
}
}
}
示例15: updateAdd
void LLMuteList::updateAdd(const LLMute& mute)
{
// External mutes (e.g. Avaline callers) are local only, don't send them to the server.
if (mute.mType == LLMute::EXTERNAL)
{
return;
}
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
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->addStringFast(_PREHASH_MuteName, mute.mName);
msg->addS32("MuteType", mute.mType);
msg->addU32("MuteFlags", mute.mFlags);
gAgent.sendReliableMessage();
mIsLoaded = TRUE; // why is this here? -MG
}