当前位置: 首页>>代码示例>>C++>>正文


C++ LLMessageSystem::addS32方法代码示例

本文整理汇总了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();
		}
	}
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:39,代码来源:lggbeammaps.cpp

示例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();
	}
}
开发者ID:Kiera,项目名称:Crow,代码行数:50,代码来源:llfloaterfriends.cpp

示例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;
}
开发者ID:Kiera,项目名称:Sausages,代码行数:50,代码来源:llviewerinventory.cpp

示例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();
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:40,代码来源:fsnearbychathub.cpp

示例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);
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:16,代码来源:llnearbychatbar.cpp

示例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;
}
开发者ID:MattoDestiny,项目名称:Zero-One,代码行数:46,代码来源:llviewerinventory.cpp

示例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;
}
开发者ID:Logear,项目名称:PartyHatViewer,代码行数:46,代码来源:llpanelclassified.cpp

示例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
}
开发者ID:lilly,项目名称:imprudence,代码行数:17,代码来源:llmutelist.cpp

示例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();
}
开发者ID:Nora28,项目名称:imprudence,代码行数:46,代码来源:llfloaterauction.cpp

示例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();
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:19,代码来源:llavatarpropertiesprocessor.cpp

示例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;
}
开发者ID:PhoenixDesmoulins,项目名称:imprudence,代码行数:21,代码来源:rlvhelper.cpp

示例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();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:40,代码来源:llpanelpick.cpp

示例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;
		}
	}
}
开发者ID:zwagoth,项目名称:Emerald-SVN-History,代码行数:22,代码来源:lggbeammaps.cpp

示例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;
		}
	}
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:23,代码来源:lggbeammaps.cpp

示例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
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:23,代码来源:llmutelist.cpp


注:本文中的LLMessageSystem::addS32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。