Async DBusMessage reads using the C API
Havoc Pennington
hp at redhat.com
Fri Nov 4 08:51:10 PST 2005
On Fri, 2005-11-04 at 10:25 +0000, Matthew Johnson wrote:
>
> void dbus_connection_read_write(DBusConnection* conn, dbus_uint32_t ms);
>
"int timeout_milliseconds" for consistency with other stuff and to allow
-1 I think...
> We could also have it return a dbus_bool_t, true if the incoming queue
> is now non-empty? That can be checked when you pop_message though, so
> its less vital.
It's not quite a simple bool, see get_dispatch_status(). Also,
read_write_dispatch() returns a bool with another meaning.
> I'm happy to try and implement the blocking stuff, but I suspect others
> may be able to do so a lot easier. Some pointers as to useful functions
> would be good at the very least.
I think the right patch is probably:
- make the body of read_write_dispatch() into a private function
that takes a "dbus_bool_t dispatch" argument
- wrap it in two public functions, one that calls it with TRUE
and another that calls with with FALSE
i.e. this is exactly like read_write_dispatch except it never
dispatches.
Havoc
More information about the dbus
mailing list