summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationstorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationstorage.h')
-rw-r--r--indra/newview/llnotificationstorage.h33
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;
};