X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9d3c33a84173a447eb6d9ed1519077131fdbfb63..b07e1f84ffcce062b24c40f6cb10278a72d047cb:/lib/base/ebase.h?ds=sidebyside diff --git a/lib/base/ebase.h b/lib/base/ebase.h index 9c524ae9..84845a95 100644 --- a/lib/base/ebase.h +++ b/lib/base/ebase.h @@ -155,7 +155,6 @@ private: int requested; // requested events (POLLIN, ...) void activate(int what) { /*emit*/ activated(what); } eSocketNotifier(eMainloop *context, int fd, int req, bool startnow); - void operator delete(void *pmem) { ::operator delete(pmem); } public: /** * \brief Constructs a eSocketNotifier. @@ -269,8 +268,9 @@ public: * * This class emits the signal \c eTimer::timeout after the specified timeout. */ -class eTimer +class eTimer: iObject { + DECLARE_REF(eTimer); friend class eMainloop; eMainloop &context; timespec nextActivation; @@ -278,6 +278,8 @@ class eTimer bool bSingleShot; bool bActive; void activate(); + + eTimer(eMainloop *context): context(*context), bActive(false) { } public: /** * \brief Constructs a timer. @@ -285,7 +287,7 @@ public: * The timer is not yet active, it has to be started with \c start. * \param context The thread from which the signal should be emitted. */ - eTimer(eMainloop *context=eApp): context(*context), bActive(false) { } + static eTimer *create(eMainloop *context=eApp) { return new eTimer(context); } ~eTimer() { if (bActive) stop(); } PSignal0 timeout; @@ -299,6 +301,7 @@ public: void changeInterval(long msek); void startLongTimer( int seconds ); bool operator<(const eTimer& t) const { return nextActivation < t.nextActivation; } + eSmartPtrList m_clients; }; #endif // SWIG