summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-12 19:48:32 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-12 20:41:59 (GMT)
commit8231ecc07c1c7d5e260a2795b0660de157501850 (patch)
tree935baa855914d632086fcac5f26330c2f0261216 /Swiften/Network/Timer.h
parent48bb7441f913144d6a20687ff79264e4631156f0 (diff)
downloadswift-8231ecc07c1c7d5e260a2795b0660de157501850.zip
swift-8231ecc07c1c7d5e260a2795b0660de157501850.tar.bz2
Created a TimerFactory, and abstracted Timer.
Diffstat (limited to 'Swiften/Network/Timer.h')
-rw-r--r--Swiften/Network/Timer.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/Swiften/Network/Timer.h b/Swiften/Network/Timer.h
index 6474fe9..9b01a0d 100644
--- a/Swiften/Network/Timer.h
+++ b/Swiften/Network/Timer.h
@@ -1,29 +1,15 @@
#pragma once
-#include <boost/asio.hpp>
#include <boost/signals.hpp>
-#include <boost/thread.hpp>
-#include <boost/enable_shared_from_this.hpp>
-
-#include "Swiften/EventLoop/EventOwner.h"
namespace Swift {
- class Timer : public EventOwner, public boost::enable_shared_from_this<Timer> {
+ class Timer {
public:
- Timer(int milliseconds, boost::asio::io_service* service);
- ~Timer();
+ virtual ~Timer();
- void start();
- void stop();
+ virtual void start() = 0;
+ virtual void stop() = 0;
- public:
boost::signal<void ()> onTick;
-
- private:
- void handleTimerTick(const boost::system::error_code& error);
-
- private:
- int timeout;
- boost::asio::deadline_timer timer;
};
}