aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/Loop.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-08 21:50:07 +0200
committerMax Kellermann <max@duempel.org>2013-08-08 23:03:49 +0200
commitc043b337b1747498fb2bf3180decdee4561d0d91 (patch)
tree38424163270fad6d23100e4dc4c7b68a824c8a3a /src/event/Loop.hxx
parent090bc6fa794589afacc8b22f50b6d3aeb39fe0bd (diff)
downloadmpd-c043b337b1747498fb2bf3180decdee4561d0d91.tar.gz
mpd-c043b337b1747498fb2bf3180decdee4561d0d91.tar.xz
mpd-c043b337b1747498fb2bf3180decdee4561d0d91.zip
EventLoop: un-inline Run() and others
Prepare for adding more code.
Diffstat (limited to '')
-rw-r--r--src/event/Loop.hxx26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx
index 72731ea2b..a222f098d 100644
--- a/src/event/Loop.hxx
+++ b/src/event/Loop.hxx
@@ -56,33 +56,15 @@ public:
g_main_loop_quit(loop);
}
- void Run() {
- g_main_loop_run(loop);
- }
+ void Run();
- guint AddIdle(GSourceFunc function, gpointer data) {
- GSource *source = g_idle_source_new();
- g_source_set_callback(source, function, data, NULL);
- guint id = g_source_attach(source, GetContext());
- g_source_unref(source);
- return id;
- }
+ guint AddIdle(GSourceFunc function, gpointer data);
GSource *AddTimeout(guint interval_ms,
- GSourceFunc function, gpointer data) {
- GSource *source = g_timeout_source_new(interval_ms);
- g_source_set_callback(source, function, data, nullptr);
- g_source_attach(source, GetContext());
- return source;
- }
+ GSourceFunc function, gpointer data);
GSource *AddTimeoutSeconds(guint interval_s,
- GSourceFunc function, gpointer data) {
- GSource *source = g_timeout_source_new_seconds(interval_s);
- g_source_set_callback(source, function, data, nullptr);
- g_source_attach(source, GetContext());
- return source;
- }
+ GSourceFunc function, gpointer data);
};
#endif /* MAIN_NOTIFY_H */