#include "gmyth-dbus-server.h" static void _disconnected_cb (GMythDbusServer *srv, GMainLoop *loop) { g_main_loop_quit (loop); } int main (int argc, char* argv[]) { GMainLoop *loop; GMythDbusServer *srv; g_type_init (); g_thread_init (NULL); loop = g_main_loop_new (NULL, FALSE); srv = gmyth_dbus_server_start_dbus_service (); if (srv) { g_signal_connect (G_OBJECT (srv), "shutdown", G_CALLBACK (_disconnected_cb), loop); g_main_loop_run (loop); g_object_unref (srv); } return 0; }