PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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