From: Szymon Janc <szymon.janc@tieto.com>
To: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org, johan.hedberg@gmail.com,
claudio.takahasi@openbossa.org, anderson.lizardo@openbossa.org,
armansito@chromium.org
Subject: Re: [PATCH 01/10] attrib: Add API for reliable write
Date: Mon, 14 Apr 2014 16:28:07 +0200 [thread overview]
Message-ID: <3028620.qKlJO94k3d@uw000953> (raw)
In-Reply-To: <1397340031-29711-2-git-send-email-lukasz.rymanowski@tieto.com>
Hi Łukasz,
On Sunday 13 of April 2014 00:00:22 Lukasz Rymanowski wrote:
> Android expose to application api for reliable write. Therefore we need
> to add this support to gattrib
> ---
> attrib/gatt.c | 18 ++++++++++++++++++
> attrib/gatt.h | 6 ++++++
> 2 files changed, 24 insertions(+)
>
> diff --git a/attrib/gatt.c b/attrib/gatt.c
> index 49cd1a3..e461ab7 100644
> --- a/attrib/gatt.c
> +++ b/attrib/gatt.c
> @@ -871,6 +871,24 @@ guint gatt_write_char(GAttrib *attrib, uint16_t handle, const uint8_t *value,
> return prepare_write(long_write);
> }
>
> +guint gatt_reliable_write_char(GAttrib *attrib, uint16_t handle,
> + const uint8_t *value, size_t vlen,
> + GAttribResultFunc func,
> + gpointer user_data)
> +{
> + uint8_t *buf;
> + guint16 plen;
> + size_t buflen;
> +
> + buf = g_attrib_get_buffer(attrib, &buflen);
> +
> + plen = enc_prep_write_req(handle, 0, value, vlen, buf, buflen);
> + if (!plen)
> + return 0;
> +
> + return g_attrib_send(attrib, 0, buf, plen, func, user_data, NULL);
> +}
> +
> guint gatt_exchange_mtu(GAttrib *attrib, uint16_t mtu, GAttribResultFunc func,
> gpointer user_data)
> {
> diff --git a/attrib/gatt.h b/attrib/gatt.h
> index c65bf6c..76820e0 100644
> --- a/attrib/gatt.h
> +++ b/attrib/gatt.h
> @@ -84,6 +84,12 @@ guint gatt_write_char(GAttrib *attrib, uint16_t handle, const uint8_t *value,
> size_t vlen, GAttribResultFunc func,
> gpointer user_data);
>
> +guint gatt_reliable_write_char(GAttrib *attrib, uint16_t handle,
> + const uint8_t *value, size_t vlen,
> + GAttribResultFunc func,
> + gpointer user_data);
> +
> +
Just a minor: double empty line.
> guint gatt_discover_char_desc(GAttrib *attrib, uint16_t start, uint16_t end,
> GAttribResultFunc func, gpointer user_data);
>
>
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-04-14 14:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-12 22:00 [PATCH 00/10] android/gatt: GATT Client write types support Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 01/10] attrib: Add API for reliable write Lukasz Rymanowski
2014-04-14 14:28 ` Szymon Janc [this message]
2014-04-12 22:00 ` [PATCH 02/10] attrib: Expose write execute Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 03/10] android/gatt: Add helper to create descr_data Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 04/10] android/gatt: Avoid double helper struct for read/write characteristic Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 05/10] android/gatt: Add helper to create characteristic op data Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 06/10] android/gatt: Fix error msg Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 07/10] android/gatt: Daemon accepts only default write type Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 08/10] android/gatt: Add support for reliable write Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 09/10] android/gatt: Add support for write execute Lukasz Rymanowski
2014-04-12 22:00 ` [PATCH 10/10] android/gatt: Add support for write without response Lukasz Rymanowski
2014-04-14 14:23 ` [PATCH 00/10] android/gatt: GATT Client write types support Szymon Janc
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=3028620.qKlJO94k3d@uw000953 \
--to=szymon.janc@tieto.com \
--cc=anderson.lizardo@openbossa.org \
--cc=armansito@chromium.org \
--cc=claudio.takahasi@openbossa.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=lukasz.rymanowski@tieto.com \
/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