summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorVinicius Gomes <vinicius.gomes@openbossa.org>2008-03-05 22:06:23 +0000
committerVinicius Gomes <vinicius.gomes@openbossa.org>2008-03-05 22:06:23 +0000
commitf1f605d53e9fdd46c059bf0d08218cbd5c3f0248 (patch)
treed71332a3d2471a83b862ceacbab79324b89ad3cd /hcid
parent3602dd77d79d7e172523d6ae32171b8e22b0e139 (diff)
Introduces the new Adapter Interface.
Diffstat (limited to 'hcid')
-rw-r--r--hcid/adapter.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index 8c7ccd76..d5ed735d 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -3133,6 +3133,18 @@ static void do_append_device(struct device_data *device, DBusMessageIter *iter)
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &path);
}
+static DBusHandlerResult get_properties(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static DBusHandlerResult set_property(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
static DBusHandlerResult list_devices(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -3306,6 +3318,16 @@ GSList *service_classes_str(uint32_t class)
}
static DBusMethodVTable adapter_methods[] = {
+
+ /* BlueZ 4.0 API */
+ { "GetProperties", get_properties, "", "a{sv}" },
+ { "SetProperty", set_property, "", "sv" },
+ { "DiscoverDevices", adapter_discover_devices, "", "" },
+ { "CancelDiscovery", adapter_cancel_discovery, "", "" },
+ { "ListDevices", list_devices, "", "ao" },
+ { "CreateDevice", create_device, "o", "s" },
+ { "RemoveDevice", remove_device, "", "o" },
+ /* Deprecated */
{ "GetInfo", adapter_get_info,
"", "a{sv}" },
{ "GetAddress", adapter_get_address,
@@ -3424,14 +3446,8 @@ static DBusMethodVTable adapter_methods[] = {
"b", "" },
{ "GetPeriodicDiscoveryNameResolving", adapter_get_pdiscov_resolve,
"", "b" },
-
- { "DiscoverDevices", adapter_discover_devices,
- "", "" },
{ "DiscoverDevicesWithoutNameResolving", adapter_discover_devices,
"", "" },
- { "CancelDiscovery", adapter_cancel_discovery,
- "", "" },
-
{ "ListRemoteDevices", adapter_list_remote_devices,
"", "as" },
{ "ListRecentRemoteDevices", adapter_list_recent_remote_devices,
@@ -3446,10 +3462,6 @@ static DBusMethodVTable adapter_methods[] = {
{ "ListTrusts", adapter_list_trusts,
"", "as" },
- { "ListDevices", list_devices, "", "as" },
- { "CreateDevice", create_device, "s", "s" },
- { "RemoveDevice", remove_device, "s", "" },
-
{ NULL, NULL, NULL, NULL }
};