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


C++ LLViewerRegion::setCapabilitiesReceivedCallback方法代码示例

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


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

示例1: requestGetCharacters

void LLPathfindingManager::requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const
{
	LLPathfindingObjectListPtr emptyCharacterListPtr;

	LLViewerRegion *currentRegion = getCurrentRegion();

	if (currentRegion == NULL)
	{
		pCharactersCallback(pRequestId, kRequestNotEnabled, emptyCharacterListPtr);
	}
	else if (!currentRegion->capabilitiesReceived())
	{
		pCharactersCallback(pRequestId, kRequestStarted, emptyCharacterListPtr);
		currentRegion->setCapabilitiesReceivedCallback(boost::bind(&LLPathfindingManager::handleDeferredGetCharactersForRegion, this, _1, pRequestId, pCharactersCallback));
	}
	else
	{
		std::string charactersURL = getCharactersURLForCurrentRegion();
		if (charactersURL.empty())
		{
			pCharactersCallback(pRequestId, kRequestNotEnabled, emptyCharacterListPtr);
		}
		else
		{
			pCharactersCallback(pRequestId, kRequestStarted, emptyCharacterListPtr);

			LLHTTPClient::ResponderPtr charactersResponder = new CharactersResponder(charactersURL, pRequestId, pCharactersCallback);
			LLHTTPClient::get(charactersURL, charactersResponder);
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:31,代码来源:llpathfindingmanager.cpp

示例2: requestGetAgentState

void LLPathfindingManager::requestGetAgentState()
{
	LLViewerRegion *currentRegion = getCurrentRegion();

	if (currentRegion == NULL)
	{
		mAgentStateSignal(FALSE);
	}
	else
	{
		if (!currentRegion->capabilitiesReceived())
		{
			currentRegion->setCapabilitiesReceivedCallback(boost::bind(&LLPathfindingManager::handleDeferredGetAgentStateForRegion, this, _1));
		}
		else if (!isPathfindingEnabledForRegion(currentRegion))
		{
			mAgentStateSignal(FALSE);
		}
		else
		{
			std::string agentStateURL = getAgentStateURLForRegion(currentRegion);
			llassert(!agentStateURL.empty());
			LLHTTPClient::ResponderPtr responder = new AgentStateResponder(agentStateURL);
			LLHTTPClient::get(agentStateURL, responder);
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:27,代码来源:llpathfindingmanager.cpp

示例3: requestGetLinksets

void LLPathfindingManager::requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const
{
	LLPathfindingObjectListPtr emptyLinksetListPtr;
	LLViewerRegion *currentRegion = getCurrentRegion();

	if (currentRegion == NULL)
	{
		pLinksetsCallback(pRequestId, kRequestNotEnabled, emptyLinksetListPtr);
	}
	else if (!currentRegion->capabilitiesReceived())
	{
		pLinksetsCallback(pRequestId, kRequestStarted, emptyLinksetListPtr);
		currentRegion->setCapabilitiesReceivedCallback(boost::bind(&LLPathfindingManager::handleDeferredGetLinksetsForRegion, this, _1, pRequestId, pLinksetsCallback));
	}
	else
	{
		std::string objectLinksetsURL = getObjectLinksetsURLForCurrentRegion();
		std::string terrainLinksetsURL = getTerrainLinksetsURLForCurrentRegion();
		if (objectLinksetsURL.empty() || terrainLinksetsURL.empty())
		{
			pLinksetsCallback(pRequestId, kRequestNotEnabled, emptyLinksetListPtr);
		}
		else
		{
			pLinksetsCallback(pRequestId, kRequestStarted, emptyLinksetListPtr);

			bool doRequestTerrain = isAllowViewTerrainProperties();
			LinksetsResponderPtr linksetsResponderPtr(new LinksetsResponder(pRequestId, pLinksetsCallback, true, doRequestTerrain));

			LLHTTPClient::ResponderPtr objectLinksetsResponder = new ObjectLinksetsResponder(objectLinksetsURL, linksetsResponderPtr);
			LLHTTPClient::get(objectLinksetsURL, objectLinksetsResponder);

			if (doRequestTerrain)
			{
				LLHTTPClient::ResponderPtr terrainLinksetsResponder = new TerrainLinksetsResponder(terrainLinksetsURL, linksetsResponderPtr);
				LLHTTPClient::get(terrainLinksetsURL, terrainLinksetsResponder);
			}
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:40,代码来源:llpathfindingmanager.cpp


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