From c73947ac1fc6c48bca75ea7d6beeda63eb695b2b Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 18 Dec 2012 18:48:15 -0800 Subject: CHUI-499: Adding ability to serialize the communication notifications to local disk per user. --- indra/newview/lldonotdisturbnotificationstorage.h | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 indra/newview/lldonotdisturbnotificationstorage.h (limited to 'indra/newview/lldonotdisturbnotificationstorage.h') diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h new file mode 100644 index 0000000000..60bcd89ec3 --- /dev/null +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -0,0 +1,57 @@ +/** +* @file lldonotdisturbnotificationstorage.h +* @brief Header file for lldonotdisturbnotificationstorage +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H +#define LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H + +#include "llerror.h" +#include "llnotifications.h" +#include "llnotificationstorage.h" +#include "llsingleton.h" + +class LLSD; + +class LLDoNotDisturbNotificationStorage : public LLSingleton, public LLNotificationStorage +{ + LOG_CLASS(LLDoNotDisturbNotificationStorage); +public: + LLDoNotDisturbNotificationStorage(); + ~LLDoNotDisturbNotificationStorage(); + + void initialize(); + + void saveNotifications(); + void loadNotifications(); + +protected: + +private: + LLNotificationChannelPtr getCommunicationChannel() const; + bool onChannelChanged(const LLSD& pPayload); +}; + +#endif // LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H + -- cgit v1.2.3 From 69497e645bbefe85d83e85bb353e5fb719263877 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 11 Jan 2013 18:20:29 -0800 Subject: CHUI-668: Not fully complete but as of this commit, have functionality to use the user's most intrusive chat notification upon exiting from DND mode with IM's. Also if in DND mode, clicking on a conversation line item or floater, will flush the DND notifications system of storing that conversation. This way upon existing DND mode already responded conversations won't be notified to the user. --- indra/newview/lldonotdisturbnotificationstorage.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lldonotdisturbnotificationstorage.h') diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index 60bcd89ec3..8edb8569b4 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -45,6 +45,7 @@ public: void saveNotifications(); void loadNotifications(); + void removeIMNotification(const LLUUID& session_id); protected: -- cgit v1.2.3 From de9e2c38126682e5c6215151e3389380a93b8bc0 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 15 Jan 2013 20:36:48 -0800 Subject: CHUI-668: Code review changes --- indra/newview/lldonotdisturbnotificationstorage.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldonotdisturbnotificationstorage.h') diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index 8edb8569b4..fd03b71357 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -28,12 +28,26 @@ #define LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H #include "llerror.h" +#include "lleventtimer.h" #include "llnotifications.h" #include "llnotificationstorage.h" #include "llsingleton.h" class LLSD; +class LLDoNotDisturbNotificationStorageTimer : public LLEventTimer +{ +public: + LLDoNotDisturbNotificationStorageTimer(); + ~LLDoNotDisturbNotificationStorageTimer(); + +public: + void startTimer(); + void stopTimer(); + bool isRunning(); + BOOL tick(); +}; + class LLDoNotDisturbNotificationStorage : public LLSingleton, public LLNotificationStorage { LOG_CLASS(LLDoNotDisturbNotificationStorage); @@ -42,14 +56,19 @@ public: ~LLDoNotDisturbNotificationStorage(); void initialize(); - + bool getDirty(); + void resetDirty(); void saveNotifications(); void loadNotifications(); + void updateNotifications(); void removeIMNotification(const LLUUID& session_id); protected: private: + bool mDirty; + LLDoNotDisturbNotificationStorageTimer mTimer; + LLNotificationChannelPtr getCommunicationChannel() const; bool onChannelChanged(const LLSD& pPayload); }; -- cgit v1.2.3 From fdf774f51fd24bb62d1e1fc580bd04df4547b9f8 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 17 Jan 2013 13:52:51 -0800 Subject: CHUI-685 Problem: The notifications .xml file was cleared upon exit because removeIMNotification was being called and deleting inventory offers becaus they did not have a session id. Resolution: Now check to make sure that removeIMNotification only removes IMs (IMToast). --- indra/newview/lldonotdisturbnotificationstorage.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/lldonotdisturbnotificationstorage.h') diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index fd03b71357..fd7cc7ee82 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -42,9 +42,6 @@ public: ~LLDoNotDisturbNotificationStorageTimer(); public: - void startTimer(); - void stopTimer(); - bool isRunning(); BOOL tick(); }; -- cgit v1.2.3 From d0204ab367f5ceb5eab89e2273b897975acbfe5a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 23 Jan 2013 09:51:17 -0800 Subject: CHUI-687: Problem: User sees inventory offer notifications for deleted items when logging in from do not disturb mode. Resolution: If an item that is deletes has a DND notification saved, then remove that notification so that it doesn't appear onec the user exists DND mode. --- indra/newview/lldonotdisturbnotificationstorage.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldonotdisturbnotificationstorage.h') diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index fd7cc7ee82..6e68b0d1be 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -49,6 +49,9 @@ class LLDoNotDisturbNotificationStorage : public LLSingleton nameToPayloadParameterMap; }; #endif // LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H -- cgit v1.2.3