PageRenderTime 87ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llfloaterperms.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 61 lines | 27 code | 7 blank | 27 comment | 0 complexity | a002a761c3a4206cbc2d2575715832e4 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfloaterperms.h
  3. * @brief Asset creation permission preferences.
  4. * @author Coco
  5. *
  6. * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  7. * Second Life Viewer Source Code
  8. * Copyright (C) 2010, Linden Research, Inc.
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation;
  13. * version 2.1 of the License only.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. *
  24. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  25. * $/LicenseInfo$
  26. */
  27. #ifndef LL_LLFLOATERPERMPREFS_H
  28. #define LL_LLFLOATERPERMPREFS_H
  29. #include "llfloater.h"
  30. class LLFloaterPerms : public LLFloater
  31. {
  32. friend class LLFloaterReg;
  33. public:
  34. /*virtual*/ BOOL postBuild();
  35. void ok();
  36. void cancel();
  37. void onClickOK();
  38. void onClickCancel();
  39. void onCommitCopy();
  40. // Convenience methods to get current permission preference bitfields from saved settings:
  41. static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy"
  42. static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup"
  43. static U32 getNextOwnerPerms(std::string prefix=""); // bitfield for prefix + "NextOwner" + "Copy", "Modify", and "Transfer"
  44. private:
  45. LLFloaterPerms(const LLSD& seed);
  46. void refresh();
  47. BOOL // cached values only for implementing cancel.
  48. mShareWithGroup,
  49. mEveryoneCopy,
  50. mNextOwnerCopy,
  51. mNextOwnerModify,
  52. mNextOwnerTransfer;
  53. };
  54. #endif