From f82b9a32fda9eedab87b97330cf06f024595a351 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 14 Aug 2009 16:04:08 -0500 Subject: [PATCH] Move CALL_FORWARDING_INTERFACE define to dbus.h --- include/dbus.h | 2 ++ src/call-forwarding.c | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/dbus.h b/include/dbus.h index f170fce1..0c84a327 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -33,6 +33,8 @@ extern "C" { #define OFONO_MANAGER_PATH "/" #define OFONO_MODEM_INTERFACE "org.ofono.Modem" #define OFONO_CALL_BARRING_INTERFACE "org.ofono.CallBarring" +#define OFONO_CALL_FORWARDING_INTERFACE "org.ofono.CallForwarding" + /* Essentially a{sv} */ #define OFONO_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \ diff --git a/src/call-forwarding.c b/src/call-forwarding.c index eeaeab63..7224f3dd 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -36,8 +36,6 @@ #include "common.h" #include "ussd.h" -#define CALL_FORWARDING_INTERFACE "org.ofono.CallForwarding" - #define CALL_FORWARDING_FLAG_CACHED 0x1 /* According to 27.007 Spec */ @@ -238,14 +236,14 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, strcmp(oc->phone_number.number, lc->phone_number.number)) ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, attr, DBUS_TYPE_STRING, &number); if (type == CALL_FORWARDING_TYPE_NO_REPLY && oc->time != lc->time) ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, tattr, DBUS_TYPE_UINT16, &timeout); @@ -256,14 +254,14 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, number = phone_number_to_string(&lc->phone_number); ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, attr, DBUS_TYPE_STRING, &number); if (type == CALL_FORWARDING_TYPE_NO_REPLY && lc->time != DEFAULT_NO_REPLY_TIMEOUT) ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, tattr, DBUS_TYPE_UINT16, &timeout); } @@ -282,13 +280,13 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, sprintf(tattr, "%sTimeout", attr); ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, attr, + OFONO_CALL_FORWARDING_INTERFACE, attr, DBUS_TYPE_STRING, &number); if (type == CALL_FORWARDING_TYPE_NO_REPLY && oc->time != DEFAULT_NO_REPLY_TIMEOUT) ofono_dbus_signal_property_changed(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, tattr, DBUS_TYPE_UINT16, &timeout); } @@ -1115,8 +1113,9 @@ static void call_forwarding_unregister(struct ofono_atom *atom) DBusConnection *conn = ofono_dbus_get_connection(); struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom); - ofono_modem_remove_interface(modem, CALL_FORWARDING_INTERFACE); - g_dbus_unregister_interface(conn, path, CALL_FORWARDING_INTERFACE); + ofono_modem_remove_interface(modem, OFONO_CALL_FORWARDING_INTERFACE); + g_dbus_unregister_interface(conn, path, + OFONO_CALL_FORWARDING_INTERFACE); cf_unregister_ss_controls(cf); @@ -1182,18 +1181,18 @@ void ofono_call_forwarding_register(struct ofono_call_forwarding *cf) struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom); if (!g_dbus_register_interface(conn, path, - CALL_FORWARDING_INTERFACE, + OFONO_CALL_FORWARDING_INTERFACE, cf_methods, cf_signals, NULL, cf, NULL)) { ofono_error("Could not create %s interface", - CALL_FORWARDING_INTERFACE); + OFONO_CALL_FORWARDING_INTERFACE); return; } modem->call_forwarding = cf; - ofono_modem_add_interface(modem, CALL_FORWARDING_INTERFACE); + ofono_modem_add_interface(modem, OFONO_CALL_FORWARDING_INTERFACE); cf_register_ss_controls(cf); __ofono_atom_register(cf->atom, call_forwarding_unregister);