From: Chen Ganir <chen.ganir@ti.com>
To: Joao Paulo Rechi Vita <jprvita@openbossa.org>,
<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 02/10] battery: Implement Generic device battery
Date: Wed, 12 Sep 2012 13:30:39 +0300 [thread overview]
Message-ID: <5050644F.5040902@ti.com> (raw)
In-Reply-To: <20120912084537.GA31700@x220.P-661HNU-F1>
Johan,
On 09/12/2012 11:45 AM, Johan Hedberg wrote:
> Hi Chen,
>
> On Wed, Sep 12, 2012, Chen Ganir wrote:
>>> Since this symbol is being exported, shouldn't it be prefixed with
>>> btd_ as well?
>>>
>> I will rename it to struct btd_battery. Is that ok ?
>
> Yes.
>
Thanks.
>>
>>>> +typedef void (*RefreshBattFunc) (struct device_battery *batt);
>>>
>>> I don't think we use CamelCase for anything other than D-Bus method names.
>>>
>> We use it in gattrib.h for function pointers. What is the correct
>> convention for function pointers ? same as in adapter_ops ?
>>
>>>> +
>>>> +typedef enum {
>>>> + BATTERY_OPT_INVALID = 0,
>>>> + BATTERY_OPT_LEVEL,
>>>> + BATTERY_OPT_REFRESH_FUNC,
>>>> +} BatteryOption;
>>>
>>> Fix CamelCase usage here and on uses of this type as well.
>>>
>> btio.h also uses this convention. What should be the correct convention ?
>
> Both BtIO and GAttrib intend to mimic GLib-like libraries where this is
> the convention. The plan is not to let this spread to the entire code
> base (particularly with the likely move to libell in the long run), so
> please don't use CamelCase.
>
Ok. So for the battery options i'll simply change it to battery_option.
What about the convention for defining a function pointer ?
> Johan
>
--
BR,
Chen Ganir
Texas Instruments
next prev parent reply other threads:[~2012-09-12 10:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 7:38 [PATCH 00/10] Implement Generic battery and LE Battery client chen.ganir
2012-09-11 7:38 ` [PATCH 01/10] battery: Add generic device battery documentation chen.ganir
2012-09-11 15:34 ` Joao Paulo Rechi Vita
2012-09-12 4:45 ` Chen Ganir
2012-09-11 7:38 ` [PATCH 02/10] battery: Implement Generic device battery chen.ganir
2012-09-11 18:27 ` Joao Paulo Rechi Vita
2012-09-12 4:48 ` Chen Ganir
2012-09-12 8:45 ` Johan Hedberg
2012-09-12 10:30 ` Chen Ganir [this message]
2012-09-12 10:57 ` Anderson Lizardo
2012-09-13 11:32 ` Chen Ganir
2012-09-11 7:38 ` [PATCH 03/10] battery: Add GATT Battery Client Service skeleton chen.ganir
2012-09-11 7:38 ` [PATCH 04/10] battery: Add client connection logic chen.ganir
2012-09-11 7:38 ` [PATCH 05/10] battery: Discover Characteristic Descriptors chen.ganir
2012-09-11 20:52 ` Joao Paulo Rechi Vita
2012-09-12 4:49 ` Chen Ganir
2012-09-11 7:38 ` [PATCH 06/10] battery: Get Battery ID chen.ganir
2012-09-11 7:38 ` [PATCH 07/10] battery: Add Battery to device chen.ganir
2012-09-11 21:40 ` Joao Paulo Rechi Vita
2012-09-12 4:54 ` Chen Ganir
2012-09-11 7:38 ` [PATCH 08/10] battery: Read Battery level characteristic chen.ganir
2012-09-11 21:50 ` Joao Paulo Rechi Vita
2012-09-12 4:55 ` Chen Ganir
2012-09-11 7:38 ` [PATCH 09/10] battery: Add support for notifications chen.ganir
2012-09-11 22:08 ` Joao Paulo Rechi Vita
2012-09-12 4:58 ` Chen Ganir
2012-09-13 11:27 ` 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=5050644F.5040902@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).