From: Johan Hedberg <johan.hedberg@gmail.com>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v1 04/10] gatt: Add storing Appearance
Date: Fri, 17 Aug 2012 11:28:30 +0300 [thread overview]
Message-ID: <20120817082830.GA31481@x220> (raw)
In-Reply-To: <1345147991-31320-5-git-send-email-claudio.takahasi@openbossa.org>
Hi Claudio,
On Thu, Aug 16, 2012, Claudio Takahasi wrote:
> This patch stores the Appearance characteristic value read from the
> remote GAP service.
> ---
> profiles/gatt/gas.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c
> index 2fb12ce..bf603e8 100644
> --- a/profiles/gatt/gas.c
> +++ b/profiles/gatt/gas.c
> @@ -68,8 +68,11 @@ static gint cmp_device(gconstpointer a, gconstpointer b)
> static void gap_appearance_cb(guint8 status, const guint8 *pdu, guint16 plen,
> gpointer user_data)
> {
> + struct gas *gas = user_data;
> struct att_data_list *list = NULL;
> + bdaddr_t src, dst;
> uint16_t app;
> + uint8_t type;
> uint8_t *atval;
>
> if (status != 0) {
> @@ -92,6 +95,11 @@ static void gap_appearance_cb(guint8 status, const guint8 *pdu, guint16 plen,
>
> DBG("GAP Appearance: 0x%04x", app);
>
> + adapter_get_address(device_get_adapter(gas->device), &src);
> + device_get_address(gas->device, &dst, &type);
> +
> + write_remote_appearance(&src, &dst, type, app);
I'm not so sure it's a good idea to have plugins use the storage
functions directly. Instead I'd put this into the device_set_appearance
function which you add later in this patch set. If there really is a
need to access storage functions from within plugins (which there isn't
for this particular case) then we need to prefix all of the storage
functions with btd_* since those are the only types of symbols that
should be exported from the core daemon to plugins.
Johan
next prev parent reply other threads:[~2012-08-17 8:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 14:19 [PATCH BlueZ v0 00/10] GAP Plugin Claudio Takahasi
2012-08-15 14:19 ` [PATCH BlueZ v0 01/10] gap: Add Generic Access Profile plugin skeleton Claudio Takahasi
2012-08-15 14:19 ` [PATCH BlueZ v0 02/10] gap: Add GAP device registration Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 03/10] gap: Add read Appearance characteristic Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 04/10] gap: Add storing Appearance Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 05/10] core: Remove Appearance characteristic read Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 06/10] gap: Emit PropertyChanged for Appearance Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 07/10] core: PropertyChanged signal for Icon/class Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 08/10] core: PropertyChanged signal for Icon/Appearance Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 09/10] gap: Map Appearance value 0x0000 to unknown Claudio Takahasi
2012-08-15 14:20 ` [PATCH BlueZ v0 10/10] gap: Don't store Appearance if value is "unknown" Claudio Takahasi
2012-08-16 12:53 ` [PATCH BlueZ v0 00/10] GAP Plugin Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 00/10] GATT Plugin Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 01/10] gatt: Add Generic Access/Attribute Profile plugin Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 02/10] gatt: Add GAP/GATT device registration Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 03/10] gatt: Add read Appearance characteristic Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 04/10] gatt: Add storing Appearance Claudio Takahasi
2012-08-17 8:28 ` Johan Hedberg [this message]
2012-08-17 14:00 ` Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 05/10] core: Remove Appearance characteristic read Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 06/10] gatt: Emit PropertyChanged for Appearance Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 07/10] core: PropertyChanged signal for Icon/class Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 08/10] core: PropertyChanged signal for Icon/Appearance Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 09/10] gatt: Map Appearance value 0x0000 to "unknown" Claudio Takahasi
2012-08-16 20:13 ` [PATCH BlueZ v1 10/10] gatt: Don't store Appearance if value is "unknown" Claudio Takahasi
2012-08-17 8:29 ` [PATCH BlueZ v1 00/10] GATT Plugin Johan Hedberg
2012-08-17 14:04 ` Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 " Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 01/10] gatt: Add Generic Access/Attribute Profile plugin Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 02/10] gatt: Add GAP/GATT device registration Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 03/10] core: Add device method to access "Appearance" Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 04/10] gatt: Add read Appearance characteristic Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 05/10] core: Remove Appearance characteristic read Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 06/10] gatt: Emit PropertyChanged for Appearance Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 07/10] core: PropertyChanged signal for Icon/class Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 08/10] core: PropertyChanged signal for Icon/Appearance Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 09/10] core: Add storing Appearance Claudio Takahasi
2012-08-17 14:43 ` [PATCH BlueZ v2 10/10] gatt: Map Appearance value 0x0000 to "unknown" Claudio Takahasi
2012-08-20 9:20 ` [PATCH BlueZ v2 00/10] GATT Plugin 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=20120817082830.GA31481@x220 \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.