diff options
Diffstat (limited to 'src/uscxml/interpreter/BasicEventQueue.h')
-rw-r--r-- | src/uscxml/interpreter/BasicEventQueue.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/uscxml/interpreter/BasicEventQueue.h b/src/uscxml/interpreter/BasicEventQueue.h index 5911336..f9b6965 100644 --- a/src/uscxml/interpreter/BasicEventQueue.h +++ b/src/uscxml/interpreter/BasicEventQueue.h @@ -28,9 +28,6 @@ #include <mutex> #include <condition_variable> -#include <event2/event.h> - - namespace uscxml { /** @@ -52,55 +49,6 @@ protected: std::condition_variable_any _cond; }; -/** - * @ingroup eventqueue - * @ingroup impl - */ -class USCXML_API BasicDelayedEventQueue : public BasicEventQueue, public DelayedEventQueueImpl { -public: - BasicDelayedEventQueue(DelayedEventQueueCallbacks* callbacks); - virtual ~BasicDelayedEventQueue(); - virtual std::shared_ptr<DelayedEventQueueImpl> create(DelayedEventQueueCallbacks* callbacks); - virtual void enqueueDelayed(const Event& event, size_t delayMs, const std::string& eventUUID); - virtual void cancelDelayed(const std::string& eventId); - virtual void cancelAllDelayed(); - virtual Event dequeue(size_t blockMs) { - return BasicEventQueue::dequeue(blockMs); - } - virtual void enqueue(const Event& event) { - return BasicEventQueue::enqueue(event); - } - virtual void reset(); - -protected: - virtual std::shared_ptr<EventQueueImpl> create() { - ErrorEvent e("Cannot create a DelayedEventQueue without callbacks"); - throw e; - } - - struct callbackData { - Event userData; - std::string eventUUID; - bool persist; - struct event *event; - BasicDelayedEventQueue* eventQueue; - }; - - bool _isStarted; - std::thread* _thread; - - std::map<std::string, callbackData> _callbackData; - struct event_base* _eventLoop; - struct event* _dummyEvent; - - static void run(void* instance); - void start(); - void stop(); - - static void timerCallback(evutil_socket_t fd, short what, void *arg); - DelayedEventQueueCallbacks* _callbacks; -}; - } #endif /* end of include guard: BASICEVENTQUEUE_H_39DCC18B */ |