linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Claudio Takahasi" <cktakahasi@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] [DBUS PATCH]GetMajorClass
Date: Thu, 23 Feb 2006 09:19:36 -0300	[thread overview]
Message-ID: <e1effdeb0602230419p2e9c503ev7fca43499cb13fed@mail.gmail.com> (raw)

[-- 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__

             reply	other threads:[~2006-02-23 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23 12:19 Claudio Takahasi [this message]
2006-02-23 12:55 ` [Bluez-devel] [DBUS PATCH]GetMajorClass Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1effdeb0602230419p2e9c503ev7fca43499cb13fed@mail.gmail.com \
    --to=cktakahasi@gmail.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).