This is where the magic starts to happen. We move includes from the base
protocol header (${NAME}.h) to the parent and child headers (${NAME}Parent.h
and ${NAME}Child.h) to follow good include hygiene.
For the base protocol header, we examine the set of types used by struct and
union definitions to determine which headers we need to include.
For parent and child headers, we forward declare what we can and include
appropriate headers otherwise. For forward-declared types, we include the
appropriate headers in the parent and child source files.
When computing what set of includes a header file needs, we need to know
about all types that protocol-defined types use, not just qualified
ones: both global-scope names and same-namespace-as-protocol names are
valid to use without any sort of qualification. This flag would normally
not be used in generating actual C++ code and therefore defaults to False.
Keep the builtin headers separate from the translation unit's headers.
We do this so when we start twiddling with the translation unit's headers,
we don't have to handle cases where those headers are actually builtin
headers.
DBusWatcher::Poll currently breaks after reading DBus data from the
socket. Thus, it never processes the data and dispatches the DBus
messages. This patch fixes the code to dispatch DBus messages after
reading the DBus socket.
This patch changes the DBus shutdown to only cleanup the DBus
thread from the main thread after DBusWatcher has completed.
This should ensure that the main thread will not have to wait
for the DBus thread.
--HG--
extra : rebase_source : 09ebb40a4e515ef5b0ebddfc1c3b7187cc546313
PollFdComparator, DBusEventTypes and flag conversion are only used by
DBusWatcher. This patch moves them into DBusWatcher's namespace.
--HG--
extra : rebase_source : 688403e55e139440e6d6d28e9802f8a48d7c355d
The Stop method encapsulates the code for sending the exit command
to a running DBus watcher.
--HG--
extra : rebase_source : 6963e6fa60b2e1e725046672a45cd325fc40a836
The DBus poll functionality is actually part of DBusWatcher. This
patch moves it to a class method.
--HG--
extra : rebase_source : 012813cf1d0967d6c29f7e085e49940570e1d58d
This patch renames DBusThread to DBusWatcher to make its purpose
more clear. Several callback functions for DBus are converted to
methods of DBusWatcher. Their POSIX calls are now protected by
TEMP_FAILURE_RETRY.
--HG--
extra : rebase_source : d8c6963aa8388c462917180d78e8e4289f9e987a