From: Bastien Nocera <hadess@hadess.net>
To: BlueZ Hackers <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] Add more supported HAL classes
Date: Wed, 16 Jan 2008 12:55:27 +0000 [thread overview]
Message-ID: <1200488127.26259.23.camel@cookie.hadess.net> (raw)
[-- 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
next reply other threads:[~2008-01-16 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 12:55 Bastien Nocera [this message]
2008-01-16 15:40 ` [Bluez-devel] [PATCH] Add more supported HAL classes 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=1200488127.26259.23.camel@cookie.hadess.net \
--to=hadess@hadess.net \
--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