1 #ifndef ZYPP_BASE_EVENTDISPATCHER_GLIB_P_DEFINED 2 #define ZYPP_BASE_EVENTDISPATCHER_GLIB_P_DEFINED 8 #include <unordered_map> 19 gpointer
tag =
nullptr;
35 static gboolean
prepare(GSource *, gint *timeout);
54 static gboolean
prepare(GSource *src, gint *timeout);
85 static std::shared_ptr<EventDispatcher>
create ( );
86 static void waitPidCallback ( GPid pid, gint status, gpointer user_data );
89 GMainContext *
_ctx =
nullptr;
~EventDispatcherPrivate() override
std::vector< std::shared_ptr< void > > _unrefLater
std::vector< GAbstractEventSource * > _eventSources
GlibWaitPIDData & operator=(GlibWaitPIDData &&other) noexcept
static void destruct(GAbstractEventSource *src)
static std::shared_ptr< EventDispatcher > create()
static gboolean check(GSource *source)
std::function< void(int, int)> WaitPidCallback
GlibWaitPIDData(GPid pid)
static GLibTimerSource * create()
EventDispatcher::WaitPidCallback callback
static void destruct(GLibTimerSource *src)
EventDispatcherPrivate(GMainContext *ctx, EventDispatcher &p)
ZYPP_FWD_DECL_TYPE_WITH_REFS(Context)
The Timer class provides repetitive and single-shot timers.
std::vector< GLibTimerSource * > _runningTimers
EventDispatcherPrivate * _ev
static void waitPidCallback(GPid pid, gint status, gpointer user_data)
UnixSignalSourceWeakRef _signalSource
static gboolean prepare(GSource *, gint *timeout)
std::vector< GUnixPollFD > pollfds
std::queue< EventDispatcher::IdleFunction > _idleFuncs
static gboolean dispatch(GSource *source, GSourceFunc, gpointer)
static gboolean prepare(GSource *src, gint *timeout)
static GAbstractEventSource * create(EventDispatcherPrivate *ev)
AbstractEventSource * eventSource
#define ZYPP_DECLARE_PUBLIC(Class)
static gboolean dispatch(GSource *source, GSourceFunc, gpointer)
static gboolean check(GSource *source)
std::thread::id _myThreadId
std::unordered_map< int, GlibWaitPIDData > _waitPIDs