diff options
author | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-06-26 17:39:23 +0100 |
---|---|---|
committer | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-06-26 17:39:23 +0100 |
commit | b615858d6c41c29b3b610ec0dba09f30b1f8b3a8 (patch) | |
tree | 2b193625c9ed4a0ca36e5b5f99f1cc765e979d74 /indra/newview/llnotificationstorage.h | |
parent | e63d92ab504d74399cae2a9cc7625ef3ec330c38 (diff) | |
parent | 2655c7a17ae38a073dcf8f05b0127b68edc34c95 (diff) |
Merging last four months of development
Diffstat (limited to 'indra/newview/llnotificationstorage.h')
-rwxr-xr-x[-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..100755 --- 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; }; |