本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
}