20 #ifndef BASICDELAYEDEVENTQUEUE_H_49D837C4
21 #define BASICDELAYEDEVENTQUEUE_H_49D837C4
29 #include <condition_variable>
31 #include <event2/event.h>
44 virtual void enqueueDelayed(
const Event& event,
size_t delayMs,
const std::string& eventUUID);
45 virtual void cancelDelayed(
const std::string& eventId);
46 virtual void cancelAllDelayed();
47 virtual Event dequeue(
size_t blockMs) {
48 return BasicEventQueue::dequeue(blockMs);
50 virtual void enqueue(
const Event& event) {
51 return BasicEventQueue::enqueue(event);
55 virtual Data serialize();
56 virtual void deserialize(
const Data& data);
59 virtual std::shared_ptr<EventQueueImpl> create() {
60 ErrorEvent e(
"Cannot create a DelayedEventQueue without callbacks");
66 std::string eventUUID;
77 std::map<std::string, callbackData> _callbackData;
78 struct event_base* _eventLoop;
79 struct event* _dummyEvent;
81 static void run(
void* instance);
85 static void timerCallback(evutil_socket_t fd,
short what,
void *arg);
Definition: Breakpoint.cpp:26
Definition: BasicEventQueue.h:37
Definition: BasicDelayedEventQueue.h:39
Definition: EventQueueImpl.h:53
Definition: BasicDelayedEventQueue.h:64
Definition: EventQueueImpl.h:62