From: Johan Hedberg <johan.hedberg@gmail.com>
To: Bruna Moreira <bruna.moreira@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 3/4] device: Appearance characteristic from GAP service
Date: Wed, 28 Mar 2012 12:58:41 +0300 [thread overview]
Message-ID: <20120328095841.GA30867@x220> (raw)
In-Reply-To: <1332854978-26072-4-git-send-email-bruna.moreira@openbossa.org>
Hi Bruna,
On Tue, Mar 27, 2012, Bruna Moreira wrote:
> @@ -363,15 +367,19 @@ static DBusMessage *get_properties(DBusConnection *conn,
>
> /* Class */
> if (read_remote_class(&src, &device->bdaddr, &class) == 0) {
> - const char *icon = class_to_icon(class);
> + icon = class_to_icon(class);
>
> dict_append_entry(&dict, "Class", DBUS_TYPE_UINT32, &class);
> + } else if (read_remote_appearance(&src, &device->bdaddr, &app) == 0) {
> + /* Appearance */
> + icon = gap_appearance_to_icon(app);
> + class = 0;
>
> - if (icon)
> - dict_append_entry(&dict, "Icon",
> - DBUS_TYPE_STRING, &icon);
> + dict_append_entry(&dict, "Class", DBUS_TYPE_UINT32, &class);
> }
If we don't have a proper remote class value wouldn't it be simpler to
just leave it out from the properties list instead of including a 0
value?
Johan
next prev parent reply other threads:[~2012-03-28 9:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 13:29 [PATCH BlueZ 0/4] GAP device Appearance support Bruna Moreira
2012-03-27 13:29 ` [PATCH BlueZ 1/4] dbus-common: Map GAP Appearance characteristic to icon Bruna Moreira
2012-03-27 13:29 ` [PATCH BlueZ 2/4] storage: Add storage to GAP characteristic Bruna Moreira
2012-03-27 13:29 ` [PATCH BlueZ 3/4] device: Appearance characteristic from GAP service Bruna Moreira
2012-03-28 9:58 ` Johan Hedberg [this message]
2012-03-29 14:22 ` Bruna Moreira
2012-03-27 13:29 ` [PATCH BlueZ 4/4] eir: Read GAP appearance from advertising data Bruna Moreira
2012-03-27 15:11 ` Johan Hedberg
2012-03-27 18:06 ` [PATCH v2 BlueZ] " Bruna Moreira
2012-03-29 14:38 ` [PATCH v2 BlueZ 3/4] device: Appearance characteristic from GAP service Bruna Moreira
2012-03-30 11:35 ` Johan Hedberg
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=20120328095841.GA30867@x220 \
--to=johan.hedberg@gmail.com \
--cc=bruna.moreira@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/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