Raw libdbus dispatching

Thiago Macieira thiago at kde.org
Tue Oct 24 16:03:16 PDT 2006

Havoc Pennington wrote:
>Thiago Macieira wrote:
>> What I use is a form of event/timer that is scheduled for immediate
>> execution at the next event loop and disables itself after the first
>> run (it's what we call a "single-shot timer"). It gets enabled in one
>> of these three cases:
>> 1) the connection has just been created
>> 2) the connection has received Input I/O (the Read watch handler has
>> been called)
>> 3) dbus_connection_send_with_reply_and_block has been called and,
>> after it returned, dispatch_status == DATA_REMAINS
>In theory you should be able to just call set_dispatch_status_function
>and enable the timer in there (if status == DATA_REMAINS), and that
>would cover all these cases plus any future cases. It could be broken,
>but it's supposed to work.

Interesting, I didn't know this function existed. It really helps me and 
should help Peter too. Will this function be called from handle_watch?

The dispatching code is one of the oldest code sections remaining in 
QtDBus, originally written by Harald Fernengel, a long while ago. He 
probably even based it on Zack Rusin's code, which is now over 3 years 

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061025/73726118/attachment.pgp

More information about the dbus mailing list