diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 05:26:15 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 05:26:15 +0000 |
commit | 8cc5595d9091b484b9a4abe314c0f3ec055e0581 (patch) | |
tree | 0d20c6f621673dbdb6095fb4854077152c1d9b40 /audio | |
parent | 884cfe825db1a0e8c98aa6a604fd4588a1de1340 (diff) |
Make it possible to support an embedded GLib
Diffstat (limited to 'audio')
-rw-r--r-- | audio/Makefile.am | 14 | ||||
-rw-r--r-- | audio/headset.c | 13 |
2 files changed, 10 insertions, 17 deletions
diff --git a/audio/Makefile.am b/audio/Makefile.am index 60a546e7..f7e48a3f 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -1,14 +1,6 @@ servicedir = $(libdir)/bluetooth -if GLIB -glib_cflags = @GLIB_CFLAGS@ -glib_ldadd = @GLIB_LIBS@ -else -glib_cflags = -glib_ldadd = -endif - noinst_PROGRAMS = bluetoothd-service-audio \ bluetoothd-service-headset @@ -16,10 +8,10 @@ bluetoothd_service_audio_SOURCES = main.c bluetoothd_service_headset_SOURCES = headset.c -LDADD = $(top_builddir)/common/libhelper.a $(glib_ldadd) \ - @DBUS_LIBS@ @BLUEZ_LIBS@ +LDADD = $(top_builddir)/common/libhelper.a \ + @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/audio/headset.c b/audio/headset.c index 220562fd..0be529ec 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -44,11 +44,12 @@ #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> +#include <glib.h> + #include <dbus/dbus.h> #include "dbus.h" #include "logging.h" -#include "glib-ectomy.h" #define BUF_SIZE 1024 @@ -347,7 +348,7 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, gpointer user_ } if (hs->ring_timer) { - g_timeout_remove(hs->ring_timer); + g_source_remove(hs->ring_timer); hs->ring_timer = 0; } @@ -752,7 +753,7 @@ failed: static void sig_term(int sig) { - g_main_quit(main_loop); + g_main_loop_quit(main_loop); } static int server_socket(uint8_t *channel) @@ -1371,7 +1372,7 @@ static DBusHandlerResult hs_cancel_ringing(DBusConnection *conn, DBusMessage *ms goto done; } - g_timeout_remove(hs->ring_timer); + g_source_remove(hs->ring_timer); hs->ring_timer = 0; done: @@ -1531,7 +1532,7 @@ int main(int argc, char *argv[]) enable_debug(); - main_loop = g_main_new(FALSE); + main_loop = g_main_loop_new(NULL, FALSE); if (headset_dbus_init(NULL) < 0) { error("Unable to get on D-Bus"); @@ -1540,7 +1541,7 @@ int main(int argc, char *argv[]) create_server_socket(); - g_main_run(main_loop); + g_main_loop_run(main_loop); return 0; } |