Re: [RFC 02/16] gatt: Add services list to gatt_db struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Claudio,

On 14 April 2014 16:11, Claudio Takahasi <claudio.takahasi@xxxxxxxxxxxxx> wrote:
> Hi Marcin,
>
> On Wed, Apr 9, 2014 at 4:07 AM, Marcin Kraglak <marcin.kraglak@xxxxxxxxx> wrote:
>> Gatt database will store all services in queue services. Each service
>> contains attributes, number of handles included and flag if it is
>> active service.
>> ---
>>  src/shared/gatt-db.c | 32 ++++++++++++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>
>> diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
>> index e56b381..47915c7 100644
>> --- a/src/shared/gatt-db.c
>> +++ b/src/shared/gatt-db.c
>> @@ -21,11 +21,24 @@
>>   *
>>   */
>>
>> +#include <stdbool.h>
>> +
>>  #include "src/shared/util.h"
>> +#include "src/shared/queue.h"
>>  #include "src/shared/gatt-db.h"
>>
>>  struct gatt_db {
>>         uint16_t next_handle;
>> +       struct queue *services;
>> +};
>> +
>> +struct gatt_db_attribute {
>> +};
>> +
>> +struct gatt_db_service {
>> +       bool active;
>> +       uint16_t num_handles;
>> +       struct gatt_db_attribute **attributes;
>
> If the plan is to support handle allocation, maybe it'd better to have
> continuous memory allocation instead of attributes pointers.
>
> Claudio.
>
> <snip>

We store attribute value in attribute struct, and it's easier to
iterate through array of pointers. But we can store pointer to
attribute value, then continuous memory will be better. I can change
it.

BR
Marcin
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux