X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/842dabf727814691bfd949ac4d910ce04c32b887..e714c0719330427ea0b420e877de8605d81364c7:/lib/base/ebase.h?ds=sidebyside diff --git a/lib/base/ebase.h b/lib/base/ebase.h index b819fc35..cf973c89 100644 --- a/lib/base/ebase.h +++ b/lib/base/ebase.h @@ -140,13 +140,11 @@ class eSocketNotifier { public: enum { Read=POLLIN, Write=POLLOUT, Priority=POLLPRI, Error=POLLERR, Hungup=POLLHUP }; -#ifndef SWIG private: eMainloop &context; int fd; int state; int requested; // requested events (POLLIN, ...) -#endif public: /** * \brief Constructs a eSocketNotifier. @@ -175,10 +173,9 @@ class eTimer; // werden in einer mainloop verarbeitet class eMainloop { -#ifndef SWIG friend class eTimer; friend class eSocketNotifier; - std::multimap notifiers; + std::map notifiers; ePtrList m_timer_list; bool app_quit_now; int loop_level; @@ -188,13 +185,12 @@ class eMainloop int m_now_is_invalid; int m_interrupt_requested; -#endif -public: - static void addTimeOffset(int offset); void addSocketNotifier(eSocketNotifier *sn); void removeSocketNotifier(eSocketNotifier *sn); void addTimer(eTimer* e); void removeTimer(eTimer* e); +public: + static void addTimeOffset(int offset); #ifndef SWIG static ePtrList existing_loops; @@ -232,6 +228,7 @@ public: /* our new shared polling interface. */ PyObject *poll(PyObject *dict, PyObject *timeout); void interruptPoll(); + void reset(); }; /** @@ -262,14 +259,13 @@ public: */ class eTimer { -#ifndef SWIG friend class eMainloop; eMainloop &context; timeval nextActivation; long interval; bool bSingleShot; bool bActive; -#endif + void addTimeOffset(int); public: /** * \brief Constructs a timer. @@ -293,6 +289,5 @@ public: bool operator<(const eTimer& t) const { return nextActivation < t.nextActivation; } #endif void startLongTimer( int seconds ); - void addTimeOffset(int); }; #endif