PageRenderTime 33ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llregioninfomodel.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 99 lines | 45 code | 21 blank | 33 comment | 0 complexity | 008841c8fcfd88730ff284605ab0bd47 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llregioninfomodel.h
  3. * @brief Region info model
  4. *
  5. * $LicenseInfo:firstyear=2011&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2011, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLREGIONINFOMODEL_H
  27. #define LL_LLREGIONINFOMODEL_H
  28. class LLMessageSystem;
  29. #include "llsingleton.h"
  30. /**
  31. * Contains region info, notifies interested parties of its changes.
  32. */
  33. class LLRegionInfoModel : public LLSingleton<LLRegionInfoModel>
  34. {
  35. LOG_CLASS(LLRegionInfoModel);
  36. public:
  37. typedef boost::signals2::signal<void()> update_signal_t;
  38. boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb);
  39. void sendRegionTerrain(const LLUUID& invoice) const; /// upload region terrain data
  40. bool getUseFixedSun() const;
  41. void setUseFixedSun(bool fixed);
  42. // *TODO: Add getters and make the data private.
  43. U8 mSimAccess;
  44. U8 mAgentLimit;
  45. U32 mRegionFlags;
  46. U32 mEstateID;
  47. U32 mParentEstateID;
  48. S32 mPricePerMeter;
  49. S32 mRedirectGridX;
  50. S32 mRedirectGridY;
  51. F32 mBillableFactor;
  52. F32 mObjectBonusFactor;
  53. F32 mWaterHeight;
  54. F32 mTerrainRaiseLimit;
  55. F32 mTerrainLowerLimit;
  56. F32 mSunHour; // 6..30
  57. BOOL mUseEstateSun;
  58. std::string mSimName;
  59. std::string mSimType;
  60. protected:
  61. friend class LLSingleton<LLRegionInfoModel>;
  62. friend class LLViewerRegion;
  63. LLRegionInfoModel();
  64. /**
  65. * Refresh model with data from the incoming server message.
  66. */
  67. void update(LLMessageSystem* msg);
  68. private:
  69. void reset();
  70. // *FIXME: Duplicated code from LLPanelRegionInfo
  71. static void sendEstateOwnerMessage(
  72. LLMessageSystem* msg,
  73. const std::string& request,
  74. const LLUUID& invoice,
  75. const std::vector<std::string>& strings);
  76. update_signal_t mUpdateSignal;
  77. };
  78. #endif // LL_LLREGIONINFOMODEL_H