llproductinforequest.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * @file llproductinforequest.h
  3. * @author Kent Quirk
  4. * @brief Get region type descriptions (translation from SKU to description)
  5. *
  6. * $LicenseInfo:firstyear=2009&license=viewergpl$
  7. *
  8. * Copyright (c) 2009, Linden Research, Inc.
  9. *
  10. * Second Life Viewer Source Code
  11. * The source code in this file ("Source Code") is provided by Linden Lab
  12. * to you under the terms of the GNU General Public License, version 2.0
  13. * ("GPL"), unless you have obtained a separate licensing agreement
  14. * ("Other License"), formally executed by you and Linden Lab. Terms of
  15. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  16. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  17. *
  18. * There are special exceptions to the terms and conditions of the GPL as
  19. * it is applied to this Source Code. View the full text of the exception
  20. * in the file doc/FLOSS-exception.txt in this software distribution, or
  21. * online at
  22. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  23. *
  24. * By copying, modifying or distributing this software, you acknowledge
  25. * that you have read and understood your obligations described above,
  26. * and agree to abide by those obligations.
  27. *
  28. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  29. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  30. * COMPLETENESS OR PERFORMANCE.
  31. * $/LicenseInfo$
  32. */
  33. #ifndef LL_LLPRODUCTINFOREQUEST_H
  34. #define LL_LLPRODUCTINFOREQUEST_H
  35. #include "llsd.h"
  36. #include "llsingleton.h"
  37. // This is a singleton to manage a cache of information about land types. The
  38. // land system provides a capability to get information about the set of
  39. // possible land sku, name, and description information. We use description in
  40. // the UI, but the sku is provided in the various messages; this tool provides
  41. // translation between the systems.
  42. class LLProductInfoRequestManager : public LLSingleton<LLProductInfoRequestManager>
  43. {
  44. friend class LLSingleton<LLProductInfoRequestManager>;
  45. protected:
  46. LOG_CLASS(LLProductInfoRequestManager);
  47. public:
  48. LLProductInfoRequestManager();
  49. std::string getDescriptionForSku(const std::string& sku);
  50. LL_INLINE void create() {}
  51. private:
  52. void initSingleton();
  53. void getLandDescriptionsCoro(const std::string& url);
  54. private:
  55. LLSD mSkuDescriptions;
  56. };
  57. #endif // LL_LLPRODUCTINFOREQUEST_H