commit | 4078631353d6d34db21c890d1870e796eca6ea38 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue Aug 16 10:29:40 2016 -0700 |
committer | Iliyan Malchev <malchev@google.com> | Tue Aug 30 20:48:35 2016 -0700 |
tree | 544d4bf4439e0e5ea21d35c8c726d3d967478a3b | |
parent | d07494ffb43b8aaa49250091296f53cac3d26695 [diff] |
Split 'IFoo' into 'IFoo' and 'IHwFoo' The traditional binder "IFoo" interface is coupled very tightly with Binder; it inherits from Binder objects and implements several Binder-only methods. We want to abstract away the RPC mechanism as much as we can; therefore, we want to create a "clean" IFoo interface, which contains just the methods defined in the HIDL interface. Separately, there's an IHwFoo interface, which implements IFoo as well as the necessary Binder methods. Changes in hidl-gen to support this: - Generates IHwFoo.h - Moved (DECLARE|IMPLEMENT)_HW_BINDER macros from IFoo to IHwFoo - Added REGISTER_AND_GET_SERVICE macros to IFoo - Removed all hwbinder/ include paths from IFoo - When passing an interface through a HIDL method, wrap a BnInterface object around it - BnFoo's implementation of IFoo calls through the register interface implementation - Updated test code Tests: hidl_test, hidl_java_test, libhwbinder bench, NFC all work. Bug: 30588200 Change-Id: Ie7ca4eef905f84aebd06bee971b5f6170e169797
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0