summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationstorage.h
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-12-12 18:49:07 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-12-12 18:49:07 -0800
commit5df9d52d48b56a5d8f36a45ced0393c99473f536 (patch)
tree7349174bd3ecb3b55a21dc8ce594196fba66cf9c /indra/newview/llnotificationstorage.h
parent5b827d58f6fe511fa75e67ae3fe861e5e99858ac (diff)
CHUI-499: Refactoring the persistent notification storage so that I can reuse the functionality for do-not-disturb mode.
Diffstat (limited to 'indra/newview/llnotificationstorage.h')
-rw-r--r--indra/newview/llnotificationstorage.h34
1 files changed, 13 insertions, 21 deletions
diff --git a/indra/newview/llnotificationstorage.h b/indra/newview/llnotificationstorage.h
index 8635c797c0..ab4da4e73f 100644
--- a/indra/newview/llnotificationstorage.h
+++ b/indra/newview/llnotificationstorage.h
@@ -27,32 +27,24 @@
#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 LLSD;
- void loadNotifications();
-
-private:
+class LLNotificationStorage
+{
+ LOG_CLASS(LLNotificationStorage);
+public:
+ LLNotificationStorage(std::string pFileName);
+ ~LLNotificationStorage();
- bool onPersistentChannelChanged(const LLSD& payload);
+protected:
+ bool writeNotifications(const LLSD& pNotificationData) const;
+ bool readNotifications(LLSD& pNotificationData) const;
+private:
std::string mFileName;
};