From b9247373fbbbc45aeb82017feb2e6c687d65a5b5 Mon Sep 17 00:00:00 2001 From: prep linden Date: Tue, 2 Aug 2011 17:01:46 -0400 Subject: Sh-2129 Viewer caps implementation for resource cost selected. Also cleanup of old code related to earlier accounting work. --- indra/newview/llaccountingcostmanager.h | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 indra/newview/llaccountingcostmanager.h (limited to 'indra/newview/llaccountingcostmanager.h') diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h new file mode 100644 index 0000000000..8ae696a98d --- /dev/null +++ b/indra/newview/llaccountingcostmanager.h @@ -0,0 +1,55 @@ +/** + * @file lllAccountingQuotaManager.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_ACCOUNTINGQUOTAMANAGER_H +#define LL_ACCOUNTINGQUOTAMANAGER_H +//=============================================================================== +#include "llaccountingcost.h" +//=============================================================================== +class LLAccountingCostManager : public LLSingleton +{ +public: + //Ctor + LLAccountingCostManager(); + //Store an object that will be eventually fetched + void addObject( const LLUUID& objectID ); + //Request quotas for object list + void fetchCosts( eSelectionType selectionType, const std::string& url ); + //Delete a specific object from the pending list + void removePendingObject( const LLUUID& objectID ); + +private: + //Set of objects that will be used to generate a cost + std::set mObjectList; + //During fetchCosts we move object into a the pending set to signify that + //a fetch has been instigated. + std::set mPendingObjectQuota; + typedef std::set::iterator IDIt; +}; +//=============================================================================== + +#endif // LLACCOUNTINGCOSTMANAGER + -- cgit v1.2.3 From 543df6736fb0ae312b9a5e056a35bf8fffd2b6c9 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 17 Aug 2011 01:42:21 +0300 Subject: SH-2171 FIXED New prim weights added to weights detail floater. - Fixed detecting cross-parcel objects selection. - Various fixes in LLAccountingCostManager. - getSelectedObjectRenderCost() moved from LLFloaterTools to LLObjectSelection where it used to reside. Previous commented out implementation of this method removed. --- indra/newview/llaccountingcostmanager.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llaccountingcostmanager.h') diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h index 8ae696a98d..cccdc2e2d9 100644 --- a/indra/newview/llaccountingcostmanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -27,8 +27,24 @@ #ifndef LL_ACCOUNTINGQUOTAMANAGER_H #define LL_ACCOUNTINGQUOTAMANAGER_H //=============================================================================== +#include "llhandle.h" + #include "llaccountingcost.h" //=============================================================================== +// An interface class for panels which display the parcel accounting information. +class LLAccountingCostObserver +{ +public: + LLAccountingCostObserver() { mObserverHandle.bind(this); } + virtual ~LLAccountingCostObserver() {} + virtual void onWeightsUpdate(const SelectionCost& selection_cost) = 0; + virtual void setErrorStatus(U32 status, const std::string& reason) = 0; + const LLHandle& getObserverHandle() const { return mObserverHandle; } + +protected: + LLRootHandle mObserverHandle; +}; +//=============================================================================== class LLAccountingCostManager : public LLSingleton { public: @@ -37,7 +53,8 @@ public: //Store an object that will be eventually fetched void addObject( const LLUUID& objectID ); //Request quotas for object list - void fetchCosts( eSelectionType selectionType, const std::string& url ); + void fetchCosts( eSelectionType selectionType, const std::string& url, + const LLHandle& observer_handle ); //Delete a specific object from the pending list void removePendingObject( const LLUUID& objectID ); @@ -52,4 +69,3 @@ private: //=============================================================================== #endif // LLACCOUNTINGCOSTMANAGER - -- cgit v1.2.3 From 056015963290e47e03972e17ce6d603f8f940fe3 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Mon, 22 Aug 2011 23:41:54 +0300 Subject: SH-2171 ADDITIONAL FIX Added transaction ID to object weights requests to avoid updating the floater upon outdated or mixed up replies arrival. --- indra/newview/llaccountingcostmanager.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llaccountingcostmanager.h') diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h index cccdc2e2d9..0bca1f54ef 100644 --- a/indra/newview/llaccountingcostmanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -40,9 +40,13 @@ public: virtual void onWeightsUpdate(const SelectionCost& selection_cost) = 0; virtual void setErrorStatus(U32 status, const std::string& reason) = 0; const LLHandle& getObserverHandle() const { return mObserverHandle; } + const LLUUID& getTransactionID() { return mTransactionID; } protected: + virtual void generateTransactionID() = 0; + LLRootHandle mObserverHandle; + LLUUID mTransactionID; }; //=============================================================================== class LLAccountingCostManager : public LLSingleton -- cgit v1.2.3