lleventnotifier.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLEVENTNOTIFIER_H
00033 #define LL_LLEVENTNOTIFIER_H
00034 
00035 #include "llframetimer.h"
00036 #include "lluserauth.h"
00037 #include "v3dmath.h"
00038 
00039 class LLEventInfo;
00040 class LLEventNotification;
00041 
00042 
00043 class LLEventNotifier
00044 {
00045 public:
00046         LLEventNotifier();
00047         virtual ~LLEventNotifier();
00048 
00049         void update();  // Notify the user of the event if it's coming up
00050 
00051         void load(const LLUserAuth::options_t& event_options);  // In the format that it comes in from LLUserAuth
00052         void add(LLEventInfo &event_info);      // Add a new notification for an event
00053         void remove(U32 event_id);
00054 
00055         BOOL hasNotification(const U32 event_id);
00056 
00057         typedef std::map<U32, LLEventNotification *> en_map;
00058 
00059         static void notifyCallback(S32 option, void *user_data);
00060 protected:
00061         en_map  mEventNotifications;
00062         LLFrameTimer    mNotificationTimer;
00063 };
00064 
00065 
00066 class LLEventNotification
00067 {
00068 public:
00069         LLEventNotification();
00070         virtual ~LLEventNotification();
00071 
00072         BOOL load(const LLUserAuth::response_t &en);            // In the format it comes in from LLUserAuth
00073         BOOL load(const LLEventInfo &event_info);               // From existing event_info on the viewer.
00074         //void setEventID(const U32 event_id);
00075         //void setEventName(std::string &event_name);
00076         U32                                     getEventID() const                              { return mEventID; }
00077         const std::string       &getEventName() const                   { return mEventName; }
00078         U32                                     getEventDate() const                    { return mEventDate; }
00079         const std::string       &getEventDateStr() const                { return mEventDateStr; }
00080         LLVector3d                      getEventPosGlobal() const               { return mEventPosGlobal; }
00081 protected:
00082         U32                     mEventID;                       // EventID for this event
00083         std::string     mEventName;
00084         std::string mEventDateStr;
00085         U32                     mEventDate;
00086         LLVector3d      mEventPosGlobal;
00087 };
00088 
00089 extern LLEventNotifier gEventNotifier;
00090 
00091 #endif //LL_LLEVENTNOTIFIER_H

Generated on Thu Jul 1 06:08:29 2010 for Second Life Viewer by  doxygen 1.4.7