From b3b103efe59c347a7268d820876888fe9297d7dd Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 12 Nov 2019 22:26:10 +0000 Subject: SL-10498 - benefits info received at login, persisted in new LLAgentBenefits singleton. --- indra/newview/llagentbenefits.h | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 indra/newview/llagentbenefits.h (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h new file mode 100644 index 0000000000..0a8e33af28 --- /dev/null +++ b/indra/newview/llagentbenefits.h @@ -0,0 +1,57 @@ +/** +* @file llagentbenefits.h +* +* $LicenseInfo:firstyear=2019&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2019, 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_AGENTBENEFITS_H +#define LL_AGENTBENEFITS_H + +#include "llsingleton.h" +#include "llsd.h" + +class LLAgentBenefits: public LLSingleton +{ + LLSINGLETON(LLAgentBenefits); + ~LLAgentBenefits(); + LOG_CLASS(LLAgentBenefits); + +public: + bool init(const LLSD& benefits_sd); + + S32 getAnimatedObjectLimit() const; + S32 getAnimationUploadCost() const; + S32 getAttachmentLimit() const; + S32 getGroupMembershipLimit() const; + S32 getSoundUploadCost() const; + S32 getTextureUploadCost() const; + +private: + S32 m_animated_object_limit; + S32 m_animation_upload_cost; + S32 m_attachment_limit; + S32 m_group_membership_limit; + S32 m_sound_upload_cost; + S32 m_texture_upload_cost; +}; + +#endif -- cgit v1.2.3 From 7df0a4ddd0c48358e7152733aaba01464f2620be Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 14 Nov 2019 15:01:50 +0000 Subject: SL-10499, SL-10497 - use LLAgentBenefits info --- indra/newview/llagentbenefits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 0a8e33af28..995833149c 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -52,6 +52,8 @@ private: S32 m_group_membership_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; + + bool m_initalized; }; #endif -- cgit v1.2.3 From 65550520ed00699098b221a1166e4c1763333d58 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 15 Nov 2019 15:13:11 +0000 Subject: SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits. --- indra/newview/llagentbenefits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 995833149c..b21048e38b 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -41,6 +41,7 @@ public: S32 getAnimatedObjectLimit() const; S32 getAnimationUploadCost() const; S32 getAttachmentLimit() const; + S32 getCreateGroupCost() const; S32 getGroupMembershipLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; @@ -49,6 +50,7 @@ private: S32 m_animated_object_limit; S32 m_animation_upload_cost; S32 m_attachment_limit; + S32 m_create_group_cost; S32 m_group_membership_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; -- cgit v1.2.3 From d12e10be377e692f5164ba914b8f038e66b0d45c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 18 Nov 2019 17:15:11 +0000 Subject: SL-10499 - bulk upload behavior adjusted to account for possibly different upload prices for different asset types. Also added a confirmation dialog for bulk upload. --- indra/newview/llagentbenefits.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index b21048e38b..7ed6e169ce 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -28,6 +28,7 @@ #include "llsingleton.h" #include "llsd.h" +#include "llassettype.h" class LLAgentBenefits: public LLSingleton { @@ -45,6 +46,8 @@ public: S32 getGroupMembershipLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; + + bool findUploadCost(LLAssetType::EType& asset_type, S32& cost); private: S32 m_animated_object_limit; -- cgit v1.2.3 From 4300b204f0fc519d3e2dabc7e1296284e5908611 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Nov 2019 14:03:57 +0000 Subject: SL-10499 - handle package info from benefits service --- indra/newview/llagentbenefits.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 7ed6e169ce..9338bc1c26 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -30,13 +30,13 @@ #include "llsd.h" #include "llassettype.h" -class LLAgentBenefits: public LLSingleton +class LLAgentBenefits { - LLSINGLETON(LLAgentBenefits); +public: + LLAgentBenefits(); ~LLAgentBenefits(); LOG_CLASS(LLAgentBenefits); -public: bool init(const LLSD& benefits_sd); S32 getAnimatedObjectLimit() const; @@ -47,7 +47,7 @@ public: S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; - bool findUploadCost(LLAssetType::EType& asset_type, S32& cost); + bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const; private: S32 m_animated_object_limit; @@ -61,4 +61,24 @@ private: bool m_initalized; }; +class LLAgentBenefitsMgr: public LLSingleton +{ + LLSINGLETON(LLAgentBenefitsMgr); + ~LLAgentBenefitsMgr(); + LOG_CLASS(LLAgentBenefitsMgr); + +public: + static const LLAgentBenefits& current(); + static const LLAgentBenefits& get(const std::string& package); + static bool init(const std::string& package, const LLSD& benefits_sd); + static bool initCurrent(const std::string& package, const LLSD& benefits_sd); + static bool has(const std::string& package); + +private: + LLAgentBenefits mCurrent; + LLAgentBenefits mDefault; + std::map mPackageMap; +}; + + #endif -- cgit v1.2.3 From 5eecc6cad91136434b2cd22202392afbd5e37f25 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Nov 2019 20:23:33 +0000 Subject: SL-10499 - Added picks_limit to benefits info. Will be needed in profiles eventually. --- indra/newview/llagentbenefits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 9338bc1c26..680b1e7b07 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -44,6 +44,7 @@ public: S32 getAttachmentLimit() const; S32 getCreateGroupCost() const; S32 getGroupMembershipLimit() const; + S32 getPicksLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; @@ -55,6 +56,7 @@ private: S32 m_attachment_limit; S32 m_create_group_cost; S32 m_group_membership_limit; + S32 m_picks_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; -- cgit v1.2.3 From 9621dd8bbd1697b119574bcc879345f03b42969e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 22 Nov 2019 20:18:30 +0200 Subject: SL-12100 Premium Enhancements - Changes to rates to create Groups, UI Work --- indra/newview/llagentbenefits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llagentbenefits.h') diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 680b1e7b07..48aa6bd869 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -75,8 +75,10 @@ public: static bool init(const std::string& package, const LLSD& benefits_sd); static bool initCurrent(const std::string& package, const LLSD& benefits_sd); static bool has(const std::string& package); + static bool isCurrent(const std::string& package); private: + std::string mCurrentName; LLAgentBenefits mCurrent; LLAgentBenefits mDefault; std::map mPackageMap; -- cgit v1.2.3