diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-19 15:25:22 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-19 15:25:22 -0400 |
commit | 6807214bb988e09e678534f23c8380e811df8831 (patch) | |
tree | fc030ee780f7c929c70d7a65d0343fa57b2c739d /indra/newview/llnotificationstorage.h | |
parent | ca17a74f1848b16b8a4f2412ed093aef4bad5830 (diff) | |
parent | 04e78ce4fdd3bbc0e4daa1daabbff2de1c425601 (diff) |
merge changes for 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; }; |