diff options
| author | prep <prep@lindenlab.com> | 2011-05-25 15:57:12 -0400 | 
|---|---|---|
| committer | prep <prep@lindenlab.com> | 2011-05-25 15:57:12 -0400 | 
| commit | 8e728befa57bcea0981179709dd5f13af1cd29a8 (patch) | |
| tree | af77815a4bfa3f0cbc481f62f74b4b5d6c17a4ae | |
| parent | 7392cf49bae155e7d53413e9f73143906ae8e310 (diff) | |
Sh-1647: Accounting caps update
| -rw-r--r-- | indra/llcommon/llaccountingquota.h | 26 | ||||
| -rw-r--r-- | indra/newview/llaccountingquotamanager.cpp | 98 | ||||
| -rw-r--r-- | indra/newview/llviewerregion.cpp | 5 | 
3 files changed, 78 insertions, 51 deletions
| diff --git a/indra/llcommon/llaccountingquota.h b/indra/llcommon/llaccountingquota.h index f52d94f868..567d02dac1 100644 --- a/indra/llcommon/llaccountingquota.h +++ b/indra/llcommon/llaccountingquota.h @@ -35,30 +35,38 @@  struct ParcelQuota  { -	ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost, -				F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost, -				F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost, -				F32 totalRenderCost, F32 totalPhysicsCost, F32 totalNetworkCost, F32 totalSimulationCost) +	ParcelQuota( F32 ownerRenderCost,	 F32 ownerPhysicsCost,	  F32 ownerNetworkCost,	   F32 ownerSimulationCost, +				 F32 groupRenderCost,	 F32 groupPhysicsCost,	  F32 groupNetworkCost,	   F32 groupSimulationCost, +				 F32 otherRenderCost,	 F32 otherPhysicsCost,	  F32 otherNetworkCost,	   F32 otherSimulationCost, +				 F32 tempRenderCost,	 F32 tempPhysicsCost,	  F32 tempNetworkCost,	   F32 tempSimulationCost, +				 F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost, +				 F32 parcelCapacity )  	: mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost )   	, mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost )  	, mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost )  	, mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost )  	, mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost )  	, mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost ) -	, mTotalRenderCost( totalRenderCost ), mTotalPhysicsCost( totalPhysicsCost )  -	, mTotalNetworkCost( totalNetworkCost ), mTotalSimulationCost( totalSimulationCost ) +	, mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost )  +	, mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost ) +	, mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost )  +	, mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost ) +	, mParcelCapacity( parcelCapacity )  	{  	} +  	ParcelQuota(){}			  	F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost;  	F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost;  	F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost; -	F32 mTotalRenderCost, mTotalPhysicsCost, mTotalNetworkCost, mTotalSimulationCost; +	F32 mTempRenderCost,  mTempPhysicsCost,  mTempNetworkCost,  mTempSimulationCost; +	F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost; +	F32 mParcelCapacity;  };  struct SelectionQuota  { -	SelectionQuota( S32 localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost ) +	SelectionQuota( LLUUID localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost )  	: mLocalId( localId)  	, mRenderCost( renderCost )  	, mPhysicsCost( physicsCost ) @@ -69,7 +77,7 @@ struct SelectionQuota  	SelectionQuota() {}  	F32 mRenderCost, mPhysicsCost, mNetworkCost, mSimulationCost;	 -	S32 mLocalId; +	LLUUID mLocalId;  };  #endif diff --git a/indra/newview/llaccountingquotamanager.cpp b/indra/newview/llaccountingquotamanager.cpp index ada74ea44c..9b77ada8b7 100644 --- a/indra/newview/llaccountingquotamanager.cpp +++ b/indra/newview/llaccountingquotamanager.cpp @@ -77,12 +77,10 @@ public:  			return;
  		}
 -		//Differentiate what the incoming caps could be from the data
 -		//bool VOContent  = content.has("Objects");
 +		//Differentiate what the incoming caps could be from the data	
  		bool containsParcel    = content.has("parcel");
  		bool containsSelection = content.has("selected");
 -		//bool VORegion   = content.has("region");
 -				
 +					
  		//Loop over the stored object ids checking against the incoming data
  		for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
  		{
 @@ -97,16 +95,17 @@ public:  					for(S32 i = 0; i < dataCount; i++)
  					{
  						//prep#todo verify that this is safe, otherwise just add a bool
 -						S32 parcelId = 0;
 -						S32 parcelOwner = 0;
 +						LLUUID parcelId;
 +						//S32 parcelOwner = 0;
  						if ( content["parcel"][i].has("parcel_id") )
  						{
 -							parcelId = content["parcel"][i]["parcel_id"].asInteger();
 -						}
 -						if ( content["parcel"][i].has("parcel_owner") )
 -						{
 -							parcelOwner = content["parcel"][i]["parcel_owner"].asInteger();
 +							parcelId = content["parcel"][i]["parcel_id"].asUUID();
  						}
 +						
 +						//if ( content["parcel"][i].has("parcel_owner") )
 +						//{
 +						//	parcelOwner = content["parcel"][i]["parcel_owner"].asInteger();
 +						//}
  						F32 ownerRenderCost		= 0;
  						F32 ownerPhysicsCost	= 0;
 @@ -123,48 +122,69 @@ public:  						F32 otherNetworkCost	= 0;
  						F32 otherSimulationCost = 0;
 -						F32 totalRenderCost		= 0;
 -						F32 totalPhysicsCost	= 0;
 -						F32 totalNetworkCost	= 0;
 -						F32 totalSimulationCost = 0;
 +						F32 tempRenderCost		= 0;
 +						F32 tempPhysicsCost		= 0;
 +						F32 tempNetworkCost		= 0;
 +						F32 tempSimulationCost  = 0;
 +						
 +						F32 selectedRenderCost		= 0;
 +						F32 selectedPhysicsCost		= 0;
 +						F32 selectedNetworkCost		= 0;
 +						F32 selectedSimulationCost  = 0;
 +						F32 parcelCapacity			= 0;
 +
 +						if ( content["parcel"][i].has("capacity") )
 +						{
 +							parcelCapacity =  content["parcel"][i].has("capacity");
 +						}
 +
  						if ( content["parcel"][i].has("owner") )
  						{
 -							ownerRenderCost		= content["parcel"][i]["owner"]["render"].asReal();
 +							ownerRenderCost		= content["parcel"][i]["owner"]["rendering"].asReal();
  							ownerPhysicsCost	= content["parcel"][i]["owner"]["physics"].asReal();
 -							ownerNetworkCost	= content["parcel"][i]["owner"]["network"].asReal();
 -							ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal();
 -							
 +							ownerNetworkCost	= content["parcel"][i]["owner"]["streaming"].asReal();
 +							ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal();							
  						}
 +
  						if ( content["parcel"][i].has("group") )
  						{
 -							groupRenderCost		= content["parcel"][i]["group"]["render"].asReal();
 +							groupRenderCost		= content["parcel"][i]["group"]["rendering"].asReal();
  							groupPhysicsCost	= content["parcel"][i]["group"]["physics"].asReal();
 -							groupNetworkCost	= content["parcel"][i]["group"]["network"].asReal();
 +							groupNetworkCost	= content["parcel"][i]["group"]["streaming"].asReal();
  							groupSimulationCost = content["parcel"][i]["group"]["simulation"].asReal();
  						}
  						if ( content["parcel"][i].has("other") )
  						{
 -							otherRenderCost		= content["parcel"][i]["other"]["render"].asReal();
 +							otherRenderCost		= content["parcel"][i]["other"]["rendering"].asReal();
  							otherPhysicsCost	= content["parcel"][i]["other"]["physics"].asReal();
 -							otherNetworkCost	= content["parcel"][i]["other"]["network"].asReal();
 +							otherNetworkCost	= content["parcel"][i]["other"]["streaming"].asReal();
  							otherSimulationCost = content["parcel"][i]["other"]["simulation"].asReal();
  						}
 -						if ( content["parcel"][i].has("total") )
 +						if ( content["parcel"][i].has("temp") )
  						{
 -							totalRenderCost		= content["parcel"][i]["total"]["render"].asReal();
 -							totalPhysicsCost	= content["parcel"][i]["total"]["physics"].asReal();
 -							totalNetworkCost	= content["parcel"][i]["total"]["network"].asReal();
 -							totalSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
 -							
 +							tempRenderCost		= content["parcel"][i]["total"]["rendering"].asReal();
 +							tempPhysicsCost		= content["parcel"][i]["total"]["physics"].asReal();
 +							tempNetworkCost		= content["parcel"][i]["total"]["streaming"].asReal();
 +							tempSimulationCost  = content["parcel"][i]["total"]["simulation"].asReal();							
 +						}
 +
 +						if ( content["parcel"][i].has("selected") )
 +						{
 +							selectedRenderCost		= content["parcel"][i]["total"]["rendering"].asReal();
 +							selectedPhysicsCost		= content["parcel"][i]["total"]["physics"].asReal();
 +							selectedNetworkCost		= content["parcel"][i]["total"]["streaming"].asReal();
 +							selectedSimulationCost  = content["parcel"][i]["total"]["simulation"].asReal();							
  						}
 -						ParcelQuota parcelQuota( ownerRenderCost, ownerPhysicsCost, ownerNetworkCost, ownerSimulationCost,
 -												 groupRenderCost, groupPhysicsCost, groupNetworkCost, groupSimulationCost,
 -												 otherRenderCost, otherPhysicsCost, otherNetworkCost, otherSimulationCost,
 -												 totalRenderCost, totalPhysicsCost, totalNetworkCost, totalSimulationCost );
 +						ParcelQuota parcelQuota( ownerRenderCost,	 ownerPhysicsCost,	  ownerNetworkCost,    ownerSimulationCost,
 +												 groupRenderCost,	 groupPhysicsCost,	  groupNetworkCost,    groupSimulationCost,
 +												 otherRenderCost,	 otherPhysicsCost,	  otherNetworkCost,    otherSimulationCost,
 +												 tempRenderCost,	 tempPhysicsCost,	  tempNetworkCost,	   tempSimulationCost,
 +												 selectedRenderCost, selectedPhysicsCost, selectedNetworkCost, selectedSimulationCost,
 +												 parcelCapacity );
  						//Update the Parcel						
  						LLParcel* pParcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
  						if ( pParcel )
 @@ -185,18 +205,18 @@ public:  					F32 networkCost		= 0;
  					F32 simulationCost	= 0;
 -					S32 localId = 0;
 +					LLUUID objectId;
 -					localId			= content["selected"][i]["local_id"].asInteger();
 -					renderCost		= content["selected"][i]["render"].asReal();
 +					objectId		= content["selected"][i]["local_id"].asUUID();
 +					renderCost		= content["selected"][i]["rendering"].asReal();
  					physicsCost		= content["selected"][i]["physics"].asReal();
 -					networkCost		= content["selected"][i]["network"].asReal();
 +					networkCost		= content["selected"][i]["streaming"].asReal();
  					simulationCost	= content["selected"][i]["simulation"].asReal();
 -					SelectionQuota selectionQuota( localId, renderCost, physicsCost, networkCost, simulationCost );
 +					SelectionQuota selectionQuota( objectId, renderCost, physicsCost, networkCost, simulationCost );
  					//Update the objects					
 -					//gObjectList.updateQuota( localId, selectionQuota ); 
 +					gObjectList.updateQuota( objectId, selectionQuota ); 
  				}
  			}
 diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index fb608b3a4f..c4ca5d37ce 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1480,6 +1480,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)  	LLSD capabilityNames = LLSD::emptyArray(); +	capabilityNames.append("AccountingParcel"); +	capabilityNames.append("AccountingSelection");  	capabilityNames.append("AttachmentResources");  	capabilityNames.append("AvatarPickerSearch");  	capabilityNames.append("ChatSessionRequest"); @@ -1546,9 +1548,6 @@ void LLViewerRegion::setSeedCapability(const std::string& url)  	capabilityNames.append("ViewerMetrics");  	capabilityNames.append("ViewerStartAuction");  	capabilityNames.append("ViewerStats"); -	//prep# Finalize these!!!!!!!!! -	capabilityNames.append("AccountingParcel"); -	capabilityNames.append("AccountingSelection");  	// Please add new capabilities alphabetically to reduce  	// merge conflicts. | 
