/indra/newview/llgroupactions.h

https://bitbucket.org/lindenlab/viewer-beta/ · C Header · 119 lines · 27 code · 19 blank · 73 comment · 0 complexity · 95085bc3d841ea84de0dba9e2c72ad36 MD5 · raw file

  1. /**
  2. * @file llgroupactions.h
  3. * @brief Group-related actions (join, leave, new, delete, etc)
  4. *
  5. * $LicenseInfo:firstyear=2009&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, 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_LLGROUPACTIONS_H
  27. #define LL_LLGROUPACTIONS_H
  28. #include "llsd.h"
  29. #include "lluuid.h"
  30. /**
  31. * Group-related actions (join, leave, new, delete, etc)
  32. */
  33. class LLGroupActions
  34. {
  35. public:
  36. /**
  37. * Invokes group search floater.
  38. */
  39. static void search();
  40. /// Join a group. Assumes LLGroupMgr has data for that group already.
  41. static void join(const LLUUID& group_id);
  42. /**
  43. * Invokes "Leave Group" floater.
  44. */
  45. static void leave(const LLUUID& group_id);
  46. /**
  47. * Activate group.
  48. */
  49. static void activate(const LLUUID& group_id);
  50. /**
  51. * Show group information panel.
  52. */
  53. static void show(const LLUUID& group_id);
  54. /**
  55. * Show group inspector floater.
  56. */
  57. static void inspect(const LLUUID& group_id);
  58. /**
  59. * Refresh group information panel.
  60. */
  61. static void refresh(const LLUUID& group_id);
  62. /**
  63. * Refresh group notices panel.
  64. */
  65. static void refresh_notices();
  66. /**
  67. * Refresh group information panel.
  68. */
  69. static void createGroup();
  70. /**
  71. * Close group information panel.
  72. */
  73. static void closeGroup (const LLUUID& group_id);
  74. /**
  75. * Start group instant messaging session.
  76. */
  77. static LLUUID startIM(const LLUUID& group_id);
  78. /**
  79. * End group instant messaging session.
  80. */
  81. static void endIM(const LLUUID& group_id);
  82. /// Returns if the current user is a member of the group
  83. static bool isInGroup(const LLUUID& group_id);
  84. /**
  85. * Start a group voice call.
  86. */
  87. static void startCall(const LLUUID& group_id);
  88. /**
  89. * Returns true if avatar is in group.
  90. *
  91. * Note that data about group members is loaded from server.
  92. * If data has not been loaded yet, function will return inaccurate result.
  93. * See LLGroupMgr::sendGroupMembersRequest
  94. */
  95. static bool isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID& avatar_id);
  96. private:
  97. static bool onJoinGroup(const LLSD& notification, const LLSD& response);
  98. static bool onLeaveGroup(const LLSD& notification, const LLSD& response);
  99. };
  100. #endif // LL_LLGROUPACTIONS_H