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


C++ LLAvatarPropertiesProcessor类代码示例

本文整理汇总了C++中LLAvatarPropertiesProcessor的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarPropertiesProcessor类的具体用法?C++ LLAvatarPropertiesProcessor怎么用?C++ LLAvatarPropertiesProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLAvatarPropertiesProcessor类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getInstance

void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, void**)
{
	LLPickData pick_data;

	// Extract the agent id and verify the message is for this
	// client.
	msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, pick_data.agent_id );
	msg->getUUID(_PREHASH_Data, _PREHASH_PickID, pick_data.pick_id);
	msg->getUUID(_PREHASH_Data, _PREHASH_CreatorID, pick_data.creator_id);

	// ** top_pick should be deleted, not being used anymore - angela
	msg->getBOOL(_PREHASH_Data, _PREHASH_TopPick, pick_data.top_pick);
	msg->getUUID(_PREHASH_Data, _PREHASH_ParcelID, pick_data.parcel_id);
	msg->getString(_PREHASH_Data, _PREHASH_Name, pick_data.name);
	msg->getString(_PREHASH_Data, _PREHASH_Desc, pick_data.desc);
	msg->getUUID(_PREHASH_Data, _PREHASH_SnapshotID, pick_data.snapshot_id);

	msg->getString(_PREHASH_Data, _PREHASH_User, pick_data.user_name);
	msg->getString(_PREHASH_Data, _PREHASH_OriginalName, pick_data.original_name);
	msg->getString(_PREHASH_Data, _PREHASH_SimName, pick_data.sim_name);
	msg->getVector3d(_PREHASH_Data, _PREHASH_PosGlobal, pick_data.pos_global);

	msg->getS32(_PREHASH_Data, _PREHASH_SortOrder, pick_data.sort_order);
	msg->getBOOL(_PREHASH_Data, _PREHASH_Enabled, pick_data.enabled);

	LLAvatarPropertiesProcessor* self = getInstance();
	// don't need to remove pending request as we don't track pick info
	self->notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO);
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:29,代码来源:llavatarpropertiesprocessor.cpp

示例2: if

void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**)
{
	LLAvatarData avatar_data;

	msg->getUUIDFast(	_PREHASH_AgentData,			_PREHASH_AgentID, 		avatar_data.agent_id);
	msg->getUUIDFast(	_PREHASH_AgentData,			_PREHASH_AvatarID, 		avatar_data.avatar_id);
	msg->getUUIDFast(  	_PREHASH_PropertiesData,	_PREHASH_ImageID,		avatar_data.image_id);
	msg->getUUIDFast(  	_PREHASH_PropertiesData,	_PREHASH_FLImageID,		avatar_data.fl_image_id);
	msg->getUUIDFast(	_PREHASH_PropertiesData,	_PREHASH_PartnerID,		avatar_data.partner_id);
	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_AboutText,		avatar_data.about_text);
	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_FLAboutText,	avatar_data.fl_about_text);
	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_BornOn,		avatar_data.born_on);
	msg->getString(		_PREHASH_PropertiesData,	_PREHASH_ProfileURL,	avatar_data.profile_url);
	msg->getU32Fast(	_PREHASH_PropertiesData,	_PREHASH_Flags,			avatar_data.flags);


	avatar_data.caption_index = 0;

	S32 charter_member_size = 0;
	charter_member_size = msg->getSize(_PREHASH_PropertiesData, _PREHASH_CharterMember);
	if(1 == charter_member_size)
	{
		msg->getBinaryData(_PREHASH_PropertiesData, _PREHASH_CharterMember, &avatar_data.caption_index, 1);
	}
	else if(1 < charter_member_size)
	{
		msg->getString(_PREHASH_PropertiesData, _PREHASH_CharterMember, avatar_data.caption_text);
	}
	LLAvatarPropertiesProcessor* self = getInstance();
	// Request processed, no longer pending
	self->removePendingRequest(avatar_data.avatar_id, APT_PROPERTIES);
	self->notifyObservers(avatar_data.avatar_id,&avatar_data,APT_PROPERTIES);
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:33,代码来源:llavatarpropertiesprocessor.cpp

示例3: getInstance

void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem* msg, void**)
{
	LLAvatarClassifieds classifieds;

	msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, classifieds.agent_id);
	msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, classifieds.target_id);

	S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);

	for(int n = 0; n < block_count; ++n)
	{
		LLAvatarClassifieds::classified_data data;

		msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, data.classified_id, n);
		msg->getString(_PREHASH_Data, _PREHASH_Name, data.name, n);

		classifieds.classifieds_list.push_back(data);
	}

	LLAvatarPropertiesProcessor* self = getInstance();
	// Request processed, no longer pending
	self->removePendingRequest(classifieds.target_id, APT_CLASSIFIEDS);
	self->notifyObservers(classifieds.target_id,&classifieds,APT_CLASSIFIEDS);
	//LLPanelAvatarClassified => LLPanelAvatar
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:25,代码来源:llavatarpropertiesprocessor.cpp

示例4: updateAvatarProperties

void LLAvatarListItem::updateAvatarProperties()
{
    // NOTE: typically we request these once on creation to avoid excess traffic/processing.
    //This means updates to these properties won't typically be seen while target is in nearby range.
    LLAvatarPropertiesProcessor* processor = LLAvatarPropertiesProcessor::getInstance();
    processor->addObserver(mAvatarId, this);
    processor->sendAvatarPropertiesRequest(mAvatarId);
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:8,代码来源:llavatarlistitem.cpp

示例5: LLFetchAvatarData

	// If the inspector closes it will delete the pending request object, so the
	// inspector pointer will be valid for the lifetime of this object
	LLFetchAvatarData(const LLUUID& avatar_id, LLInspectAvatar* inspector)
	:	mAvatarID(avatar_id),
		mInspector(inspector)
	{
		LLAvatarPropertiesProcessor* processor = 
			LLAvatarPropertiesProcessor::getInstance();
		// register ourselves as an observer
		processor->addObserver(mAvatarID, this);
		// send a request (duplicates will be suppressed inside the avatar
		// properties processor)
		processor->sendAvatarPropertiesRequest(mAvatarID);
	}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:14,代码来源:llinspectavatar.cpp

示例6: setValue

//virtual
void LLAvatarIconCtrl::setValue(const LLSD& value)
{
	if (value.isUUID())
	{
		LLAvatarPropertiesProcessor* app =
			LLAvatarPropertiesProcessor::getInstance();
		if (mAvatarId.notNull())
		{
			app->removeObserver(mAvatarId, this);
		}

		if (mAvatarId != value.asUUID())
		{
			mAvatarId = value.asUUID();

			// *BUG: This will return stale icons if a user changes their
			// profile picture. However, otherwise we send too many upstream
			// AvatarPropertiesRequest messages.

			// to get fresh avatar icon use
			// LLAvatarIconIDCache::getInstance()->remove(avatar_id);

			// Check if cache already contains image_id for that avatar
			if (!updateFromCache())
			{
				// *TODO: Consider getting avatar icon/badge directly from 
				// People API, rather than sending AvatarPropertyRequest
				// messages.  People API already hits the user table.
				LLIconCtrl::setValue(mDefaultIconName);
				app->addObserver(mAvatarId, this);
				app->sendAvatarPropertiesRequest(mAvatarId);
			}
		}
	}
	else
	{
		LLIconCtrl::setValue(value);
	}

	LLAvatarNameCache::get(mAvatarId,
		boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, 
			this, _1, _2));
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:44,代码来源:llavatariconctrl.cpp

示例7: setValue

//virtual
void LLAvatarIconCtrl::setValue(const LLSD& value)
{
	if (value.isUUID())
	{
		LLAvatarPropertiesProcessor* app =
			LLAvatarPropertiesProcessor::getInstance();
		if (mAvatarId.notNull())
		{
			app->removeObserver(mAvatarId, this);
		}

		if (mAvatarId != value.asUUID())
		{
			mAvatarId = value.asUUID();

			// *BUG: This will return stale icons if a user changes their
			// profile picture. However, otherwise we send too many upstream
			// AvatarPropertiesRequest messages.

			// to get fresh avatar icon use
			// LLAvatarIconIDCache::getInstance()->remove(avatar_id);

			// Check if cache already contains image_id for that avatar
			if (!updateFromCache())
			{
				LLIconCtrl::setValue(mDefaultIconName);
				app->addObserver(mAvatarId, this);
				app->sendAvatarPropertiesRequest(mAvatarId);
			}
		}
	}
	else
	{
		LLIconCtrl::setValue(value);
	}

	if  (gCacheName)
	{
		gCacheName->get(mAvatarId, FALSE, boost::bind(&LLAvatarIconCtrl::nameUpdatedCallback, this, _1, _2, _3, _4));
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:42,代码来源:llavatariconctrl.cpp


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