linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Ganir <chen.ganir@ti.com>
To: Joao Paulo Rechi Vita <jprvita@openbossa.org>
Cc: <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v2 9/9] Battery: Emit property changed on first read
Date: Wed, 8 Aug 2012 09:04:13 +0300	[thread overview]
Message-ID: <5022015D.1010307@ti.com> (raw)
In-Reply-To: <CAAngNMaAM4zYqhGs+sD18DqwA8Hx8ysiy=6ksCVXo9ygb5V+bQ@mail.gmail.com>

Joao,

On 08/07/2012 07:29 PM, Joao Paulo Rechi Vita wrote:
> On Wed, Jul 25, 2012 at 2:42 AM, Chen Ganir <chen.ganir@ti.com> wrote:
>> Emit battery level property changed upon connection, on first read.
>> ---
>>   profiles/batterystate/batterystate.c |    3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/profiles/batterystate/batterystate.c b/profiles/batterystate/batterystate.c
>> index 718863b..4300f85 100644
>> --- a/profiles/batterystate/batterystate.c
>> +++ b/profiles/batterystate/batterystate.c
>> @@ -72,6 +72,8 @@ struct descriptor {
>>          bt_uuid_t               uuid;           /* UUID */
>>   };
>>
>> +static void emit_battery_level_changed(struct characteristic *c);
>> +
>
> No need of this forward declaration, simply move the function
> implementation before the first function that references it
> (read_batterylevel_cb).
>
I will move the function as suggested.

>>   static void char_free(gpointer user_data)
>>   {
>>          struct characteristic *c = user_data;
>> @@ -161,6 +163,7 @@ static void read_batterylevel_cb(guint8 status, const guint8 *pdu, guint16 len,
>>          }
>>
>>          ch->level = value[0];
>> +       emit_battery_level_changed(ch);
>>   }
>>
>>   static void process_batteryservice_char(struct characteristic *ch)
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>

Thanks,
Chen Ganir.

  reply	other threads:[~2012-08-08  6:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25  5:42 [PATCH v2 0/9] Add GATT Client Battery Service Chen Ganir
2012-07-25  5:42 ` [PATCH v2 1/9] Battery: Add Battery Service GATT Client Chen Ganir
2012-07-25  5:42 ` [PATCH v2 2/9] Battery: Add connection logic Chen Ganir
2012-08-07 16:29   ` Joao Paulo Rechi Vita
2012-08-08  5:50     ` Chen Ganir
2012-07-25  5:42 ` [PATCH v2 3/9] Battery: Discover Characteristic Descriptors Chen Ganir
2012-07-25  5:42 ` [PATCH v2 4/9] Battery: Get Battery ID Chen Ganir
2012-08-07 16:29   ` Joao Paulo Rechi Vita
2012-08-08  5:51     ` Chen Ganir
2012-07-25  5:42 ` [PATCH v2 5/9] Battery: Add Battery list to btd_device Chen Ganir
2012-08-07 16:29   ` Joao Paulo Rechi Vita
2012-08-08  5:56     ` Chen Ganir
2012-08-08  6:14     ` Chen Ganir
2012-07-25  5:42 ` [PATCH v2 6/9] Battery: Add Battery D-BUS API Chen Ganir
2012-07-25  5:42 ` [PATCH v2 7/9] Battery: Read Battery level characteristic Chen Ganir
2012-07-25  5:42 ` [PATCH v2 8/9] Battery: Add support for notifications Chen Ganir
2012-08-07 16:29   ` Joao Paulo Rechi Vita
2012-08-08  6:03     ` Chen Ganir
2012-07-25  5:42 ` [PATCH v2 9/9] Battery: Emit property changed on first read Chen Ganir
2012-08-07 16:29   ` Joao Paulo Rechi Vita
2012-08-08  6:04     ` Chen Ganir [this message]
2012-08-01  6:40 ` [PATCH v2 0/9] Add GATT Client Battery Service Chen Ganir
2012-08-03 12:57   ` Claudio Takahasi
2012-08-06  5:52     ` Chen Ganir
2012-08-07 16:29       ` Joao Paulo Rechi Vita
2012-08-08  5:45         ` Chen Ganir

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=5022015D.1010307@ti.com \
    --to=chen.ganir@ti.com \
    --cc=jprvita@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;
as well as URLs for NNTP newsgroup(s).