public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] Add more supported HAL classes
@ 2008-01-16 12:55 Bastien Nocera
  2008-01-16 15:40 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2008-01-16 12:55 UTC (permalink / raw)
  To: BlueZ Hackers

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

Heya,

Server and handheld are both supported minor classes for HAL and hcid,
so we should handle them appropriately.

Simple patch attached.

Cheers

[-- Attachment #2: bluez-gnome-add-more-classes.patch --]
[-- Type: text/x-patch, Size: 2032 bytes --]

Index: applet/main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.95
diff -u -p -r1.95 main.c
--- applet/main.c	22 Dec 2007 00:09:15 -0000	1.95
+++ applet/main.c	16 Jan 2008 12:54:30 -0000
@@ -1271,7 +1271,10 @@ static char *get_form_factor(void)
 	libhal_ctx_shutdown(ctx, NULL);
 	libhal_ctx_free(ctx);
 
-	if (strcmp(formfactor, "laptop") && strcmp(formfactor, "desktop")) {
+	if (strcmp(formfactor, "laptop")
+	    && strcmp(formfactor, "desktop")
+	    && strcmp (formfactor, "server")
+	    && strcmp (formfactor, "handheld")) {
 		/* We don't know anything else */
 		g_free(formfactor);
 		formfactor = g_strdup("uncategorized");
Index: properties/adapter.c
===================================================================
RCS file: /cvsroot/bluez/gnome/properties/adapter.c,v
retrieving revision 1.17
diff -u -p -r1.17 adapter.c
--- properties/adapter.c	29 Aug 2007 15:41:49 -0000	1.17
+++ properties/adapter.c	16 Jan 2008 12:54:31 -0000
@@ -227,6 +227,12 @@ static void class_callback(GtkWidget *co
 	case 2:
 		minor = "laptop";
 		break;
+	case 3:
+		minor = "server";
+		break;
+	case 4:
+		minor = "handheld";
+		break;
 	default:
 		return;
 	}
@@ -705,6 +711,10 @@ static void create_adapter(struct adapte
 						_("Desktop workstation"));
 	gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
 						_("Laptop computer"));
+	gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
+						_("Server"));
+	gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
+						_("Handheld"));
 	gtk_box_pack_start(GTK_BOX(vbox), combobox, FALSE, FALSE, 0);
 
 	if (major && minor && g_ascii_strcasecmp(major, "computer") == 0) {
@@ -714,6 +724,10 @@ static void create_adapter(struct adapte
 			index = 1;
 		else if (g_ascii_strcasecmp(minor, "laptop") == 0)
 			index = 2;
+		else if (g_ascii_strcasecmp(minor, "server") == 0)
+			index = 3;
+		else if (g_ascii_strcasecmp(minor, "handheld") == 0)
+			index = 4;
 		else
 			index = -1;
 

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
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

* Re: [Bluez-devel] [PATCH] Add more supported HAL classes
  2008-01-16 12:55 [Bluez-devel] [PATCH] Add more supported HAL classes Bastien Nocera
@ 2008-01-16 15:40 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2008-01-16 15:40 UTC (permalink / raw)
  To: BlueZ development

Hi Bastien,

> Server and handheld are both supported minor classes for HAL and hcid,
> so we should handle them appropriately.

patch has been applied. Thanks.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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:[~2008-01-16 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 12:55 [Bluez-devel] [PATCH] Add more supported HAL classes Bastien Nocera
2008-01-16 15:40 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox