chromeos-dbus-bindings: passing multiple input files on command line

When generating D-Bus proxies for objects under D-Bus Object Manager
control, it is important to group all the proxies and tie them to
a single instance of Object Manager proxy that knows about the
subordinate interfaces and their properties.

In order to do this, multiple source XML files will be grouped into
one proxy header file, complete with all the proxy interfaces, signal
handlers as well as a single Object Manager proxy class that manages
all those proxies (this part will be done in a separate CL).

In order to supply more than one source XML file to the generator
executable, remove --input switch and let the files be passed directly.

GYP files that import proxies from other projects will need to do so
for more than one source target, so they can use a single GYP rule
as was defined in generate-dbus-bindings.gypi. However, that rule
is totally acceptable for generating adaptors, so, renamed the
generate-dbus-bindings.gypi into generate-dbus-adaptors.gypi to
be more specific and simplified it a bit.

Also made generated object proxies to allow explicit releasing of the
underlying dbus::ObjectProxy from the dbus::Bus. This is cannot be done
in the constructor since dbus::Bus::RemoveObjectProxy is an asynchronous
call and requires a message loop to be executed. For clients such as
buffet_client that doesn't have a message loop, removing the proxy
in the destructor causes a crash. For clients like Shill who need to
keep the bus clean, they can call ReleaseObjectProxy() before destroying
the proxy object.

BUG=chromium:431737
TEST=FEATURES=test emerge-link chromeos-dbus-bindings lorgnette apmanager

Change-Id: I6737c155c528f46d480d51aaf8420a1dad00f83e
Reviewed-on: https://chromium-review.googlesource.com/231155
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
7 files changed
tree: aaef3982d93c4edc14dd04e7771de05e6dcf6be2
  1. chromeos-dbus-bindings/