Beispiel #1
0
	void result( const LLSD& content )
	{
		//Check for error
		if ( !content.isMap() || content.has("error") )
		{
			llwarns	<< "Error on fetched data"<< llendl;
		}
		else if (content.has("selected"))
		{
			F32 physicsCost		= 0.0f;
			F32 networkCost		= 0.0f;
			F32 simulationCost	= 0.0f;

			physicsCost		= content["selected"]["physics"].asReal();
			networkCost		= content["selected"]["streaming"].asReal();
			simulationCost	= content["selected"]["simulation"].asReal();
				
			SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost );

			LLAccountingCostObserver* observer = mObserverHandle.get();
			if (observer && observer->getTransactionID() == mTransactionID)
			{
				observer->onWeightsUpdate(selectionCost);
			}
		}

		clearPendingRequests();
	}
	void result( const LLSD& content )
	{
		//Check for error
		if ( !content.isMap() || content.has("error") )
		{
			llwarns	<< "Error on fetched data"<< llendl;
			clearPendingRequests();
		}
		else if (content.has("selected"))
		{
			F32 physicsCost		= 0.0f;
			F32 networkCost		= 0.0f;
			F32 simulationCost	= 0.0f;

			//LLTransactionID transactionID;
				
			//transactionID	= content["selected"][i]["local_id"].asUUID();
			physicsCost		= content["selected"]["physics"].asReal();
			networkCost		= content["selected"]["streaming"].asReal();
			simulationCost	= content["selected"]["simulation"].asReal();
				
			SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost );
					
		}

		clearPendingRequests();
	}