mirror of git://git.sysmocom.de/ofono
Move cbs interface definition to dbus.h
This commit is contained in:
parent
500f291030
commit
0e09221ea5
|
@ -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"
|
||||
|
|
22
src/cbs.c
22
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue