Thread (27 messages) flat view 27 messages, 4 authors, 2012-09-13

Re: [PATCH 02/10] battery: Implement Generic device battery

From: Chen Ganir <hidden>
Date: 2012-09-12 10:30:39

Johan,

On 09/12/2012 11:45 AM, Johan Hedberg wrote:
Hi Chen,

On Wed, Sep 12, 2012, Chen Ganir wrote:
quoted
quoted
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.
quoted
quoted
quoted
+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 ?
quoted
quoted
+
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help