diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
commit | ed7785bf97a601448ba2da5fb2f19ea2861454c5 (patch) | |
tree | 17e8d9ccf28ae30c5029ecea7e0ab8bed0fe3926 /indra/newview/llnotificationstorage.h | |
parent | c8533650b4779040c5e196f9ff156e3454edc9c8 (diff) | |
parent | bf95c1cae7a84d1a97dacd8ea7f1b6af8be067a9 (diff) |
merge up to 3.5.0-beta3 (chui)
Diffstat (limited to 'indra/newview/llnotificationstorage.h')
-rw-r--r-- | indra/newview/llnotificationstorage.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/indra/newview/llnotificationstorage.h b/indra/newview/llnotificationstorage.h index 8635c797c0..7aabf7d09e 100644 --- a/indra/newview/llnotificationstorage.h +++ b/indra/newview/llnotificationstorage.h @@ -27,32 +27,27 @@ #ifndef LL_NOTIFICATIONSTORAGE_H #define LL_NOTIFICATIONSTORAGE_H -#include "llnotifications.h" - -// Class that saves not responded(unread) notifications. -// Unread notifications are saved in open_notifications.xml in SL account folder -// -// Notifications that should be saved(if unread) are marked with persist="true" in notifications.xml -// Notifications using functor responders are saved automatically (see llviewermessage.cpp -// lure_callback_reg for example). -// Notifications using object responders(LLOfferInfo) need additional tuning. Responder object should -// be a) serializable(implement LLNotificationResponderInterface), -// b) registered with LLResponderRegistry (found in llnotificationstorage.cpp). -class LLPersistentNotificationStorage : public LLSingleton<LLPersistentNotificationStorage> -{ - LOG_CLASS(LLPersistentNotificationStorage); -public: +#include <string> - LLPersistentNotificationStorage(); +#include "llerror.h" - void saveNotifications(); +class LLNotificationResponderInterface; +class LLSD; - void loadNotifications(); +class LLNotificationStorage +{ + LOG_CLASS(LLNotificationStorage); +public: + LLNotificationStorage(std::string pFileName); + ~LLNotificationStorage(); -private: +protected: + bool writeNotifications(const LLSD& pNotificationData) const; + bool readNotifications(LLSD& pNotificationData) const; - bool onPersistentChannelChanged(const LLSD& payload); + LLNotificationResponderInterface* createResponder(const std::string& pNotificationName, const LLSD& pParams) const; +private: std::string mFileName; }; |