Re: [PATCH BlueZ v7 07/11] gatt: Add external services tracking

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

 



Hi Johan/Lizardo:

On Tue, Feb 25, 2014 at 3:26 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Lizardo,
>
> On Mon, Feb 24, 2014, Anderson Lizardo wrote:
>> On Mon, Feb 24, 2014 at 8:49 AM, Anderson Lizardo
>> <anderson.lizardo@xxxxxxxxxxxxx> wrote:
>> > Hi Johan,
>> >
>> > On Mon, Feb 24, 2014 at 4:33 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
>> >> This whole timer thing seems too hackish to me.
>> >>
>> >> A better way to fix this might be to have something like
>> >> g_dbus_client_set_proxies_complete_watch (or some better name) to let
>> >> the code wait until GetManagedObjects has returned and the initial
>> >> proxies added. Do you agree?
>> >
>> > We came up with this workaround during development, but we forgot to
>> > highlight on the cover letter. Indeed a function like the one you
>> > propose should be enough.
>> >
>> > Regarding the name for the function, I was thinking as
>> > "g_dbus_client_proxies_ready_watch()". What do you think?
>>
>> Or "g_dbus_client_set_proxies_ready_watch()" to be consistent.
>
> That sounds good enough to me.
>
> Johan

I spent some time investigating (and prototyping) alternatives to
avoid inserting a new gdbus helper, but all of them have drawbacks.

Even using DBus properties (without object manager) extending the
RegisterService() method to include an array of the object paths in
the options doesn't help. New proxies/properties are reported
individually through callbacks, consequently extra logic is required
in the "gdbus user" to detect when all objects are "received" and to
validate each object. Another issue of using property "watch" is to
manage when it first appeared and when it is property changed.
*Maybe* foreach helper plus the "ready" callback is another acceptable approach.

Keeping the object manager approach, what we need is way to figure out
if proxy_added is reporting the "last" proxy, otherwise timer is still
needed.
So, the proposed ready callback should be called after reporting the
last proxy. I will implement the suggested helper
(g_dbus_client_set_proxies_ready_watch) and see how far we go.

Regards,
Claudio.
--
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