summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationmodel.h')
-rw-r--r--indra/newview/llconversationmodel.h42
1 files changed, 37 insertions, 5 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index fc2c600364..af3756c45d 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -33,6 +33,8 @@
// Implementation of conversations list
class LLConversationItem;
+class LLConversationItemSession;
+class LLConversationItemParticipant;
typedef std::map<LLUUID, LLConversationItem*> conversations_items_map;
typedef std::map<LLUUID, LLFolderViewItem*> conversations_widgets_map;
@@ -43,6 +45,7 @@ class LLConversationItem : public LLFolderViewModelItemCommon
{
public:
LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
+ LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
LLConversationItem(LLFolderViewModelInterface& root_view_model);
virtual ~LLConversationItem() {}
@@ -99,25 +102,54 @@ public:
// bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); }
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
-private:
- std::string mName;
- const LLUUID mUUID;
+
+protected:
+ std::string mName; // Name of the session or the participant
+ LLUUID mUUID; // UUID of the session or the participant
};
class LLConversationItemSession : public LLConversationItem
{
public:
LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
- LLConversationItemSession(LLFolderViewModelInterface& root_view_model);
+ LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
virtual ~LLConversationItemSession() {}
+
+ void setSessionID(const LLUUID& session_id) { mUUID = session_id; }
+ void addParticipant(LLConversationItemParticipant* participant);
+ void removeParticipant(LLConversationItemParticipant* participant);
+ void removeParticipant(const LLUUID& participant_id);
+ void clearParticipants();
+ LLConversationItemParticipant* findParticipant(const LLUUID& participant_id);
+
+ void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted);
+ void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator);
+
+ bool isLoaded() { return mIsLoaded; }
+
+ void dumpDebugData();
+
+private:
+ bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise
};
class LLConversationItemParticipant : public LLConversationItem
{
public:
LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
- LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model);
+ LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
virtual ~LLConversationItemParticipant() {}
+
+ bool isMuted() { return mIsMuted; }
+ bool isModerator() {return mIsModerator; }
+ void setIsMuted(bool is_muted) { mIsMuted = is_muted; }
+ void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; }
+
+ void dumpDebugData();
+
+private:
+ bool mIsMuted; // default is false
+ bool mIsModerator; // default is false
};
// We don't want to ever filter conversations but we need to declare that class to create a conversation view model.