summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-03-22 15:36:04 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-03-22 15:36:04 -0500
commit0e09221ea531bbea039e4ca2d0f83e47e1ded1ff (patch)
tree38eaace0176894fb930e486bb898a2153dd47daa
parent500f291030d85a2396116d0c46396705e08f93f2 (diff)
downloadofono-0e09221ea531bbea039e4ca2d0f83e47e1ded1ff.tar.gz
Move cbs interface definition to dbus.h
-rw-r--r--include/dbus.h1
-rw-r--r--src/cbs.c22
2 files changed, 11 insertions, 12 deletions
diff --git a/include/dbus.h b/include/dbus.h
index 4b9ead14..ab5e4ae8 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -37,6 +37,7 @@ extern "C" {
#define OFONO_CALL_METER_INTERFACE "org.ofono.CallMeter"
#define OFONO_CALL_SETTINGS_INTERFACE "org.ofono.CallSettings"
#define OFONO_CALL_VOLUME_INTERFACE OFONO_SERVICE ".CallVolume"
+#define OFONO_CBS_MANAGER_INTERFACE "org.ofono.CbsManager"
#define OFONO_MESSAGE_WAITING_INTERFACE "org.ofono.MessageWaiting"
#define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook"
#define OFONO_RADIO_SETTINGS_INTERFACE "org.ofono.RadioSettings"
diff --git a/src/cbs.c b/src/cbs.c
index 899e8ac0..d04404ed 100644
--- a/src/cbs.c
+++ b/src/cbs.c
@@ -38,8 +38,6 @@
#include "simutil.h"
#include "storage.h"
-#define CBS_MANAGER_INTERFACE "org.ofono.CbsManager"
-
#define SETTINGS_STORE "cbs"
#define SETTINGS_GROUP "Settings"
@@ -130,7 +128,7 @@ static void cbs_dispatch_emergency(struct ofono_cbs *cbs, const char *message,
return;
};
- signal = dbus_message_new_signal(path, CBS_MANAGER_INTERFACE,
+ signal = dbus_message_new_signal(path, OFONO_CBS_MANAGER_INTERFACE,
"EmergencyBroadcast");
if (!signal)
@@ -164,7 +162,7 @@ static void cbs_dispatch_text(struct ofono_cbs *cbs, enum sms_class cls,
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cbs->atom);
- g_dbus_emit_signal(conn, path, CBS_MANAGER_INTERFACE,
+ g_dbus_emit_signal(conn, path, OFONO_CBS_MANAGER_INTERFACE,
"IncomingBroadcast",
DBUS_TYPE_STRING, &message,
DBUS_TYPE_UINT16, &channel,
@@ -347,7 +345,7 @@ static void cbs_set_topics_cb(const struct ofono_error *error, void *data)
topics = cbs_topic_ranges_to_string(cbs->topics);
ofono_dbus_signal_property_changed(conn, path,
- CBS_MANAGER_INTERFACE,
+ OFONO_CBS_MANAGER_INTERFACE,
"Topics",
DBUS_TYPE_STRING, &topics);
@@ -418,7 +416,7 @@ static void cbs_set_powered_cb(const struct ofono_error *error, void *data)
}
ofono_dbus_signal_property_changed(conn, path,
- CBS_MANAGER_INTERFACE,
+ OFONO_CBS_MANAGER_INTERFACE,
"Powered",
DBUS_TYPE_BOOLEAN,
&cbs->powered);
@@ -467,7 +465,7 @@ done:
}
ofono_dbus_signal_property_changed(conn, path,
- CBS_MANAGER_INTERFACE,
+ OFONO_CBS_MANAGER_INTERFACE,
"Powered",
DBUS_TYPE_BOOLEAN,
&cbs->powered);
@@ -569,8 +567,8 @@ static void cbs_unregister(struct ofono_atom *atom)
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
- g_dbus_unregister_interface(conn, path, CBS_MANAGER_INTERFACE);
- ofono_modem_remove_interface(modem, CBS_MANAGER_INTERFACE);
+ g_dbus_unregister_interface(conn, path, OFONO_CBS_MANAGER_INTERFACE);
+ ofono_modem_remove_interface(modem, OFONO_CBS_MANAGER_INTERFACE);
if (cbs->topics) {
g_slist_foreach(cbs->topics, (GFunc)g_free, NULL);
@@ -1032,16 +1030,16 @@ void ofono_cbs_register(struct ofono_cbs *cbs)
struct ofono_atom *netreg_atom;
if (!g_dbus_register_interface(conn, path,
- CBS_MANAGER_INTERFACE,
+ OFONO_CBS_MANAGER_INTERFACE,
cbs_manager_methods,
cbs_manager_signals,
NULL, cbs, NULL)) {
ofono_error("Could not create %s interface",
- CBS_MANAGER_INTERFACE);
+ OFONO_CBS_MANAGER_INTERFACE);
return;
}
- ofono_modem_add_interface(modem, CBS_MANAGER_INTERFACE);
+ ofono_modem_add_interface(modem, OFONO_CBS_MANAGER_INTERFACE);
sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM);