summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/DummyEventLoop.h')
m---------Swiften0
-rw-r--r--Swiften/EventLoop/DummyEventLoop.h41
2 files changed, 0 insertions, 41 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/EventLoop/DummyEventLoop.h b/Swiften/EventLoop/DummyEventLoop.h
deleted file mode 100644
index 7766bd4..0000000
--- a/Swiften/EventLoop/DummyEventLoop.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once
-
-#include <deque>
-#include <iostream>
-#include <boost/function.hpp>
-
-#include "Swiften/EventLoop/EventLoop.h"
-#include "Swiften/Base/foreach.h"
-
-namespace Swift {
- class DummyEventLoop : public EventLoop {
- public:
- DummyEventLoop() {
- }
-
- ~DummyEventLoop() {
- if (!events_.empty()) {
- std::cerr << "DummyEventLoop: Unhandled events at destruction time" << std::endl;
- }
- events_.clear();
- }
-
- void processEvents() {
- while (!events_.empty()) {
- handleEvent(events_[0]);
- events_.pop_front();
- }
- }
-
- bool hasEvents() {
- return events_.size() > 0;
- }
-
- virtual void post(const Event& event) {
- events_.push_back(event);
- }
-
- private:
- std::deque<Event> events_;
- };
-}