From ed1720ea36d26611e28d9c477b221ba5059633bc Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 14 Aug 2009 16:08:56 -0500 Subject: [PATCH] Move PHONEBOOK_INTERFACE define to dbus.h --- include/dbus.h | 1 + src/phonebook.c | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/dbus.h b/include/dbus.h index fe331d0..ecde940 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -35,6 +35,7 @@ extern "C" { #define OFONO_CALL_BARRING_INTERFACE "org.ofono.CallBarring" #define OFONO_CALL_FORWARDING_INTERFACE "org.ofono.CallForwarding" #define OFONO_CALL_METER_INTERFACE "org.ofono.CallMeter" +#define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook" /* Essentially a{sv} */ #define OFONO_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \ diff --git a/src/phonebook.c b/src/phonebook.c index 24e6d3d..c6d680e 100644 --- a/src/phonebook.c +++ b/src/phonebook.c @@ -38,7 +38,6 @@ #include "driver.h" #include "common.h" -#define PHONEBOOK_INTERFACE "org.ofono.Phonebook" #define LEN_MAX 128 #define TYPE_INTERNATIONAL 145 @@ -518,8 +517,8 @@ static void phonebook_unregister(struct ofono_atom *atom) DBusConnection *conn = ofono_dbus_get_connection(); struct ofono_modem *modem = __ofono_atom_get_modem(pb->atom); - ofono_modem_remove_interface(modem, PHONEBOOK_INTERFACE); - g_dbus_unregister_interface(conn, path, PHONEBOOK_INTERFACE); + ofono_modem_remove_interface(modem, OFONO_PHONEBOOK_INTERFACE); + g_dbus_unregister_interface(conn, path, OFONO_PHONEBOOK_INTERFACE); } static void phonebook_remove(struct ofono_atom *atom) @@ -579,16 +578,16 @@ void ofono_phonebook_register(struct ofono_phonebook *pb) const char *path = __ofono_atom_get_path(pb->atom); struct ofono_modem *modem = __ofono_atom_get_modem(pb->atom); - if (!g_dbus_register_interface(conn, path, PHONEBOOK_INTERFACE, + if (!g_dbus_register_interface(conn, path, OFONO_PHONEBOOK_INTERFACE, phonebook_methods, phonebook_signals, NULL, pb, NULL)) { ofono_error("Could not create %s interface", - PHONEBOOK_INTERFACE); + OFONO_PHONEBOOK_INTERFACE); return; } - ofono_modem_add_interface(modem, PHONEBOOK_INTERFACE); + ofono_modem_add_interface(modem, OFONO_PHONEBOOK_INTERFACE); __ofono_atom_register(pb->atom, phonebook_unregister); } -- 2.7.4