diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-23 12:48:51 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-23 12:48:51 +0000 | 
| commit | a68bf12229012db176a7f0c5ae86380445e52721 (patch) | |
| tree | 444088f6b3080b4ae1a9984071924b400a3f9741 | |
| parent | e86039b79bccb0e70c1d119fb2a0dfec4f1793bd (diff) | |
Add code for getting the major class
| -rw-r--r-- | hcid/dbus-device.c | 15 | ||||
| -rw-r--r-- | hcid/dbus.h | 2 | 
2 files changed, 17 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			}, diff --git a/hcid/dbus.h b/hcid/dbus.h index 666bf2de..9e1dd24d 100644 --- a/hcid/dbus.h +++ b/hcid/dbus.h @@ -112,6 +112,7 @@ int get_default_dev_id(void);  #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_MODE			"GetMode"  #define DEV_GET_NAME			"GetName" @@ -146,6 +147,7 @@ int get_default_dev_id(void);  #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_MODE_SIGNATURE				__END_SIG__  #define DEV_GET_NAME_SIGNATURE				__END_SIG__ | 
