org.bluez.Error.NotSupported
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ void DisconnectExtProfile(object profile)
+
+ This method disconnects a specific profile of
+ this device. The profile needs to be added by
+ RegisterProfile method call.
+
+ This method could be used when multiple profiles with
+ same UUID are registered and it needs to disconnect one
+ of them.
+
+ There is no connection tracking for a profile, so
+ as long as the profile is registered this will always
+ succeed.
+
+ Possible errors: org.bluez.Error.Failed
+ org.bluez.Error.InProgress
+ org.bluez.Error.InvalidArguments
+ org.bluez.Error.NotSupported
+#endif
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
void Pair(uint8 conn_type)
#else
void Pair()
return btd_error_failed(msg, strerror(-err));
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+static DBusMessage *disconnect_ext_profile(DBusConnection *conn,
+ DBusMessage *msg, void *user_data)
+{
+ struct btd_device *dev = user_data;
+ struct btd_profile *profile;
+ struct btd_service *service;
+ const char *sender, *path;
+ GSList *l;
+ int err;
+
+ sender = dbus_message_get_sender(msg);
+
+ DBG("sender %s", sender);
+
+ if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path,
+ DBUS_TYPE_INVALID))
+ return btd_error_invalid_args(msg);
+
+ profile = btd_profile_find_ext(sender, path);
+ if (!profile)
+ return btd_error_invalid_args(msg);
+
+ l = find_service_with_profile(dev->services, profile);
+ if (!l)
+ return btd_error_invalid_args(msg);
+
+ service = l->data;
+
+ if (dev->disconnect)
+ return btd_error_in_progress(msg);
+
+ dev->disconnect = dbus_message_ref(msg);
+
+ err = btd_service_disconnect(service);
+ if (err == 0)
+ return NULL;
+
+ if (dev->disconnect)
+ dbus_message_unref(dev->disconnect);
+ dev->disconnect = NULL;
+
+ if (err == -ENOTSUP)
+ return btd_error_not_supported(msg);
+
+ return btd_error_failed(msg, strerror(-err));
+}
+#endif
+
static void store_services(struct btd_device *device)
{
struct btd_adapter *adapter = device->adapter;
{ GDBUS_ASYNC_METHOD("DisconnectProfile", GDBUS_ARGS({ "UUID", "s" }),
NULL, disconnect_profile) },
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ { GDBUS_ASYNC_METHOD("DisconnectExtProfile",
+ GDBUS_ARGS({ "profile", "o" }), NULL,
+ disconnect_ext_profile) },
{ GDBUS_ASYNC_METHOD("Pair", GDBUS_ARGS({ "conn_type", "y" }), NULL,
pair_device) },
#else