the main loop

Macartney, Geoff gmacartney at tycoint.com
Mon Sep 15 02:58:14 PDT 2008


hi Sfora,

I found Kimmo Hämäläinen's post below very useful in figuring out how to construct a main loop, just writing in C.

http://lists.freedesktop.org/archives/dbus/2007-October/008859.html

Cheers
Geoff



 
--------------------------------------------------------

Tyco Safety Products/CEM Systems Ltd.
Registered in Northern Ireland: NI 25728.  Registered Office: Unit 4 Ravenhill Business Park, Ravenhill Road, Belfast, BT6 8AW..
 
Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. This email and any attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately and delete any copies in your possession.
 
-----Original Message-----

From: dbus-bounces at lists.freedesktop.org [mailto:dbus-bounces at lists.freedesktop.org] On Behalf Of sfora dim
Sent: 15 September 2008 10:51
To: Thiago Macieira
Cc: dbus at lists.freedesktop.org
Subject: Re: the main loop

Hi Thiago,

On Mon, Sep 15, 2008 at 9:26 AM, Thiago Macieira <thiago at kde.org> wrote:
>>Or is it the application's (which is using dbus) main loop ? the one
>>that periodically calls dbus_connection_read_write() to check if new
>>msgs have arrived ?
>
> Applications wouldn't call dbus_connection_read_write().

I'm writing a dbus service in C using libdbus. What dbus function
should I call periodically in my main loop ?

I thought I should call dbus_connection_read_write() because that's
what dbus-example.c
(http://dbus.freedesktop.org/doc/dbus/dbus-example.c) use in its main
loop (in the listen mode)...

Thank you,
Sfora.
_______________________________________________
dbus mailing list
dbus at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus


More information about the dbus mailing list