* [Bluez-devel] [DBUS PATCH]GetMajorClass
@ 2006-02-23 12:19 Claudio Takahasi
2006-02-23 12:55 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2006-02-23 12:19 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
Hi Marcel,
Here is the GetMajorClass service implemented according to your
suggestion: it is returning "computer" for now.
Regards,
Claudio.
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT
[-- Attachment #2: get-major01.patch --]
[-- Type: text/x-patch, Size: 2420 bytes --]
Index: hcid/dbus-device.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/dbus-device.c,v
retrieving revision 1.10
diff -u -r1.10 dbus-device.c
--- hcid/dbus-device.c 22 Feb 2006 23:41:17 -0000 1.10
+++ hcid/dbus-device.c 23 Feb 2006 12:12:35 -0000
@@ -100,6 +100,20 @@
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 @@
{ 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 },
Index: hcid/dbus.h
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/dbus.h,v
retrieving revision 1.28
diff -u -r1.28 dbus.h
--- hcid/dbus.h 22 Feb 2006 23:41:17 -0000 1.28
+++ hcid/dbus.h 23 Feb 2006 12:12:35 -0000
@@ -112,6 +112,7 @@
#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 @@
#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__
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-devel] [DBUS PATCH]GetMajorClass
2006-02-23 12:19 [Bluez-devel] [DBUS PATCH]GetMajorClass Claudio Takahasi
@ 2006-02-23 12:55 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-02-23 12:55 UTC (permalink / raw)
To: bluez-devel
Hi Claudio,
> Here is the GetMajorClass service implemented according to your
> suggestion: it is returning "computer" for now.
the patch has been applied. Thanks.
The whole topic with the class of device settings is still open for
discussion. However after reading the specification once again, I
figured that we have to make the major class a config file option and
not changeable by the user. It will be getting too complex if we wanna
add support for access points or other classes that make use of the
minor device class in a different way. My current approach is to make
the major class and service classes readable and the minor class is also
changeable if the major class is "computer".
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-23 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 12:19 [Bluez-devel] [DBUS PATCH]GetMajorClass Claudio Takahasi
2006-02-23 12:55 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).