diff options
author | mobserveur <mobserveur@gmail.com> | 2024-07-23 03:06:59 +0200 |
---|---|---|
committer | mobserveur <mobserveur@gmail.com> | 2024-07-23 03:06:59 +0200 |
commit | 17e9bcbf628aa5bda84a36fc7daa9c6041e1bada (patch) | |
tree | b3002ee1f89bd9d97513de29f9cfe566932d6e97 /indra/newview/lleventnotifier.h | |
parent | 7bb6ea9103228b3bf3b28792d8d73e8616471908 (diff) |
Legacy search floater
This commit adds the legacy search floater to megapahit
Diffstat (limited to 'indra/newview/lleventnotifier.h')
-rw-r--r-- | indra/newview/lleventnotifier.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h index b928969d2f..d8ab2bafce 100644 --- a/indra/newview/lleventnotifier.h +++ b/indra/newview/lleventnotifier.h @@ -27,12 +27,31 @@ #ifndef LL_LLEVENTNOTIFIER_H #define LL_LLEVENTNOTIFIER_H +#include <utility> #include "llframetimer.h" #include "v3dmath.h" class LLEventNotification; class LLMessageSystem; +typedef struct event_st{ + U32 eventId = 0; + F64 eventEpoch = 0.0; + std::string eventDateStr; + std::string eventName; + std::string creator; + std::string category; + std::string desc; + U32 duration = 0; + U32 cover = 0; + U32 amount = 0; + std::string simName; + LLVector3d globalPos; + U32 flags = 0; + event_st(U32 id, F64 epoch, std::string date_str, std::string name) + : eventId(id), eventEpoch(epoch), eventDateStr(std::move(date_str)), eventName(std::move(name)){} + event_st() = default; +} LLEventStruct; class LLEventNotifier { @@ -41,6 +60,7 @@ public: virtual ~LLEventNotifier(); void update(); // Notify the user of the event if it's coming up + bool add(const LLEventStruct& event); bool add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName); void add(U32 eventId); @@ -56,6 +76,13 @@ public: static void processEventInfoReply(LLMessageSystem *msg, void **); + typedef boost::signals2::signal<bool(LLEventStruct event)> new_event_signal_t; + new_event_signal_t mNewEventSignal; + boost::signals2::connection setNewEventCallback(const new_event_signal_t::slot_type& cb) + { + return mNewEventSignal.connect(cb); + }; + protected: en_map mEventNotifications; LLFrameTimer mNotificationTimer; @@ -65,7 +92,7 @@ protected: class LLEventNotification { public: - LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName); + LLEventNotification(U32 eventId, F64 eventEpoch, std::string eventDateStr, std::string eventName); U32 getEventID() const { return mEventID; } |