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


C++ LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest方法代码示例

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


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

示例1: 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

示例2:

	// 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

示例3: 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

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