mirror of git://git.sysmocom.de/ofono
Move & Rename dbus_gsm_connection
Move to ofono/dbus.h ofono_dbus_get_connection
This commit is contained in:
parent
2dc831a35c
commit
99c1c92708
|
@ -316,7 +316,7 @@ static void msg_destroy(gpointer user)
|
|||
|
||||
static void create_cb(GIOChannel *io, gboolean success, gpointer user)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *msg = user;
|
||||
DBusMessage *reply;
|
||||
struct at_data *at = NULL;
|
||||
|
@ -513,7 +513,7 @@ static void manager_exit(DBusConnection *conn)
|
|||
|
||||
static int atmodem_init(void)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
manager_init(conn);
|
||||
|
||||
|
@ -522,7 +522,7 @@ static int atmodem_init(void)
|
|||
|
||||
static void atmodem_exit(void)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
manager_exit(conn);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ extern "C" {
|
|||
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
DBusConnection *ofono_dbus_get_connection();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -95,7 +95,7 @@ static inline void emit_barring_changed(struct ofono_modem *modem, int start,
|
|||
int end, const char *type, int cls)
|
||||
{
|
||||
struct call_barring_data *cb = modem->call_barring;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char property_name[64];
|
||||
const char *value;
|
||||
int i;
|
||||
|
@ -370,7 +370,7 @@ static gboolean cb_ss_control(struct ofono_modem *modem,
|
|||
DBusMessage *msg)
|
||||
{
|
||||
struct call_barring_data *cb = modem->call_barring;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
int cls = BEARER_CLASS_DEFAULT;
|
||||
const char *fac;
|
||||
DBusMessage *reply;
|
||||
|
@ -504,7 +504,7 @@ static gboolean cb_ss_passwd(struct ofono_modem *modem, const char *sc,
|
|||
DBusMessage *msg)
|
||||
{
|
||||
struct call_barring_data *cb = modem->call_barring;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
const char *fac;
|
||||
|
||||
|
@ -1045,7 +1045,7 @@ static GDBusSignalTable cb_signals[] = {
|
|||
static void call_barring_incoming_enabled_notify(int idx, void *userdata)
|
||||
{
|
||||
struct ofono_modem *modem = userdata;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal(modem->path,
|
||||
|
@ -1062,7 +1062,7 @@ static void call_barring_incoming_enabled_notify(int idx, void *userdata)
|
|||
static void call_barring_outgoing_enabled_notify(int idx, void *userdata)
|
||||
{
|
||||
struct ofono_modem *modem = userdata;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal(modem->path,
|
||||
|
@ -1079,7 +1079,7 @@ static void call_barring_outgoing_enabled_notify(int idx, void *userdata)
|
|||
int ofono_call_barring_register(struct ofono_modem *modem,
|
||||
struct ofono_call_barring_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!modem || !ops)
|
||||
return -1;
|
||||
|
@ -1116,7 +1116,7 @@ int ofono_call_barring_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_call_barring_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!modem->call_barring)
|
||||
return;
|
||||
|
|
|
@ -219,7 +219,7 @@ static void set_new_cond_list(struct ofono_modem *modem, int type, GSList *list)
|
|||
{
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
GSList *old = cf->cf_conditions[type];
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
GSList *l;
|
||||
GSList *o;
|
||||
struct ofono_cf_condition *lc;
|
||||
|
@ -924,7 +924,7 @@ static gboolean cf_ss_control(struct ofono_modem *modem,
|
|||
DBusMessage *msg)
|
||||
{
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
int cls = BEARER_CLASS_SS_DEFAULT;
|
||||
int timeout = DEFAULT_NO_REPLY_TIMEOUT;
|
||||
int cf_type;
|
||||
|
@ -1136,7 +1136,7 @@ static void cf_unregister_ss_controls(struct ofono_modem *modem)
|
|||
int ofono_call_forwarding_register(struct ofono_modem *modem,
|
||||
struct ofono_call_forwarding_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -1176,7 +1176,7 @@ int ofono_call_forwarding_register(struct ofono_modem *modem,
|
|||
void ofono_call_forwarding_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!cf)
|
||||
return;
|
||||
|
|
|
@ -77,7 +77,7 @@ static void set_call_meter(struct ofono_modem *modem, int value)
|
|||
struct call_meter_data *cm = modem->call_meter;
|
||||
|
||||
if (cm->call_meter != value) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
cm->call_meter = value;
|
||||
|
||||
|
@ -94,7 +94,7 @@ static void set_acm(struct ofono_modem *modem, int value)
|
|||
struct call_meter_data *cm = modem->call_meter;
|
||||
|
||||
if (cm->acm != value) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
cm->acm = value;
|
||||
|
||||
|
@ -111,7 +111,7 @@ static void set_acm_max(struct ofono_modem *modem, int value)
|
|||
struct call_meter_data *cm = modem->call_meter;
|
||||
|
||||
if (cm->acm_max != value) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
cm->acm_max = value;
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void set_ppu(struct ofono_modem *modem, double value)
|
|||
struct call_meter_data *cm = modem->call_meter;
|
||||
|
||||
if (cm->ppu != value) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
cm->ppu = value;
|
||||
|
||||
|
@ -150,7 +150,7 @@ static void set_currency(struct ofono_modem *modem, const char *value)
|
|||
}
|
||||
|
||||
if (strcmp(cm->currency, value)) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *dbusval = cm->currency;
|
||||
|
||||
strncpy(cm->currency, value, 3);
|
||||
|
@ -703,7 +703,7 @@ void ofono_call_meter_changed_notify(struct ofono_modem *modem, int new_value)
|
|||
|
||||
void ofono_call_meter_maximum_notify(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal(modem->path,
|
||||
|
@ -720,7 +720,7 @@ void ofono_call_meter_maximum_notify(struct ofono_modem *modem)
|
|||
int ofono_call_meter_register(struct ofono_modem *modem,
|
||||
struct ofono_call_meter_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!modem || !ops)
|
||||
return -1;
|
||||
|
@ -749,7 +749,7 @@ int ofono_call_meter_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_call_meter_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!modem->call_meter)
|
||||
return;
|
||||
|
|
|
@ -140,7 +140,7 @@ static void set_clir_network(struct ofono_modem *modem, int clir)
|
|||
struct call_settings_data *cs = modem->call_settings;
|
||||
|
||||
if (cs->clir != clir) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *str = clir_status_to_string(clir);
|
||||
|
||||
cs->clir = clir;
|
||||
|
@ -157,7 +157,7 @@ static void set_clir_override(struct ofono_modem *modem, int override)
|
|||
struct call_settings_data *cs = modem->call_settings;
|
||||
|
||||
if (cs->clir_setting != override) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *str = hide_callerid_to_string(override);
|
||||
|
||||
cs->clir_setting = override;
|
||||
|
@ -173,7 +173,7 @@ static void set_clip(struct ofono_modem *modem, int clip)
|
|||
struct call_settings_data *cs = modem->call_settings;
|
||||
|
||||
if (cs->clip != clip) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *str = clip_status_to_string(clip);
|
||||
|
||||
cs->clip = clip;
|
||||
|
@ -190,7 +190,7 @@ static void set_colp(struct ofono_modem *modem, int colp)
|
|||
struct call_settings_data *cs = modem->call_settings;
|
||||
|
||||
if (cs->colp != colp) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *str = colp_status_to_string(colp);
|
||||
|
||||
cs->colp = colp;
|
||||
|
@ -207,7 +207,7 @@ static void set_colr(struct ofono_modem *modem, int colr)
|
|||
struct call_settings_data *cs = modem->call_settings;
|
||||
|
||||
if (cs->colr != colr) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *str = colr_status_to_string(colr);
|
||||
|
||||
cs->colr = colr;
|
||||
|
@ -222,7 +222,7 @@ static void set_colr(struct ofono_modem *modem, int colr)
|
|||
static void set_cw(struct ofono_modem *modem, int new_cw, int mask)
|
||||
{
|
||||
struct call_settings_data *cs = modem->call_settings;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char buf[64];
|
||||
int j;
|
||||
const char *value;
|
||||
|
@ -384,7 +384,7 @@ static gboolean cw_ss_control(struct ofono_modem *modem,
|
|||
const char *dn, DBusMessage *msg)
|
||||
{
|
||||
struct call_settings_data *cs = modem->call_settings;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
int cls = BEARER_CLASS_SS_DEFAULT;
|
||||
DBusMessage *reply;
|
||||
|
||||
|
@ -548,7 +548,7 @@ static gboolean clip_colp_colr_ss(struct ofono_modem *modem,
|
|||
const char *dn, DBusMessage *msg)
|
||||
{
|
||||
struct call_settings_data *cs = modem->call_settings;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
void (*query_op)(struct ofono_modem *modem, ofono_call_setting_status_cb_t cb,
|
||||
void *data);
|
||||
|
||||
|
@ -672,7 +672,7 @@ static gboolean clir_ss_control(struct ofono_modem *modem,
|
|||
const char *dn, DBusMessage *msg)
|
||||
{
|
||||
struct call_settings_data *cs = modem->call_settings;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!cs)
|
||||
return FALSE;
|
||||
|
@ -1204,7 +1204,7 @@ static GDBusSignalTable cs_signals[] = {
|
|||
int ofono_call_settings_register(struct ofono_modem *modem,
|
||||
struct ofono_call_settings_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -1240,7 +1240,7 @@ int ofono_call_settings_register(struct ofono_modem *modem,
|
|||
void ofono_call_settings_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
struct call_settings_data *cs = modem->call_settings;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!cs)
|
||||
return;
|
||||
|
|
|
@ -183,7 +183,7 @@ int dbus_gsm_signal_array_property_changed(DBusConnection *conn,
|
|||
return g_dbus_send_message(conn, signal);
|
||||
}
|
||||
|
||||
DBusConnection *dbus_gsm_connection()
|
||||
DBusConnection *ofono_dbus_get_connection()
|
||||
{
|
||||
return g_connection;
|
||||
}
|
||||
|
@ -198,12 +198,12 @@ void dbus_gsm_set_connection(DBusConnection *conn)
|
|||
|
||||
static gboolean system_bus_reconnect(void *user_data)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!conn && (dbus_gsm_init() < 0))
|
||||
return TRUE;
|
||||
|
||||
conn = dbus_gsm_connection();
|
||||
conn = ofono_dbus_get_connection();
|
||||
|
||||
if (conn && dbus_connection_get_is_connected(conn))
|
||||
return FALSE;
|
||||
|
@ -250,7 +250,7 @@ int dbus_gsm_init()
|
|||
|
||||
void dbus_gsm_exit()
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!conn || !dbus_connection_get_is_connected(conn))
|
||||
return;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <ofono/dbus.h>
|
||||
#include <gdbus.h>
|
||||
|
||||
DBusConnection *dbus_gsm_connection();
|
||||
void dbus_gsm_set_connection(DBusConnection *conn);
|
||||
|
||||
int dbus_gsm_init();
|
||||
|
@ -122,7 +121,7 @@ static inline DBusMessage *dbus_gsm_timed_out(DBusMessage *msg)
|
|||
|
||||
static inline void dbus_gsm_pending_reply(DBusMessage **msg, DBusMessage *reply)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ GSList *ofono_manager_get_modems()
|
|||
struct ofono_modem *ofono_modem_register(struct ofono_modem_attribute_ops *ops)
|
||||
{
|
||||
struct ofono_modem *modem;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **modems;
|
||||
|
||||
modem = modem_create(g_next_modem_id, ops);
|
||||
|
@ -97,7 +97,7 @@ struct ofono_modem *ofono_modem_register(struct ofono_modem_attribute_ops *ops)
|
|||
int ofono_modem_unregister(struct ofono_modem *m)
|
||||
{
|
||||
struct ofono_modem *modem = m;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **modems;
|
||||
|
||||
if (modem == NULL)
|
||||
|
@ -162,7 +162,7 @@ static GDBusSignalTable manager_signals[] = {
|
|||
|
||||
int __ofono_manager_init()
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
gboolean ret;
|
||||
|
||||
ret = g_dbus_register_interface(conn, "/", MANAGER_INTERFACE,
|
||||
|
@ -179,7 +179,7 @@ void __ofono_manager_cleanup()
|
|||
{
|
||||
GSList *l;
|
||||
struct ofono_modem *modem;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
/* Clean up in case plugins didn't unregister the modems */
|
||||
for (l = g_modem_list; l; l = l->next) {
|
||||
|
|
|
@ -204,7 +204,7 @@ static gboolean trigger_interface_update(void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct ofono_modem_data *info = modem->modem_info;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
char **interfaces;
|
||||
GSList *l;
|
||||
|
@ -264,7 +264,7 @@ void modem_remove_interface(struct ofono_modem *modem, const char *interface)
|
|||
|
||||
static void finish_attr_query(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
|
||||
modem->modem_info->flags &= ~MODEM_FLAG_INITIALIZING_ATTRS;
|
||||
|
@ -387,7 +387,7 @@ static gboolean query_manufacturer(gpointer user)
|
|||
struct ofono_modem *modem_create(int id, struct ofono_modem_attribute_ops *ops)
|
||||
{
|
||||
char path[MAX_DBUS_PATH_LEN];
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
struct ofono_modem *modem;
|
||||
|
||||
modem = g_try_new0(struct ofono_modem, 1);
|
||||
|
@ -425,7 +425,7 @@ struct ofono_modem *modem_create(int id, struct ofono_modem_attribute_ops *ops)
|
|||
|
||||
void modem_remove(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
/* Need to make a copy to keep gdbus happy */
|
||||
char *path = g_strdup(modem->path);
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ static void register_callback(const struct ofono_error *error, void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
|
||||
if (!netreg->pending)
|
||||
|
@ -182,7 +182,7 @@ out:
|
|||
static void network_operator_populate_registered(struct ofono_modem *modem,
|
||||
char ***network_operators)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **children;
|
||||
int i;
|
||||
int prefix_len;
|
||||
|
@ -278,7 +278,7 @@ static inline const char *network_operator_build_path(struct ofono_modem *modem,
|
|||
|
||||
static void network_operator_emit_available_operators(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **network_operators;
|
||||
|
||||
network_operator_populate_registered(modem, &network_operators);
|
||||
|
@ -297,7 +297,7 @@ static void set_network_operator_status(struct ofono_modem *modem,
|
|||
int status)
|
||||
{
|
||||
struct ofono_network_operator *op = opd->info;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *status_str;
|
||||
const char *path;
|
||||
|
||||
|
@ -319,7 +319,7 @@ static void set_network_operator_technology(struct ofono_modem *modem,
|
|||
int tech)
|
||||
{
|
||||
struct ofono_network_operator *op = opd->info;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *tech_str;
|
||||
const char *path;
|
||||
|
||||
|
@ -394,7 +394,7 @@ static void set_network_operator_name(struct ofono_modem *modem,
|
|||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
struct ofono_network_operator *op = opd->info;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path;
|
||||
const char *operator;
|
||||
|
||||
|
@ -430,7 +430,7 @@ static void set_network_operator_eons_info(struct ofono_modem *modem,
|
|||
const struct sim_eons_operator_info *eons_info)
|
||||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const struct sim_eons_operator_info *old_eons_info = opd->eons_info;
|
||||
const char *path;
|
||||
const char *oldname;
|
||||
|
@ -587,7 +587,7 @@ static struct network_operator_data *
|
|||
enum operator_status status)
|
||||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path;
|
||||
struct network_operator_data *opd = NULL;
|
||||
|
||||
|
@ -632,7 +632,7 @@ err:
|
|||
static gboolean network_operator_dbus_unregister(struct ofono_modem *modem,
|
||||
struct network_operator_data *opd)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path = network_operator_build_path(modem, opd->info);
|
||||
|
||||
return g_dbus_unregister_interface(conn, path,
|
||||
|
@ -839,7 +839,7 @@ static void set_registration_status(struct ofono_modem *modem, int status)
|
|||
{
|
||||
const char *str_status = registration_status_to_string(status);
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
netreg->status = status;
|
||||
|
||||
|
@ -852,7 +852,7 @@ static void set_registration_status(struct ofono_modem *modem, int status)
|
|||
static void set_registration_location(struct ofono_modem *modem, int lac)
|
||||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
dbus_uint16_t dbus_lac = lac;
|
||||
|
||||
if (lac > 0xffff)
|
||||
|
@ -872,7 +872,7 @@ static void set_registration_location(struct ofono_modem *modem, int lac)
|
|||
static void set_registration_cellid(struct ofono_modem *modem, int ci)
|
||||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
dbus_uint32_t dbus_ci = ci;
|
||||
|
||||
netreg->cellid = ci;
|
||||
|
@ -890,7 +890,7 @@ static void set_registration_technology(struct ofono_modem *modem, int tech)
|
|||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
const char *tech_str = registration_tech_to_string(tech);
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
netreg->technology = tech;
|
||||
|
||||
|
@ -905,7 +905,7 @@ static void set_registration_technology(struct ofono_modem *modem, int tech)
|
|||
|
||||
static void initialize_network_registration(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!g_dbus_register_interface(conn, modem->path,
|
||||
NETWORK_REGISTRATION_INTERFACE,
|
||||
|
@ -1043,7 +1043,7 @@ static void current_operator_callback(const struct ofono_error *error,
|
|||
const struct ofono_network_operator *current,
|
||||
void *data)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
struct ofono_modem *modem = data;
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
GSList *op = NULL;
|
||||
|
@ -1159,7 +1159,7 @@ static void init_registration_status(const struct ofono_error *error,
|
|||
void ofono_signal_strength_notify(struct ofono_modem *modem, int strength)
|
||||
{
|
||||
struct network_registration_data *netreg = modem->network_registration;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (netreg->signal_strength == strength)
|
||||
return;
|
||||
|
@ -1289,7 +1289,7 @@ static void sim_spdi_read_cb(struct ofono_modem *modem, int ok,
|
|||
return;
|
||||
|
||||
if (netreg->status == NETWORK_REGISTRATION_STATUS_ROAMING) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *operator;
|
||||
|
||||
if (!sim_spdi_lookup(netreg->spdi,
|
||||
|
@ -1360,7 +1360,7 @@ static void sim_spn_read_cb(struct ofono_modem *modem, int ok,
|
|||
netreg->flags |= NETWORK_REGISTRATION_FLAG_ROAMING_SHOW_SPN;
|
||||
|
||||
if (netreg->current_operator) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *operator;
|
||||
|
||||
operator = get_operator_display_name(modem);
|
||||
|
@ -1404,7 +1404,7 @@ int ofono_network_registration_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_network_registration_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
g_dbus_unregister_interface(conn, modem->path,
|
||||
NETWORK_REGISTRATION_INTERFACE);
|
||||
|
|
|
@ -501,7 +501,7 @@ static GDBusSignalTable phonebook_signals[] = {
|
|||
int ofono_phonebook_register(struct ofono_modem *modem,
|
||||
struct ofono_phonebook_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -533,7 +533,7 @@ int ofono_phonebook_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_phonebook_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem->phonebook == NULL)
|
||||
return;
|
||||
|
|
|
@ -220,7 +220,7 @@ static void sim_msisdn_read_cb(struct ofono_modem *modem, int ok,
|
|||
check:
|
||||
if (record == total && sim->own_numbers) {
|
||||
char **own_numbers;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
/* All records retrieved */
|
||||
sim->own_numbers = g_slist_reverse(sim->own_numbers);
|
||||
|
@ -651,7 +651,7 @@ int ofono_sim_write(struct ofono_modem *modem, int id,
|
|||
|
||||
static void initialize_sim_manager(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!g_dbus_register_interface(conn, modem->path,
|
||||
SIM_MANAGER_INTERFACE,
|
||||
|
@ -773,7 +773,7 @@ int ofono_sim_manager_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_sim_manager_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
g_dbus_unregister_interface(conn, modem->path,
|
||||
SIM_MANAGER_INTERFACE);
|
||||
|
|
|
@ -103,7 +103,7 @@ static void set_sca(struct ofono_modem *modem,
|
|||
const struct ofono_phone_number *sca)
|
||||
{
|
||||
struct sms_manager_data *sms = modem->sms_manager;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *value;
|
||||
|
||||
if (sms->sca.type == sca->type &&
|
||||
|
@ -470,7 +470,7 @@ static void dispatch_text_message(struct ofono_modem *modem,
|
|||
const struct sms_address *addr,
|
||||
const struct sms_scts *scts)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *signal;
|
||||
DBusMessageIter iter;
|
||||
DBusMessageIter dict;
|
||||
|
@ -784,7 +784,7 @@ void ofono_sms_status_notify(struct ofono_modem *modem, unsigned char *pdu,
|
|||
int ofono_sms_manager_register(struct ofono_modem *modem,
|
||||
struct ofono_sms_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -821,7 +821,7 @@ int ofono_sms_manager_register(struct ofono_modem *modem,
|
|||
|
||||
void ofono_sms_manager_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
g_dbus_unregister_interface(conn, modem->path,
|
||||
SMS_MANAGER_INTERFACE);
|
||||
|
|
10
src/ussd.c
10
src/ussd.c
|
@ -279,7 +279,7 @@ static gboolean recognized_passwd_change_string(struct ofono_modem *modem,
|
|||
|
||||
/* If SIC & SID don't match, then we just bail out here */
|
||||
if (strcmp(sic, sid)) {
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply = dbus_gsm_invalid_format(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
return TRUE;
|
||||
|
@ -361,7 +361,7 @@ out:
|
|||
void ofono_ussd_notify(struct ofono_modem *modem, int status, const char *str)
|
||||
{
|
||||
struct ussd_data *ussd = modem->ussd;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *ussdstr = "USSD";
|
||||
const char sig[] = { DBUS_TYPE_STRING, 0 };
|
||||
DBusMessage *reply;
|
||||
|
@ -420,7 +420,7 @@ out:
|
|||
static void ussd_callback(const struct ofono_error *error, void *data)
|
||||
{
|
||||
struct ussd_data *ussd = data;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
|
||||
if (error->type != OFONO_ERROR_TYPE_NO_ERROR)
|
||||
|
@ -547,7 +547,7 @@ static GDBusSignalTable ussd_signals[] = {
|
|||
|
||||
int ofono_ussd_register(struct ofono_modem *modem, struct ofono_ussd_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -581,7 +581,7 @@ int ofono_ussd_register(struct ofono_modem *modem, struct ofono_ussd_ops *ops)
|
|||
|
||||
void ofono_ussd_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem->ussd == NULL)
|
||||
return;
|
||||
|
|
|
@ -361,7 +361,7 @@ static void voicecall_set_call_status(struct ofono_modem *modem,
|
|||
struct voicecall *call,
|
||||
int status)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path;
|
||||
const char *status_str;
|
||||
int old_status;
|
||||
|
@ -404,7 +404,7 @@ static void voicecall_set_call_lineid(struct ofono_modem *modem,
|
|||
int clip_validity)
|
||||
{
|
||||
struct ofono_call *call = v->call;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path;
|
||||
const char *lineid_str;
|
||||
|
||||
|
@ -441,7 +441,7 @@ static void voicecall_set_call_lineid(struct ofono_modem *modem,
|
|||
|
||||
static gboolean voicecall_dbus_register(struct voicecall *voicecall)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path;
|
||||
|
||||
if (!voicecall)
|
||||
|
@ -466,7 +466,7 @@ static gboolean voicecall_dbus_register(struct voicecall *voicecall)
|
|||
static gboolean voicecall_dbus_unregister(struct ofono_modem *modem,
|
||||
struct voicecall *call)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
const char *path = voicecall_build_path(modem, call->call);
|
||||
|
||||
return g_dbus_unregister_interface(conn, path,
|
||||
|
@ -1132,7 +1132,7 @@ static gboolean real_emit_call_list_changed(void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *voicecalls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **objpath_list;
|
||||
|
||||
voicecalls_path_list(modem, voicecalls->call_list, &objpath_list);
|
||||
|
@ -1169,7 +1169,7 @@ static gboolean real_emit_multiparty_call_list_changed(void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *voicecalls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
char **objpath_list;
|
||||
|
||||
voicecalls_path_list(modem, voicecalls->multiparty_list, &objpath_list);
|
||||
|
@ -1332,7 +1332,7 @@ err:
|
|||
static void generic_callback(const struct ofono_error *error, void *data)
|
||||
{
|
||||
struct voicecalls_data *calls = data;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
|
||||
if (error->type != OFONO_ERROR_TYPE_NO_ERROR)
|
||||
|
@ -1359,7 +1359,7 @@ static void multirelease_callback(const struct ofono_error *error, void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *calls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
|
||||
if (g_slist_length(calls->release_list)) {
|
||||
|
@ -1417,7 +1417,7 @@ static void dial_callback(const struct ofono_error *error, void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *calls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
GSList *l;
|
||||
struct ofono_call *call;
|
||||
|
@ -1531,7 +1531,7 @@ static void multiparty_create_callback(const struct ofono_error *error, void *da
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *calls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
gboolean need_to_emit = FALSE;
|
||||
|
||||
|
@ -1592,7 +1592,7 @@ static void private_chat_callback(const struct ofono_error *error, void *data)
|
|||
{
|
||||
struct ofono_modem *modem = data;
|
||||
struct voicecalls_data *calls = modem->voicecalls;
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
DBusMessage *reply;
|
||||
gboolean need_to_emit = FALSE;
|
||||
const char *callpath;
|
||||
|
@ -1651,7 +1651,7 @@ out:
|
|||
|
||||
int ofono_voicecall_register(struct ofono_modem *modem, struct ofono_voicecall_ops *ops)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (modem == NULL)
|
||||
return -1;
|
||||
|
@ -1685,7 +1685,7 @@ int ofono_voicecall_register(struct ofono_modem *modem, struct ofono_voicecall_o
|
|||
|
||||
void ofono_voicecall_unregister(struct ofono_modem *modem)
|
||||
{
|
||||
DBusConnection *conn = dbus_gsm_connection();
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
if (!modem->voicecalls)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue