diff options
Diffstat (limited to 'Swiften/EventLoop/MainEventLoop.h')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/EventLoop/MainEventLoop.h | 41 |
2 files changed, 0 insertions, 41 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/EventLoop/MainEventLoop.h b/Swiften/EventLoop/MainEventLoop.h deleted file mode 100644 index fbb7079..0000000 --- a/Swiften/EventLoop/MainEventLoop.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef SWIFTEN_MainEventLoop_H -#define SWIFTEN_MainEventLoop_H - -#include <boost/function.hpp> - -#include "Swiften/EventLoop/Deleter.h" -#include "Swiften/EventLoop/EventLoop.h" - -namespace Swift { - class EventLoop; - class EventOwner; - - class MainEventLoop { - friend class EventLoop; - - public: - /** - * Post an event from the given owner to the event loop. - * If the owner is destroyed, all events should be removed from the - * loop using removeEventsFromOwner(). - */ - static void postEvent(boost::function<void ()> event, boost::shared_ptr<EventOwner> owner = boost::shared_ptr<EventOwner>()); - - static void removeEventsFromOwner(boost::shared_ptr<EventOwner> owner); - - template<typename T> - static void deleteLater(T* t) { - getInstance()->postEvent(Deleter<T>(t), 0); - } - - private: - static void setInstance(EventLoop*); - static void resetInstance(); - static EventLoop* getInstance(); - - private: - static EventLoop* instance_; - }; -} - -#endif |