summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-23 12:48:51 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-23 12:48:51 +0000
commita68bf12229012db176a7f0c5ae86380445e52721 (patch)
tree444088f6b3080b4ae1a9984071924b400a3f9741 /hcid/dbus-device.c
parente86039b79bccb0e70c1d119fb2a0dfec4f1793bd (diff)
Add code for getting the major class
Diffstat (limited to 'hcid/dbus-device.c')
-rw-r--r--hcid/dbus-device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c
index 96dc7fba..18df99dc 100644
--- a/hcid/dbus-device.c
+++ b/hcid/dbus-device.c
@@ -100,6 +100,20 @@ static DBusMessage* handle_dev_get_revision_req(DBusMessage *msg, void *data)
return reply;
}
+static DBusMessage* handle_dev_get_major_class_req(DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ const char *str_ptr = "computer";
+
+ reply = dbus_message_new_method_return(msg);
+
+ /*FIXME: Check the real device major class */
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
+ DBUS_TYPE_INVALID);
+
+ return reply;
+}
+
static DBusMessage* handle_dev_get_manufacturer_req(DBusMessage *msg, void *data)
{
struct hci_dbus_data *dbus_data = data;
@@ -807,6 +821,7 @@ static const struct service_data dev_services[] = {
{ 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_MODE, handle_dev_get_mode_req, DEV_GET_MODE_SIGNATURE },
{ DEV_GET_NAME, handle_dev_get_name_req, DEV_GET_NAME_SIGNATURE },