DBusWatch function, DBusTimeout functions Why these functions is needed ?
Денис Котов
redradist at gmail.com
Tue Dec 27 08:40:49 UTC 2016
Okay, you mean DBus uses user's callbacks like a platform specific API for
creating a platform specific timer (QTimer, linux timer and etc.) and DBus
deals only with abstract number that in fact is timeout in milliseconds.
In this case I need only create Timer, check when this timer expired and
then make dbus_timeout_handle() to say DBus that Timer has expired, am I
right ?
And should I restart timer after it expired and start again or I should
remove this timer from list ?
But in this case when DBus request to add watcher for me it seems like
workaround, because with DBus know how to work with this platform specific
file descriptor, but anyway it asks us to say when it will be handled (for
me it seems strange).
On Dec 27, 2016 02:35, "Thiago Macieira" <thiago at kde.org> wrote:
> Em segunda-feira, 26 de dezembro de 2016 16:54:38 BRST você escreveu:
> > Hi Thiago,
> >
> > Thanks for explanation.
> >
> > I little bit figure out how to work with Watchs from this link
> > https://lists.freedesktop.org/archives/dbus/2007-October/008859.html .
> > But I have not still understood how to work with timeout. This timeout
> > (add_timeout and remove_timeout) what are their purposes ? It is timeout
> > that given by libdbus to handle events for specific file descriptor or
> what
> > is it ?
>
> The purpose is for you to tell libdbus when enough time has passed. They
> are
> not connected to a specific file descriptor, only the clock.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel Open Source Technology Center
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20161227/2395268a/attachment.html>
More information about the dbus
mailing list