{
DBG("");
- bt_register_profile_with_role(conn, DUN_GW_UUID, DUN_VERSION_1_2,
- "dun_dt", DUN_DT_PROFILE_PATH, "client");
+ bt_register_profile(conn, DUN_GW_UUID, DUN_VERSION_1_2, "dun_dt",
+ DUN_DT_PROFILE_PATH, "client", 0);
}
int __dundee_bluetooth_init(void)
dbus_message_unref(reply);
}
-int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
+int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object, const char *role)
+ const char *object, const char *role,
+ uint16_t features)
{
DBusMessageIter iter, dict;
DBusPendingCall *c;
if (role)
ofono_dbus_dict_append(&dict, "Role", DBUS_TYPE_STRING, &role);
+ if (features)
+ ofono_dbus_dict_append(&dict, "Features", DBUS_TYPE_UINT16,
+ &features);
+
dbus_message_iter_close_container(&iter, &dict);
if (!dbus_connection_send_with_reply(conn, msg, &c, -1)) {
return 0;
}
-int bt_register_profile(DBusConnection *conn, const char *uuid,
- uint16_t version, const char *name,
- const char *object)
-{
- return bt_register_profile_with_role(conn, uuid, version, name, object,
- NULL);
-}
-
void bt_unregister_profile(DBusConnection *conn, const char *object)
{
DBusMessageIter iter;
#define HFP_HS_UUID "0000111e-0000-1000-8000-00805f9b34fb"
#define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
-int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
- uint16_t version, const char *name,
- const char *object, const char *role);
-
int bt_register_profile(DBusConnection *conn, const char *uuid,
uint16_t version, const char *name,
- const char *object);
+ const char *object, const char *role,
+ uint16_t features);
void bt_unregister_profile(DBusConnection *conn, const char *object);
if (modems->next == NULL)
bt_register_profile(conn, DUN_GW_UUID, DUN_GW_VERSION_1_0,
- "dun_gw", DUN_GW_EXT_PROFILE_PATH);
+ "dun_gw", DUN_GW_EXT_PROFILE_PATH, NULL, 0);
}
static void modem_watch(struct ofono_modem *modem, gboolean added, void *user)
return;
bt_register_profile(conn, HFP_AG_UUID, HFP_VERSION_1_5, "hfp_ag",
- HFP_AG_EXT_PROFILE_PATH);
+ HFP_AG_EXT_PROFILE_PATH, NULL, 0);
}
static gboolean sim_watch_remove(gpointer key, gpointer value,
DBG("Registering External Profile handler ...");
bt_register_profile(conn, HFP_HS_UUID, HFP_VERSION_1_6, "hfp_hf",
- HFP_EXT_PROFILE_PATH);
+ HFP_EXT_PROFILE_PATH, NULL, 0);
}
static gboolean has_hfp_ag_uuid(DBusMessageIter *array)