summaryrefslogtreecommitdiff
path: root/indra/newview/lleventnotifier.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-07 15:05:57 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-07 15:05:57 -0500
commit3c00c1ba4590e758f84f5c97f2d407aa7e605ad8 (patch)
tree0d6771596b57ecf87f2504066543b56bbcf65d80 /indra/newview/lleventnotifier.h
parentefe65d90e027e4385c97d76244844fa8660dc7ce (diff)
parentd9b4570883652d647c05083c18fac1a088efd6e2 (diff)
merge viewer-development into web-profiles
Diffstat (limited to 'indra/newview/lleventnotifier.h')
-rw-r--r--indra/newview/lleventnotifier.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h
index 0367fc47b0..697a708762 100644
--- a/indra/newview/lleventnotifier.h
+++ b/indra/newview/lleventnotifier.h
@@ -30,7 +30,6 @@
#include "llframetimer.h"
#include "v3dmath.h"
-class LLEventInfo;
class LLEventNotification;
@@ -41,15 +40,21 @@ public:
virtual ~LLEventNotifier();
void update(); // Notify the user of the event if it's coming up
+ bool add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName);
+ void add(U32 eventId);
+
void load(const LLSD& event_options); // In the format that it comes in from login
- void add(LLEventInfo &event_info); // Add a new notification for an event
void remove(U32 event_id);
BOOL hasNotification(const U32 event_id);
+ void serverPushRequest(U32 event_id, bool add);
typedef std::map<U32, LLEventNotification *> en_map;
+ bool handleResponse(U32 eventId, const LLSD& notification, const LLSD& response);
+ static void processEventInfoReply(LLMessageSystem *msg, void **);
+
protected:
en_map mEventNotifications;
LLFrameTimer mNotificationTimer;
@@ -59,25 +64,21 @@ protected:
class LLEventNotification
{
public:
- LLEventNotification();
- virtual ~LLEventNotification();
+ LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName);
+
- BOOL load(const LLSD& en); // In the format it comes in from login
- BOOL load(const LLEventInfo &event_info); // From existing event_info on the viewer.
- //void setEventID(const U32 event_id);
- //void setEventName(std::string &event_name);
U32 getEventID() const { return mEventID; }
const std::string &getEventName() const { return mEventName; }
- time_t getEventDate() const { return mEventDate; }
- const std::string &getEventDateStr() const { return mEventDateStr; }
- LLVector3d getEventPosGlobal() const { return mEventPosGlobal; }
- bool handleResponse(const LLSD& notification, const LLSD& payload);
+ bool isValid() const { return mEventID > 0 && mEventDateEpoch != 0 && mEventName.size() > 0; }
+ const F64 &getEventDateEpoch() const { return mEventDateEpoch; }
+ const std::string &getEventDateStr() const { return mEventDateStr; }
+
+
protected:
U32 mEventID; // EventID for this event
std::string mEventName;
+ F64 mEventDateEpoch;
std::string mEventDateStr;
- time_t mEventDate;
- LLVector3d mEventPosGlobal;
};
extern LLEventNotifier gEventNotifier;