diff options
author | prep linden <prep@lindenlab.com> | 2011-08-02 17:01:46 -0400 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2011-08-02 17:01:46 -0400 |
commit | b9247373fbbbc45aeb82017feb2e6c687d65a5b5 (patch) | |
tree | 1bcccc6bc92981c5dc149c8d9dd229a4146ba5c4 /indra | |
parent | fdcf43e0b3482eace09b5d2a1dbd9ff0b4dffdc2 (diff) |
Sh-2129 Viewer caps implementation for resource cost selected. Also cleanup of old code related to earlier accounting work.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llcommon/llaccountingquota.h | 80 | ||||
-rw-r--r-- | indra/llinventory/llparcel.cpp | 9 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 5 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/newview/llaccountingcostmanager.cpp | 170 | ||||
-rw-r--r-- | indra/newview/llaccountingcostmanager.h (renamed from indra/newview/llaccountingquotamanager.h) | 20 | ||||
-rw-r--r-- | indra/newview/llaccountingquotamanager.cpp | 278 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 7 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 7 |
14 files changed, 185 insertions, 417 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 9910281b64..8d1dd7a606 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -115,7 +115,7 @@ set(llcommon_HEADER_FILES indra_constants.h linden_common.h linked_lists.h - llaccountingquota.h + llaccountingcost.h llallocator.h llallocator_heap_profile.h llagentconstants.h diff --git a/indra/llcommon/llaccountingquota.h b/indra/llcommon/llaccountingquota.h deleted file mode 100644 index 140333de07..0000000000 --- a/indra/llcommon/llaccountingquota.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file llaccountingquota.h - * @ - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_ACCOUNTINGQUOTA_H -#define LL_ACCOUNTINGQUOTA_H - -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 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 ) - , 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 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost; - F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost; - F32 mParcelCapacity; -}; - -struct SelectionQuota -{ - SelectionQuota( LLUUID localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost ) - : mLocalId( localId) - , mRenderCost( renderCost ) - , mPhysicsCost( physicsCost ) - , mNetworkCost( networkCost ) - , mSimulationCost( simulationCost ) - { - } - SelectionQuota() {} - - F32 mRenderCost, mPhysicsCost, mNetworkCost, mSimulationCost; - LLUUID mLocalId; -}; - -#endif - - - diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index c95f922301..433076c7a9 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1373,12 +1373,3 @@ LLParcel::ECategory category_ui_string_to_category(const std::string& s) // is a distinct option from "None" and "Other" return LLParcel::C_ANY; } - -void LLParcel::updateQuota( const LLUUID& objectId, const ParcelQuota& quota ) -{ - if ( mID == objectId ) - { - mQuota = quota; - } -} - diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index ff35caab4c..e36d0b20d2 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -34,7 +34,6 @@ #include "llpermissions.h" #include "lltimer.h" #include "v3math.h" -#include "llaccountingquota.h" // Grid out of which parcels taken is stepped every 4 meters. const F32 PARCEL_GRID_STEP_METERS = 4.f; @@ -603,9 +602,6 @@ public: BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; } - void updateQuota( const LLUUID& objectId, const ParcelQuota& quota ); - const ParcelQuota& getQuota( void ) { return mQuota; } - protected: LLUUID mID; LLUUID mOwnerID; @@ -681,7 +677,6 @@ protected: BOOL mAllowGroupAVSounds; BOOL mAllowAnyAVSounds; - ParcelQuota mQuota; public: // HACK, make private diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f2a9ccacec..74bda4cb1c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -77,7 +77,7 @@ include_directories( set(viewer_SOURCE_FILES groupchatlistener.cpp - llaccountingquotamanager.cpp + llaccountingcostmanager.cpp llagent.cpp llagentaccess.cpp llagentcamera.cpp @@ -639,7 +639,7 @@ set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake groupchatlistener.h - llaccountingquotamanager.h + llaccountingcostmanager.h llagent.h llagentaccess.h llagentcamera.h diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp new file mode 100644 index 0000000000..5059efbeec --- /dev/null +++ b/indra/newview/llaccountingcostmanager.cpp @@ -0,0 +1,170 @@ +/** + * @file LLAccountingQuotaManager.cpp + * @ Handles the setting and accessing for costs associated with mesh + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llaccountingcostmanager.h" +#include "llagent.h" +#include "llcurl.h" +#include "llhttpclient.h" + +//=============================================================================== +LLAccountingCostManager::LLAccountingCostManager() +{ +} +//=============================================================================== +class LLAccountingCostResponder : public LLCurl::Responder +{ +public: + LLAccountingCostResponder( const LLSD& objectIDs ) + : mObjectIDs( objectIDs ) + { + } + + void clearPendingRequests ( void ) + { + for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) + { + LLAccountingCostManager::getInstance()->removePendingObject( iter->asUUID() ); + } + } + + void error( U32 statusNum, const std::string& reason ) + { + llwarns << "Transport error "<<reason<<llendl; + clearPendingRequests(); + } + + void result( const LLSD& content ) + { + //Check for error + if ( !content.isMap() || content.has("error") ) + { + llwarns << "Error on fetched data"<< llendl; + clearPendingRequests(); + return; + } + + bool containsSelection = content.has("selected"); + if ( containsSelection ) + { + S32 dataCount = content["selected"].size(); + + for(S32 i = 0; i < dataCount; i++) + { + + F32 physicsCost = 0.0f; + F32 networkCost = 0.0f; + F32 simulationCost = 0.0f; + + //LLTransactionID transactionID; + + //transactionID = content["selected"][i]["local_id"].asUUID(); + physicsCost = content["selected"][i]["physics"].asReal(); + networkCost = content["selected"][i]["streaming"].asReal(); + simulationCost = content["selected"][i]["simulation"].asReal(); + + SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost ); + + //How do you want to handle the updating of the invoking object/ui element? + + } + } + } + +private: + //List of posted objects + LLSD mObjectIDs; +}; +//=============================================================================== +void LLAccountingCostManager::fetchCosts( eSelectionType selectionType, const std::string& url ) +{ + // Invoking system must have already determined capability availability + if ( !url.empty() ) + { + LLSD objectList; + U32 objectIndex = 0; + + IDIt IDIter = mObjectList.begin(); + IDIt IDIterEnd = mObjectList.end(); + + for ( ; IDIter != IDIterEnd; ++IDIter ) + { + // Check to see if a request for this object has already been made. + if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() ) + { + mObjectList.insert( *IDIter ); + objectList[objectIndex++] = *IDIter; + } + } + + mObjectList.clear(); + + //Post results + if ( objectList.size() > 0 ) + { + std::string keystr; + if ( selectionType == Roots ) + { + keystr="selected_roots"; + } + else + if ( selectionType == Prims ) + { + keystr="prim_roots"; + } + else + { + llinfos<<"Invalid selection type "<<llendl; + mObjectList.clear(); + mPendingObjectQuota.clear(); + return; + } + + LLSD dataToPost = LLSD::emptyMap(); + dataToPost[keystr.c_str()] = objectList; + + LLHTTPClient::post( url, dataToPost, new LLAccountingCostResponder( objectList )); + } + } + else + { + //url was empty - warn & continue + llwarns<<"Supplied url is empty "<<llendl; + mObjectList.clear(); + mPendingObjectQuota.clear(); + } +} +//=============================================================================== +void LLAccountingCostManager::addObject( const LLUUID& objectID ) +{ + mObjectList.insert( objectID ); +} +//=============================================================================== +void LLAccountingCostManager::removePendingObject( const LLUUID& objectID ) +{ + mPendingObjectQuota.erase( objectID ); +} +//=============================================================================== diff --git a/indra/newview/llaccountingquotamanager.h b/indra/newview/llaccountingcostmanager.h index 9251ef9351..8ae696a98d 100644 --- a/indra/newview/llaccountingquotamanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -27,29 +27,29 @@ #ifndef LL_ACCOUNTINGQUOTAMANAGER_H #define LL_ACCOUNTINGQUOTAMANAGER_H //=============================================================================== -#include "llaccountingquota.h" +#include "llaccountingcost.h" //=============================================================================== -class LLAccountingQuotaManager : public LLSingleton<LLAccountingQuotaManager> +class LLAccountingCostManager : public LLSingleton<LLAccountingCostManager> { public: //Ctor - LLAccountingQuotaManager(); + LLAccountingCostManager(); //Store an object that will be eventually fetched - void updateObjectCost( const LLUUID& objectID ); + void addObject( const LLUUID& objectID ); //Request quotas for object list - void fetchQuotas( const std::string& url ); + void fetchCosts( eSelectionType selectionType, const std::string& url ); //Delete a specific object from the pending list - void removePendingObjectQuota( const LLUUID& objectID ); + void removePendingObject( const LLUUID& objectID ); private: - //Set of objects that need to update their cost - std::set<LLUUID> mUpdateObjectQuota; - //During fetchQuota we move object into a the pending set to signify that + //Set of objects that will be used to generate a cost + std::set<LLUUID> mObjectList; + //During fetchCosts we move object into a the pending set to signify that //a fetch has been instigated. std::set<LLUUID> mPendingObjectQuota; typedef std::set<LLUUID>::iterator IDIt; }; //=============================================================================== -#endif // LLACCOUNTINGQUOTAMANAGER +#endif // LLACCOUNTINGCOSTMANAGER diff --git a/indra/newview/llaccountingquotamanager.cpp b/indra/newview/llaccountingquotamanager.cpp deleted file mode 100644 index a4f5de5632..0000000000 --- a/indra/newview/llaccountingquotamanager.cpp +++ /dev/null @@ -1,278 +0,0 @@ -/** - * @file LLAccountingQuotaManager.cpp - * @ Handles the setting and accessing for costs associated with mesh - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" -#include "llaccountingquotamanager.h" -#include "llagent.h" -#include "llviewerregion.h" -#include "llviewerobject.h" -#include "llviewerobjectlist.h" -#include "llviewerparcelmgr.h" -#include "llparcel.h" - -//=============================================================================== -LLAccountingQuotaManager::LLAccountingQuotaManager() -{ -} -//=============================================================================== -class LLAccountingQuotaResponder : public LLCurl::Responder -{ -public: - LLAccountingQuotaResponder( const LLSD& objectIDs ) - : mObjectIDs( objectIDs ) - { - } - - void clearPendingRequests ( void ) - { - for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) - { - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( iter->asUUID() ); - } - } - - void error( U32 statusNum, const std::string& reason ) - { - llwarns << "Transport error "<<reason<<llendl; - //prep#do we really want to remove all because of one failure - verify - clearPendingRequests(); - } - - void result( const LLSD& content ) - { - if ( !content.isMap() || content.has("error") ) - { - llwarns << "Error on fetched data"<< llendl; - //prep#do we really want to remove all because of one failure - verify - clearPendingRequests(); - return; - } - - //Differentiate what the incoming caps could be from the data - bool containsParcel = content.has("parcel"); - bool containsSelection = content.has("selected"); - - //Loop over the stored object ids checking against the incoming data - for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) - { - LLUUID objectID = iter->asUUID(); - - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID ); - - if ( containsParcel ) - { - //Typically should be one - S32 dataCount = content["parcel"].size(); - for(S32 i = 0; i < dataCount; i++) - { - //prep#todo verify that this is safe, otherwise just add a bool - LLUUID parcelId; - //S32 parcelOwner = 0; - if ( content["parcel"][i].has("parcel_id") ) - { - 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; - F32 ownerNetworkCost = 0; - F32 ownerSimulationCost = 0; - - F32 groupRenderCost = 0; - F32 groupPhysicsCost = 0; - F32 groupNetworkCost = 0; - F32 groupSimulationCost = 0; - - F32 otherRenderCost = 0; - F32 otherPhysicsCost = 0; - F32 otherNetworkCost = 0; - F32 otherSimulationCost = 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"]["rendering"].asReal(); - ownerPhysicsCost = content["parcel"][i]["owner"]["physics"].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"]["rendering"].asReal(); - groupPhysicsCost = content["parcel"][i]["group"]["physics"].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"]["rendering"].asReal(); - otherPhysicsCost = content["parcel"][i]["other"]["physics"].asReal(); - otherNetworkCost = content["parcel"][i]["other"]["streaming"].asReal(); - otherSimulationCost = content["parcel"][i]["other"]["simulation"].asReal(); - } - - if ( content["parcel"][i].has("temp") ) - { - 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, - tempRenderCost, tempPhysicsCost, tempNetworkCost, tempSimulationCost, - selectedRenderCost, selectedPhysicsCost, selectedNetworkCost, selectedSimulationCost, - parcelCapacity ); - //Update the Parcel - LLParcel* pParcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); - if ( pParcel ) - { - pParcel->updateQuota( objectID, parcelQuota ); - } - } - } - else - if ( containsSelection ) - { - S32 dataCount = content["selected"].size(); - for(S32 i = 0; i < dataCount; i++) - { - - F32 renderCost = 0; - F32 physicsCost = 0; - F32 networkCost = 0; - F32 simulationCost = 0; - - LLUUID objectId; - - objectId = content["selected"][i]["local_id"].asUUID(); - renderCost = content["selected"][i]["rendering"].asReal(); - physicsCost = content["selected"][i]["physics"].asReal(); - networkCost = content["selected"][i]["streaming"].asReal(); - simulationCost = content["selected"][i]["simulation"].asReal(); - - SelectionQuota selectionQuota( objectId, renderCost, physicsCost, networkCost, simulationCost ); - - //Update the objects - gObjectList.updateQuota( objectId, selectionQuota ); - - } - } - else - { - //Nothing in string - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID ); - } - } - } - -private: - //List of posted objects - LLSD mObjectIDs; -}; -//=============================================================================== -void LLAccountingQuotaManager::fetchQuotas( const std::string& url ) -{ - // Invoking system must have already determined capability availability - if ( !url.empty() ) - { - LLSD objectList; - U32 objectIndex = 0; - IDIt IDIter = mUpdateObjectQuota.begin(); - IDIt IDIterEnd = mUpdateObjectQuota.end(); - - for ( ; IDIter != IDIterEnd; ++IDIter ) - { - // Check to see if a request for this object has already been made. - if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() ) - { - mPendingObjectQuota.insert( *IDIter ); - objectList[objectIndex++] = *IDIter; - } - } - - mUpdateObjectQuota.clear(); - - //Post results - if ( objectList.size() > 0 ) - { - LLSD dataToPost = LLSD::emptyMap(); - dataToPost["object_ids"] = objectList; - LLHTTPClient::post( url, dataToPost, new LLAccountingQuotaResponder( objectList )); - } - } - else - { - //url was empty - warn & continue - llwarns<<"Supplied url is empty "<<llendl; - mUpdateObjectQuota.clear(); - mPendingObjectQuota.clear(); - } -} -//=============================================================================== -void LLAccountingQuotaManager::updateObjectCost( const LLUUID& objectID ) -{ - mUpdateObjectQuota.insert( objectID ); -} -//=============================================================================== -void LLAccountingQuotaManager::removePendingObjectQuota( const LLUUID& objectID ) -{ - mPendingObjectQuota.erase( objectID ); -} -//=============================================================================== diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 9121e80a4e..00a0da3cde 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -84,7 +84,6 @@ #include "llviewerwindow.h" #include "llvovolume.h" #include "lluictrlfactory.h" -#include "llaccountingquotamanager.h" #include "llmeshrepository.h" // Globals diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b5fdca632b..af2ceee0b7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,7 +100,6 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" -#include "llaccountingquota.h" //#define DEBUG_UPDATE_TYPE @@ -5785,9 +5784,3 @@ public: LLHTTPRegistration<ObjectPhysicsProperties> gHTTPRegistrationObjectPhysicsProperties("/message/ObjectPhysicsProperties"); - -void LLViewerObject::updateQuota( const SelectionQuota& quota ) -{ - //update quotas - mSelectionQuota = quota; -} diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1828a64917..cf2975b3b0 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -43,7 +43,6 @@ #include "v3dmath.h" #include "v3math.h" #include "llvertexbuffer.h" -#include "llaccountingquota.h" #include "llbbox.h" class LLAgent; // TODO: Get rid of this. @@ -655,9 +654,7 @@ protected: void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id); public: - void updateQuota( const SelectionQuota& quota ); - const SelectionQuota& getQuota( void ) { return mSelectionQuota; } - + private: void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string void deleteTEImages(); // correctly deletes list of images @@ -719,8 +716,6 @@ protected: F32 mPhysicsCost; F32 mLinksetPhysicsCost; - SelectionQuota mSelectionQuota; - bool mCostStale; mutable bool mPhysicsShapeUnknown; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 9d38954d8b..722bb30023 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1425,15 +1425,6 @@ void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id) mPendingObjectCost.erase(object_id); } -void LLViewerObjectList::updateQuota( const LLUUID& objectId, const SelectionQuota& quota ) -{ - LLViewerObject* pVO = findObject( objectId ); - if ( pVO ) - { - pVO->updateQuota( quota ); - } -} - void LLViewerObjectList::updatePhysicsFlags(const LLViewerObject* object) { mStalePhysicsFlags.insert(object->getID()); diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 9d1b5cb56f..c5f2a2c1ee 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -36,7 +36,6 @@ // project includes #include "llviewerobject.h" -#include "llaccountingquota.h" class LLCamera; class LLNetMap; @@ -102,8 +101,6 @@ public: F32 restitution, F32 gravity_multiplier); - void updateQuota( const LLUUID& objectId, const SelectionQuota& costs ); - void shiftObjects(const LLVector3 &offset); void repartitionObjects(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 5be2234ec2..ce73164dd2 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1484,8 +1484,6 @@ void LLViewerRegion::unpackRegionHandshake() void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { - capabilityNames.append("AccountingParcel"); - capabilityNames.append("AccountingSelection"); capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); capabilityNames.append("ChatSessionRequest"); @@ -1525,6 +1523,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ProvisionVoiceAccountRequest"); capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RequestTextureDownload"); + capabilityNames.append("ResourceCostSelected"); capabilityNames.append("SearchStatRequest"); capabilityNames.append("SearchStatTracking"); capabilityNames.append("SendPostcard"); @@ -1550,10 +1549,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); - //prep# Finalize these!!!!!!!!! - //capabilityNames.append("AccountingVO"); - capabilityNames.append("AccountingParcel"); - capabilityNames.append("AccountingRegion"); // Please add new capabilities alphabetically to reduce // merge conflicts. |