This patch cleans up the DBus utilitys and helper classes. All functions
for sending have been removed. Their users have been converted to the
new methods in RawDBusConnection. Include statements have been cleaned
up as well. Some methods of DBusMessageRefPtr have been moved from the
header to the source file to prevent inclusion of the DBus API from within
the header file.
Handler functions for DBus replies sometimes need several data fields
or need to keep state over replies for multiple messages. The DBus API
itself only allows for a single pointer to user data.
The class DBusReplyHandler is a base class for implementing DBus reply-
message handlers. Users of DBus can inherit from this class to implement
message-specific handlers.
--HG--
extra : rebase_source : 91c5f6e8d365922fd3b52fbaf502052f86274f16
The this commit moves the sending of blocking DBus messages to the
DBus thread. This allows us to avoid concurrency problems within the
DBus library, which is not explicitly thread-safe.
As a side note, I'd like to mention that blocking in distributed
systems simply doesn't work. The dbus library is especially broken
in this regard as it delays all unrelated messages until the reply
for the blocking request has been received. A future commit should
implement this functionality with an asyncronous call and make the
related thread wait for the reply.
The DBus send operation simply sends a DBus message without further
processing of replies. If the sender is interested in a reply, the
respective serial number can be returned. In this case, the sending
operation (and only the sending) is serialized with the calling
thread.