summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-24 17:42:51 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-24 17:42:51 +0000
commitfc2954dca85c9835eee190a24fc4dcce43a29c3b (patch)
treee1b88b7eff54737bfe819cf1c2ef6dcec37edcb4
parentbb537bf4f89ddfed96beeed8314ef944970334a0 (diff)
Reorder functions and update to the latest specification
-rw-r--r--hcid/dbus-device.c66
-rw-r--r--hcid/dbus.h155
2 files changed, 122 insertions, 99 deletions
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c
index 1f12ea8c..ac592686 100644
--- a/hcid/dbus-device.c
+++ b/hcid/dbus-device.c
@@ -813,6 +813,24 @@ static DBusMessage *handle_dev_get_remote_version_req(DBusMessage *msg, void *da
return bluez_new_failure_msg(msg, BLUEZ_EDBUS_NOT_IMPLEMENTED);
}
+static DBusMessage *handle_dev_get_remote_revision_req(DBusMessage *msg, void *data)
+{
+ /*FIXME: */
+ return bluez_new_failure_msg(msg, BLUEZ_EDBUS_NOT_IMPLEMENTED);
+}
+
+static DBusMessage *handle_dev_get_remote_manufacturer_req(DBusMessage *msg, void *data)
+{
+ /*FIXME: */
+ return bluez_new_failure_msg(msg, BLUEZ_EDBUS_NOT_IMPLEMENTED);
+}
+
+static DBusMessage *handle_dev_get_remote_company_req(DBusMessage *msg, void *data)
+{
+ /*FIXME: */
+ return bluez_new_failure_msg(msg, BLUEZ_EDBUS_NOT_IMPLEMENTED);
+}
+
static DBusMessage *handle_dev_create_bonding_req(DBusMessage *msg, void *data)
{
struct hci_request rq;
@@ -1099,47 +1117,47 @@ static DBusMessage *handle_dev_encryption_key_size_req(DBusMessage *msg, void *d
static const struct service_data dev_services[] = {
{ DEV_GET_ADDRESS, handle_dev_get_address_req, DEV_GET_ADDRESS_SIGNATURE },
+ { DEV_GET_VERSION, handle_dev_get_version_req, DEV_GET_VERSION_SIGNATURE },
+ { DEV_GET_REVISION, handle_dev_get_revision_req, DEV_GET_REVISION_SIGNATURE },
+ { DEV_GET_MANUFACTURER, handle_dev_get_manufacturer_req, DEV_GET_MANUFACTURER_SIGNATURE },
{ DEV_GET_COMPANY, handle_dev_get_company_req, DEV_GET_COMPANY_SIGNATURE },
- { DEV_GET_DISCOVERABLE_TO, handle_dev_get_discoverable_to_req, DEV_GET_DISCOVERABLE_TO_SIGNATURE },
{ DEV_GET_FEATURES, handle_dev_get_features_req, DEV_GET_FEATURES_SIGNATURE },
- { DEV_GET_MAJOR_CLASS, handle_dev_get_major_class_req, DEV_GET_MAJOR_CLASS_SIGNATURE },
- { DEV_GET_MANUFACTURER, handle_dev_get_manufacturer_req, DEV_GET_MANUFACTURER_SIGNATURE },
- { DEV_GET_MINOR_CLASS, handle_dev_get_minor_class_req, DEV_GET_MINOR_CLASS_SIGNATURE },
{ DEV_GET_MODE, handle_dev_get_mode_req, DEV_GET_MODE_SIGNATURE },
- { DEV_GET_NAME, handle_dev_get_name_req, DEV_GET_NAME_SIGNATURE },
- { DEV_GET_REVISION, handle_dev_get_revision_req, DEV_GET_REVISION_SIGNATURE },
- { DEV_GET_SERVICE_CLASSES, handle_dev_get_service_classes_req, DEV_GET_SERVICE_CLASSES_SIGNATURE },
- { DEV_GET_VERSION, handle_dev_get_version_req, DEV_GET_VERSION_SIGNATURE },
-
+ { DEV_SET_MODE, handle_dev_set_mode_req, DEV_SET_MODE_SIGNATURE },
+ { DEV_GET_DISCOVERABLE_TO, handle_dev_get_discoverable_to_req, DEV_GET_DISCOVERABLE_TO_SIGNATURE },
+ { DEV_SET_DISCOVERABLE_TO, handle_dev_set_discoverable_to_req, DEV_SET_DISCOVERABLE_TO_SIGNATURE },
{ DEV_IS_CONNECTABLE, handle_dev_is_connectable_req, DEV_IS_CONNECTABLE_SIGNATURE },
{ DEV_IS_DISCOVERABLE, handle_dev_is_discoverable_req, DEV_IS_DISCOVERABLE_SIGNATURE },
-
- { DEV_SET_DISCOVERABLE_TO, handle_dev_set_discoverable_to_req, DEV_SET_DISCOVERABLE_TO_SIGNATURE },
+ { DEV_GET_MAJOR_CLASS, handle_dev_get_major_class_req, DEV_GET_MAJOR_CLASS_SIGNATURE },
+ { DEV_GET_MINOR_CLASS, handle_dev_get_minor_class_req, DEV_GET_MINOR_CLASS_SIGNATURE },
{ DEV_SET_MINOR_CLASS, handle_dev_set_minor_class_req, DEV_SET_MINOR_CLASS_SIGNATURE },
- { DEV_SET_MODE, handle_dev_set_mode_req, DEV_SET_MODE_SIGNATURE },
+ { DEV_GET_SERVICE_CLASSES, handle_dev_get_service_classes_req, DEV_GET_SERVICE_CLASSES_SIGNATURE },
+ { DEV_GET_NAME, handle_dev_get_name_req, DEV_GET_NAME_SIGNATURE },
{ DEV_SET_NAME, handle_dev_set_name_req, DEV_SET_NAME_SIGNATURE },
- { DEV_DISCOVER, handle_dev_discover_req, DEV_DISCOVER_SIGNATURE },
- { DEV_DISCOVER_CACHE, handle_dev_discover_cache_req, DEV_DISCOVER_CACHE_SIGNATURE },
- { DEV_DISCOVER_CANCEL, handle_dev_discover_cancel_req, DEV_DISCOVER_CANCEL_SIGNATURE },
- { DEV_DISCOVER_SERVICE, handle_dev_discover_service_req, DEV_DISCOVER_SERVICE_SIGNATURE },
+ { DEV_GET_REMOTE_VERSION, handle_dev_get_remote_version_req, DEV_GET_REMOTE_VERSION_SIGNATURE },
+ { DEV_GET_REMOTE_REVISION, handle_dev_get_remote_revision_req, DEV_GET_REMOTE_REVISION_SIGNATURE },
+ { DEV_GET_REMOTE_MANUFACTURER, handle_dev_get_remote_manufacturer_req, DEV_GET_REMOTE_MANUFACTURER_SIGNATURE },
+ { DEV_GET_REMOTE_COMPANY, handle_dev_get_remote_company_req, DEV_GET_REMOTE_COMPANY_SIGNATURE },
+ { DEV_GET_REMOTE_NAME, handle_dev_get_remote_name_req, DEV_GET_REMOTE_NAME_SIGNATURE },
+ { DEV_GET_REMOTE_ALIAS, handle_dev_get_remote_alias_req, DEV_GET_REMOTE_ALIAS_SIGNATURE },
+ { DEV_SET_REMOTE_ALIAS, handle_dev_set_remote_alias_req, DEV_SET_REMOTE_ALIAS_SIGNATURE },
{ DEV_LAST_SEEN, handle_dev_last_seen_req, DEV_LAST_SEEN_SIGNATURE },
{ DEV_LAST_USED, handle_dev_last_used_req, DEV_LAST_USED_SIGNATURE },
- { DEV_SET_REMOTE_ALIAS, handle_dev_set_remote_alias_req, DEV_SET_REMOTE_ALIAS_SIGNATURE },
- { DEV_GET_REMOTE_ALIAS, handle_dev_get_remote_alias_req, DEV_GET_REMOTE_ALIAS_SIGNATURE },
- { DEV_GET_REMOTE_NAME, handle_dev_get_remote_name_req, DEV_GET_REMOTE_NAME_SIGNATURE },
- { DEV_GET_REMOTE_VERSION, handle_dev_get_remote_version_req, DEV_GET_REMOTE_VERSION_SIGNATURE },
-
{ DEV_CREATE_BONDING, handle_dev_create_bonding_req, DEV_CREATE_BONDING_SIGNATURE },
- { DEV_LIST_BONDINGS, handle_dev_list_bondings_req, DEV_LIST_BONDINGS_SIGNATURE },
- { DEV_HAS_BONDING_NAME, handle_dev_has_bonding_req, DEV_HAS_BONDING_SIGNATURE },
{ DEV_REMOVE_BONDING, handle_dev_remove_bonding_req, DEV_REMOVE_BONDING_SIGNATURE },
-
+ { DEV_HAS_BONDING_NAME, handle_dev_has_bonding_req, DEV_HAS_BONDING_SIGNATURE },
+ { DEV_LIST_BONDINGS, handle_dev_list_bondings_req, DEV_LIST_BONDINGS_SIGNATURE },
{ DEV_PIN_CODE_LENGTH, handle_dev_pin_code_length_req, DEV_PIN_CODE_LENGTH_SIGNATURE },
{ DEV_ENCRYPTION_KEY_SIZE, handle_dev_encryption_key_size_req, DEV_ENCRYPTION_KEY_SIZE_SIGNATURE },
+ { DEV_DISCOVER, handle_dev_discover_req, DEV_DISCOVER_SIGNATURE },
+ { DEV_DISCOVER_CACHE, handle_dev_discover_cache_req, DEV_DISCOVER_CACHE_SIGNATURE },
+ { DEV_DISCOVER_CANCEL, handle_dev_discover_cancel_req, DEV_DISCOVER_CANCEL_SIGNATURE },
+ { DEV_DISCOVER_SERVICE, handle_dev_discover_service_req, DEV_DISCOVER_SERVICE_SIGNATURE },
+
{ NULL, NULL, NULL}
};
diff --git a/hcid/dbus.h b/hcid/dbus.h
index acbd6c62..b6ad32b3 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -109,97 +109,102 @@ int get_default_dev_id(void);
BlueZ D-Bus Device path definitions "/org/bluez/Device"
*========================================================================*/
#define DEV_GET_ADDRESS "GetAddress"
+#define DEV_GET_VERSION "GetVersion"
+#define DEV_GET_REVISION "GetRevision"
+#define DEV_GET_MANUFACTURER "GetManufacturer"
#define DEV_GET_COMPANY "GetCompany"
-#define DEV_GET_DISCOVERABLE_TO "GetDiscoverableTimeout"
#define DEV_GET_FEATURES "GetFeatures"
-#define DEV_GET_MAJOR_CLASS "GetMajorClass"
-#define DEV_GET_MANUFACTURER "GetManufacturer"
-#define DEV_GET_MINOR_CLASS "GetMinorClass"
#define DEV_GET_MODE "GetMode"
-#define DEV_GET_NAME "GetName"
-#define DEV_GET_REVISION "GetRevision"
-#define DEV_GET_SERVICE_CLASSES "GetServiceClasses"
-#define DEV_GET_VERSION "GetVersion"
+#define DEV_SET_MODE "SetMode"
+#define DEV_GET_DISCOVERABLE_TO "GetDiscoverableTimeout"
+#define DEV_SET_DISCOVERABLE_TO "SetDiscoverableTimeout"
#define DEV_IS_CONNECTABLE "IsConnectable"
#define DEV_IS_DISCOVERABLE "IsDiscoverable"
-#define DEV_SET_DISCOVERABLE_TO "SetDiscoverableTimeout"
+#define DEV_GET_MAJOR_CLASS "GetMajorClass"
+#define DEV_GET_MINOR_CLASS "GetMinorClass"
#define DEV_SET_MINOR_CLASS "SetMinorClass"
-#define DEV_SET_MODE "SetMode"
+#define DEV_GET_SERVICE_CLASSES "GetServiceClasses"
+#define DEV_GET_NAME "GetName"
#define DEV_SET_NAME "SetName"
-#define DEV_DISCOVER "Discover"
-#define DEV_DISCOVER_CACHE "DiscoverCache"
-#define DEV_DISCOVER_CANCEL "DiscoverCancel"
-#define DEV_DISCOVER_SERVICE "DiscoverService"
+#define DEV_GET_REMOTE_VERSION "GetRemoteVersion"
+#define DEV_GET_REMOTE_REVISION "GetRemoteRevision"
+#define DEV_GET_REMOTE_MANUFACTURER "GetRemoteManufacturer"
+#define DEV_GET_REMOTE_COMPANY "GetRemoteCompany"
+#define DEV_GET_REMOTE_NAME "GetRemoteName"
+#define DEV_GET_REMOTE_ALIAS "GetRemoteAlias"
+#define DEV_SET_REMOTE_ALIAS "SetRemoteAlias"
#define DEV_LAST_SEEN "LastSeen"
#define DEV_LAST_USED "LastUsed"
-#define DEV_SET_REMOTE_ALIAS "SetRemoteAlias"
-#define DEV_GET_REMOTE_ALIAS "GetRemoteAlias"
-#define DEV_GET_REMOTE_NAME "GetRemoteName"
-#define DEV_GET_REMOTE_VERSION "GetRemoteVersion"
#define DEV_CREATE_BONDING "CreateBonding"
-#define DEV_LIST_BONDINGS "ListBondings"
-#define DEV_HAS_BONDING_NAME "HasBonding"
#define DEV_REMOVE_BONDING "RemoveBonding"
+#define DEV_HAS_BONDING_NAME "HasBonding"
+#define DEV_LIST_BONDINGS "ListBondings"
#define DEV_PIN_CODE_LENGTH "PinCodeLength"
#define DEV_ENCRYPTION_KEY_SIZE "EncryptionKeySize"
+#define DEV_DISCOVER "Discover"
+#define DEV_DISCOVER_CACHE "DiscoverCache"
+#define DEV_DISCOVER_CANCEL "DiscoverCancel"
+#define DEV_DISCOVER_SERVICE "DiscoverService"
/*FIXME: maybe this section can be moved to a internal header file */
/* Device service signature */
-#define DEV_GET_ADDRESS_SIGNATURE __END_SIG__
-#define DEV_GET_COMPANY_SIGNATURE __END_SIG__
-#define DEV_GET_DISCOVERABLE_TO_SIGNATURE __END_SIG__
-#define DEV_GET_FEATURES_SIGNATURE __END_SIG__
-#define DEV_GET_MAJOR_CLASS_SIGNATURE __END_SIG__
-#define DEV_GET_MANUFACTURER_SIGNATURE __END_SIG__
-#define DEV_GET_MINOR_CLASS_SIGNATURE __END_SIG__
-#define DEV_GET_MODE_SIGNATURE __END_SIG__
-#define DEV_GET_NAME_SIGNATURE __END_SIG__
-#define DEV_GET_REVISION_SIGNATURE __END_SIG__
-#define DEV_GET_SERVICE_CLASSES_SIGNATURE __END_SIG__
-#define DEV_GET_VERSION_SIGNATURE __END_SIG__
-#define DEV_IS_CONNECTABLE_SIGNATURE __END_SIG__
-#define DEV_IS_DISCOVERABLE_SIGNATURE __END_SIG__
-#define DEV_SET_CLASS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_SET_DISCOVERABLE_TO_SIGNATURE DBUS_TYPE_UINT32_AS_STRING \
- __END_SIG__
-#define DEV_SET_MINOR_CLASS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_SET_MODE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_SET_NAME_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_DISCOVER_SIGNATURE __END_SIG__
-#define DEV_DISCOVER_CACHE_SIGNATURE __END_SIG__
-#define DEV_DISCOVER_CANCEL_SIGNATURE __END_SIG__
-#define DEV_DISCOVER_SERVICE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_LAST_SEEN_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_LAST_USED_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_SET_REMOTE_ALIAS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_GET_REMOTE_ALIAS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_GET_REMOTE_NAME_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_GET_REMOTE_VERSION_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_CREATE_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_LIST_BONDINGS_SIGNATURE __END_SIG__
-#define DEV_HAS_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_REMOVE_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_PIN_CODE_LENGTH_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-#define DEV_ENCRYPTION_KEY_SIZE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
- __END_SIG__
-
+#define DEV_GET_ADDRESS_SIGNATURE __END_SIG__
+#define DEV_GET_VERSION_SIGNATURE __END_SIG__
+#define DEV_GET_REVISION_SIGNATURE __END_SIG__
+#define DEV_GET_MANUFACTURER_SIGNATURE __END_SIG__
+#define DEV_GET_COMPANY_SIGNATURE __END_SIG__
+#define DEV_GET_FEATURES_SIGNATURE __END_SIG__
+#define DEV_GET_MODE_SIGNATURE __END_SIG__
+#define DEV_SET_MODE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_DISCOVERABLE_TO_SIGNATURE __END_SIG__
+#define DEV_SET_DISCOVERABLE_TO_SIGNATURE DBUS_TYPE_UINT32_AS_STRING \
+ __END_SIG__
+#define DEV_IS_CONNECTABLE_SIGNATURE __END_SIG__
+#define DEV_IS_DISCOVERABLE_SIGNATURE __END_SIG__
+#define DEV_GET_MAJOR_CLASS_SIGNATURE __END_SIG__
+#define DEV_GET_MINOR_CLASS_SIGNATURE __END_SIG__
+#define DEV_SET_MINOR_CLASS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_SERVICE_CLASSES_SIGNATURE __END_SIG__
+#define DEV_GET_NAME_SIGNATURE __END_SIG__
+#define DEV_SET_NAME_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_VERSION_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_REVISION_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_MANUFACTURER_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_COMPANY_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_NAME_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_GET_REMOTE_ALIAS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_SET_REMOTE_ALIAS_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_LAST_SEEN_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_LAST_USED_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_CREATE_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_REMOVE_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_HAS_BONDING_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_LIST_BONDINGS_SIGNATURE __END_SIG__
+#define DEV_PIN_CODE_LENGTH_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_ENCRYPTION_KEY_SIZE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
+#define DEV_DISCOVER_SIGNATURE __END_SIG__
+#define DEV_DISCOVER_CACHE_SIGNATURE __END_SIG__
+#define DEV_DISCOVER_CANCEL_SIGNATURE __END_SIG__
+#define DEV_DISCOVER_SERVICE_SIGNATURE DBUS_TYPE_STRING_AS_STRING \
+ __END_SIG__
/* Signals sent in the Manager path */
#define DEV_SIG_MODE_CHANGED "ModeChanged"