summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationhandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationhandler.h')
-rw-r--r--indra/newview/llnotificationhandler.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 0d5c431d75..99a1fedcf3 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -42,6 +42,8 @@
#include "llinstantmessage.h"
#include "llnotificationptr.h"
+class LLIMFloater;
+
namespace LLNotificationsUI
{
// ENotificationType enumerates all possible types of notifications that could be met
@@ -122,9 +124,17 @@ protected:
class LLSysHandler : public LLEventHandler
{
public:
+ LLSysHandler();
virtual ~LLSysHandler() {};
virtual bool processNotification(const LLSD& notify)=0;
+
+protected :
+ static void init();
+ void removeExclusiveNotifications(const LLNotificationPtr& notif);
+
+ typedef std::list< std::set<std::string> > exclusive_notif_sets;
+ static exclusive_notif_sets sExclusiveNotificationGroups;
};
/**
@@ -171,6 +181,7 @@ public:
protected:
virtual void onDeleteToast(LLToast* toast);
+ virtual void onRejectToast(const LLUUID& id);
virtual void initChannel();
};
@@ -282,6 +293,11 @@ public:
static bool canAddNotifPanelToIM(const LLNotificationPtr& notification);
/**
+ * Checks whether notification can be used multiple times or not.
+ */
+ static bool isNotificationReusable(const LLNotificationPtr& notification);
+
+ /**
* Checks if passed notification can create IM session and be written into it.
*
* This method uses canLogToIM() & canSpawnIMSession().
@@ -289,6 +305,21 @@ public:
static bool canSpawnSessionAndLogToIM(const LLNotificationPtr& notification);
/**
+ * Checks if passed notification can create toast.
+ */
+ static bool canSpawnToast(const LLNotificationPtr& notification);
+
+ /**
+ * Determines whether IM floater is opened.
+ */
+ static bool isIMFloaterOpened(const LLNotificationPtr& notification);
+
+ /**
+ * Determines whether IM floater is focused.
+ */
+ static bool isIMFloaterFocused(const LLNotificationPtr& notification);
+
+ /**
* Writes notification message to IM session.
*/
static void logToIM(const EInstantMessage& session_type,
@@ -334,6 +365,29 @@ public:
* Adds notification panel to the IM floater.
*/
static void addNotifPanelToIM(const LLNotificationPtr& notification);
+
+ /**
+ * Updates messages of IM floater.
+ */
+ static void updateIMFLoaterMesages(const LLUUID& session_id);
+
+ /**
+ * Updates messages of visible IM floater.
+ */
+ static void updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification);
+
+ /**
+ * Decrements counter of IM messages.
+ */
+ static void decIMMesageCounter(const LLNotificationPtr& notification);
+
+private:
+
+ /**
+ * Find IM floater based on "from_id"
+ */
+ static LLIMFloater* findIMFloater(const LLNotificationPtr& notification);
+
};
}