summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgroupmgr.h')
-rwxr-xr-xindra/newview/llgroupmgr.h79
1 files changed, 60 insertions, 19 deletions
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 9b62ecac48..970d6d5a2d 100755
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -33,8 +33,10 @@
#include <string>
#include <map>
+// Forward Declarations
class LLMessageSystem;
-
+class LLGroupRoleData;
+class LLGroupMgr;
enum LLGroupChange
{
@@ -43,6 +45,7 @@ enum LLGroupChange
GC_ROLE_DATA,
GC_ROLE_MEMBER_DATA,
GC_TITLES,
+ GC_BANLIST,
GC_ALL
};
@@ -65,8 +68,6 @@ public:
virtual void changed(const LLUUID& group_id, LLGroupChange gc) = 0;
};
-class LLGroupRoleData;
-
class LLGroupMemberData
{
friend class LLGroupMgrGroupData;
@@ -201,6 +202,17 @@ struct lluuid_pair_less
}
};
+
+struct LLGroupBanData
+{
+ LLGroupBanData(): mBanDate() {}
+ ~LLGroupBanData() {}
+
+ LLDate mBanDate;
+ // TODO: std:string ban_reason;
+};
+
+
struct LLGroupTitle
{
std::string mTitle;
@@ -208,8 +220,6 @@ struct LLGroupTitle
BOOL mSelected;
};
-class LLGroupMgr;
-
class LLGroupMgrGroupData
{
friend class LLGroupMgr;
@@ -239,11 +249,11 @@ public:
void recalcAllAgentPowers();
void recalcAgentPowers(const LLUUID& agent_id);
- BOOL isMemberDataComplete() { return mMemberDataComplete; }
- BOOL isRoleDataComplete() { return mRoleDataComplete; }
- BOOL isRoleMemberDataComplete() { return mRoleMemberDataComplete; }
- BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
-
+ bool isMemberDataComplete() { return mMemberDataComplete; }
+ bool isRoleDataComplete() { return mRoleDataComplete; }
+ bool isRoleMemberDataComplete() { return mRoleMemberDataComplete; }
+ bool isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
+
bool isSingleMemberNotOwner();
F32 getAccessTime() const { return mAccessTime; }
@@ -251,17 +261,26 @@ public:
const LLUUID& getMemberVersion() const { return mMemberVersion; }
+ void clearBanList() { mBanList.clear(); }
+ void getBanList(const LLUUID& group_id, LLGroupBanData& ban_data);
+ const LLGroupBanData& getBanEntry(const LLUUID& ban_id) { return mBanList[ban_id]; }
+
+ void createBanEntry(const LLUUID& ban_id, const LLGroupBanData& ban_data = LLGroupBanData());
+ void removeBanEntry(const LLUUID& ban_id);
+
+
public:
typedef std::map<LLUUID,LLGroupMemberData*> member_list_t;
typedef std::map<LLUUID,LLGroupRoleData*> role_list_t;
typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map_t;
typedef std::map<LLUUID,LLRoleData> role_data_map_t;
+ typedef std::map<LLUUID,LLGroupBanData> ban_list_t;
+
member_list_t mMembers;
role_list_t mRoles;
-
-
change_map_t mRoleMemberChanges;
role_data_map_t mRoleChanges;
+ ban_list_t mBanList;
std::vector<LLGroupTitle> mTitles;
@@ -292,12 +311,12 @@ private:
LLUUID mTitlesRequestID;
U32 mReceivedRoleMemberPairs;
- BOOL mMemberDataComplete;
- BOOL mRoleDataComplete;
- BOOL mRoleMemberDataComplete;
- BOOL mGroupPropertiesDataComplete;
+ bool mMemberDataComplete;
+ bool mRoleDataComplete;
+ bool mRoleMemberDataComplete;
+ bool mGroupPropertiesDataComplete;
- BOOL mPendingRoleMemberRequest;
+ bool mPendingRoleMemberRequest;
F32 mAccessTime;
// Generate a new ID every time mMembers
@@ -325,6 +344,23 @@ class LLGroupMgr : public LLSingleton<LLGroupMgr>
LOG_CLASS(LLGroupMgr);
public:
+ enum EBanRequestType
+ {
+ REQUEST_GET = 0,
+ REQUEST_POST,
+ REQUEST_PUT,
+ REQUEST_DEL
+ };
+
+ enum EBanRequestAction
+ {
+ BAN_NO_ACTION = 0,
+ BAN_CREATE = 1,
+ BAN_DELETE = 2,
+ BAN_UPDATE = 4
+ };
+
+public:
LLGroupMgr();
~LLGroupMgr();
@@ -357,8 +393,14 @@ public:
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
static void sendGroupMemberEjects(const LLUUID& group_id,
uuid_vec_t& member_ids);
+
+ static void sendGroupBanRequest(EBanRequestType request_type,
+ const LLUUID& group_id,
+ U32 ban_action = BAN_NO_ACTION,
+ const uuid_vec_t ban_list = uuid_vec_t());
+
+ static void processGroupBanRequest(const LLSD& content);
- // BAKER
void sendCapGroupMembersRequest(const LLUUID& group_id);
static void processCapGroupMembersRequest(const LLSD& content);
@@ -403,4 +445,3 @@ private:
#endif
-