diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-12 19:48:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-12 20:41:59 (GMT) |
commit | 8231ecc07c1c7d5e260a2795b0660de157501850 (patch) | |
tree | 935baa855914d632086fcac5f26330c2f0261216 /Swiften/Network/Timer.h | |
parent | 48bb7441f913144d6a20687ff79264e4631156f0 (diff) | |
download | swift-contrib-8231ecc07c1c7d5e260a2795b0660de157501850.zip swift-contrib-8231ecc07c1c7d5e260a2795b0660de157501850.tar.bz2 |
Created a TimerFactory, and abstracted Timer.
Diffstat (limited to 'Swiften/Network/Timer.h')
-rw-r--r-- | Swiften/Network/Timer.h | 22 |
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; }; } |