diff options
| author | Dave Parks <davep@lindenlab.com> | 2013-04-02 11:18:29 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2013-04-02 11:18:29 -0500 |
| commit | 3e8da4e8d5ec7a477db00de99ec4c75985c17094 (patch) | |
| tree | a76d4b02258d9b2d3d12e7640a7a50830c007241 /indra/newview/llnotificationstorage.h | |
| parent | 8f9ddc67fdcdf53313ae4217ffa551a5a157c765 (diff) | |
| parent | 5f5732365b3c5a3b85fdc0be6fbbbbc0c2de01f2 (diff) | |
Automated merge with https://bitbucket.org/lindenlab/davep-materials
Diffstat (limited to 'indra/newview/llnotificationstorage.h')
| -rw-r--r-- | indra/newview/llnotificationstorage.h | 33 |
1 files changed, 14 insertions, 19 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" +#include <string> -// 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> +#include "llerror.h" + +class LLNotificationResponderInterface; +class LLSD; + +class LLNotificationStorage { - LOG_CLASS(LLPersistentNotificationStorage); + LOG_CLASS(LLNotificationStorage); public: + LLNotificationStorage(std::string pFileName); + ~LLNotificationStorage(); - LLPersistentNotificationStorage(); - - void saveNotifications(); +protected: + bool writeNotifications(const LLSD& pNotificationData) const; + bool readNotifications(LLSD& pNotificationData) const; - void loadNotifications(); + LLNotificationResponderInterface* createResponder(const std::string& pNotificationName, const LLSD& pParams) const; private: - - bool onPersistentChannelChanged(const LLSD& payload); - std::string mFileName; }; |
