diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-08-19 11:23:04 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-19 14:20:05 -0500 |
commit | b73ebe3c8310a5e67555fbeaf89e393a693420fb (patch) | |
tree | 7b6eabc5ad1b55117323c336ec8add7218fde4e8 /src/gprs.c | |
parent | 7e0f28c7b1198ccc0825d8ec574b14438cdc3cda (diff) | |
download | ofono-b73ebe3c8310a5e67555fbeaf89e393a693420fb.tar.bz2 |
gprs: Update GPRS related DBus interface names
Diffstat (limited to 'src/gprs.c')
-rw-r--r-- | src/gprs.c | 83 |
1 files changed, 39 insertions, 44 deletions
@@ -282,8 +282,9 @@ static void pri_context_signal_settings(struct pri_context *ctx) DBusMessageIter iter; const char *prop = "Settings"; - signal = dbus_message_new_signal(path, OFONO_DATA_CONTEXT_INTERFACE, - "PropertyChanged"); + signal = dbus_message_new_signal(path, + OFONO_CONNECTION_CONTEXT_INTERFACE, + "PropertyChanged"); if (!signal) return; @@ -464,9 +465,8 @@ static void pri_activate_callback(const struct ofono_error *error, value = ctx->active; ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Active", DBUS_TYPE_BOOLEAN, - &value); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Active", DBUS_TYPE_BOOLEAN, &value); } static void pri_deactivate_callback(const struct ofono_error *error, void *data) @@ -495,9 +495,8 @@ static void pri_deactivate_callback(const struct ofono_error *error, void *data) value = ctx->active; ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Active", DBUS_TYPE_BOOLEAN, - &value); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Active", DBUS_TYPE_BOOLEAN, &value); } static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn, @@ -525,9 +524,9 @@ static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "AccessPointName", - DBUS_TYPE_STRING, &apn); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "AccessPointName", + DBUS_TYPE_STRING, &apn); return NULL; } @@ -555,9 +554,9 @@ static DBusMessage *pri_set_username(struct pri_context *ctx, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Username", - DBUS_TYPE_STRING, &username); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Username", + DBUS_TYPE_STRING, &username); return NULL; } @@ -585,9 +584,9 @@ static DBusMessage *pri_set_password(struct pri_context *ctx, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Password", - DBUS_TYPE_STRING, &password); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Password", + DBUS_TYPE_STRING, &password); return NULL; } @@ -616,9 +615,8 @@ static DBusMessage *pri_set_type(struct pri_context *ctx, DBusConnection *conn, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Type", DBUS_TYPE_STRING, - &type); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Type", DBUS_TYPE_STRING, &type); return NULL; } @@ -646,9 +644,8 @@ static DBusMessage *pri_set_proto(struct pri_context *ctx, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Protocol", DBUS_TYPE_STRING, - &str); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Protocol", DBUS_TYPE_STRING, &str); return NULL; } @@ -674,9 +671,8 @@ static DBusMessage *pri_set_name(struct pri_context *ctx, DBusConnection *conn, g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Name", DBUS_TYPE_STRING, - &name); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Name", DBUS_TYPE_STRING, &name); return NULL; } @@ -863,7 +859,8 @@ static gboolean context_dbus_register(struct pri_context *ctx) snprintf(path, sizeof(path), "%s/primarycontext%u", basepath, ctx->id); - if (!g_dbus_register_interface(conn, path, OFONO_DATA_CONTEXT_INTERFACE, + if (!g_dbus_register_interface(conn, path, + OFONO_CONNECTION_CONTEXT_INTERFACE, context_methods, context_signals, NULL, ctx, pri_context_destroy)) { ofono_error("Could not register PrimaryContext %s", path); @@ -888,7 +885,7 @@ static gboolean context_dbus_unregister(struct pri_context *ctx) idmap_put(ctx->gprs->pid_map, ctx->id); return g_dbus_unregister_interface(conn, path, - OFONO_DATA_CONTEXT_INTERFACE); + OFONO_CONNECTION_CONTEXT_INTERFACE); } static char **gprs_contexts_path_list(GSList *context_list) @@ -943,16 +940,15 @@ static void gprs_attached_update(struct ofono_gprs *gprs) value = FALSE; ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Active", DBUS_TYPE_BOOLEAN, - &value); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Active", DBUS_TYPE_BOOLEAN, &value); } } path = __ofono_atom_get_path(gprs->atom); value = attached; ofono_dbus_signal_property_changed(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, "Attached", DBUS_TYPE_BOOLEAN, &value); } @@ -1153,7 +1149,7 @@ static DBusMessage *gprs_set_property(DBusConnection *conn, path = __ofono_atom_get_path(gprs->atom); ofono_dbus_signal_property_changed(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, property, DBUS_TYPE_BOOLEAN, &value); return dbus_message_new_method_return(msg); @@ -1233,7 +1229,7 @@ static DBusMessage *gprs_create_context(DBusConnection *conn, if (objpath_list) { path = __ofono_atom_get_path(gprs->atom); ofono_dbus_signal_array_property_changed(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, "PrimaryContexts", DBUS_TYPE_OBJECT_PATH, &objpath_list); @@ -1283,7 +1279,7 @@ static void gprs_deactivate_for_remove(const struct ofono_error *error, DBusConnection *conn = ofono_dbus_get_connection(); ofono_dbus_signal_array_property_changed(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, "PrimaryContexts", DBUS_TYPE_OBJECT_PATH, &objpath_list); g_strfreev(objpath_list); @@ -1334,7 +1330,7 @@ static DBusMessage *gprs_remove_context(DBusConnection *conn, if (objpath_list) { path = __ofono_atom_get_path(gprs->atom); ofono_dbus_signal_array_property_changed(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, "PrimaryContexts", DBUS_TYPE_OBJECT_PATH, &objpath_list); g_strfreev(objpath_list); @@ -1469,9 +1465,8 @@ void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc, value = FALSE; ofono_dbus_signal_property_changed(conn, ctx->path, - OFONO_DATA_CONTEXT_INTERFACE, - "Active", DBUS_TYPE_BOOLEAN, - &value); + OFONO_CONNECTION_CONTEXT_INTERFACE, + "Active", DBUS_TYPE_BOOLEAN, &value); } } @@ -1625,9 +1620,9 @@ static void gprs_unregister(struct ofono_atom *atom) } ofono_modem_remove_interface(modem, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE); + OFONO_CONNECTION_MANAGER_INTERFACE); g_dbus_unregister_interface(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE); + OFONO_CONNECTION_MANAGER_INTERFACE); } static void gprs_remove(struct ofono_atom *atom) @@ -1879,17 +1874,17 @@ void ofono_gprs_register(struct ofono_gprs *gprs) struct ofono_atom *sim_atom; if (!g_dbus_register_interface(conn, path, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + OFONO_CONNECTION_MANAGER_INTERFACE, manager_methods, manager_signals, NULL, gprs, NULL)) { ofono_error("Could not create %s interface", - OFONO_DATA_CONNECTION_MANAGER_INTERFACE); + OFONO_CONNECTION_MANAGER_INTERFACE); return; } ofono_modem_add_interface(modem, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE); + OFONO_CONNECTION_MANAGER_INTERFACE); sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM); |