summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchiclet.h')
-rw-r--r--indra/newview/llchiclet.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 19683492c2..d6be2df103 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -34,9 +34,10 @@
#include "lloutputmonitorctrl.h"
#include "llgroupmgr.h"
#include "llimview.h"
+#include "llnotifications.h"
class LLMenuGL;
-class LLIMFloater;
+class LLFloaterIMSession;
/**
* Class for displaying amount of messages/notifications(unread).
@@ -872,9 +873,11 @@ class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
{
friend class LLUICtrlFactory;
public:
- virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
- virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
- virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
+ /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) {}
+ /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
+ /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
+ /*virtual*/ void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
+ /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
~LLIMWellChiclet();
protected:
@@ -911,11 +914,35 @@ protected:
class LLNotificationChiclet : public LLSysWellChiclet
{
+ LOG_CLASS(LLNotificationChiclet);
+
friend class LLUICtrlFactory;
public:
struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
protected:
+ struct ChicletNotificationChannel : public LLNotificationChannel
+ {
+ ChicletNotificationChannel(LLNotificationChiclet* chiclet)
+ : LLNotificationChannel(LLNotificationChannel::Params().filter(filterNotification).name(chiclet->getSessionId().asString())),
+ mChiclet(chiclet)
+ {
+ // connect counter handlers to the signals
+ connectToChannel("Group Notifications");
+ connectToChannel("Offer");
+ connectToChannel("Notifications");
+ }
+
+ static bool filterNotification(LLNotificationPtr notify);
+ // connect counter updaters to the corresponding signals
+ /*virtual*/ void onAdd(LLNotificationPtr p) { mChiclet->setCounter(++mChiclet->mUreadSystemNotifications); }
+ /*virtual*/ void onDelete(LLNotificationPtr p) { mChiclet->setCounter(--mChiclet->mUreadSystemNotifications); }
+
+ LLNotificationChiclet* const mChiclet;
+ };
+
+ boost::scoped_ptr<ChicletNotificationChannel> mNotificationChannel;
+
LLNotificationChiclet(const Params& p);
/**
@@ -933,12 +960,6 @@ protected:
*/
/*virtual*/ void createMenu();
- // connect counter updaters to the corresponding signals
- void connectCounterUpdatersToSignal(const std::string& notification_type);
-
- // methods for updating a number of unread System notifications
- void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
- void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
/*virtual*/ void setCounter(S32 counter);
S32 mUreadSystemNotifications;
};