Merge cherrypicks of [2476230, 2476289, 2476272, 2476118, 2475997, 2476251, 2476119, 2476341, 2476252, 2476290, 2476232, 2476274, 2475999, 2476343, 2476275, 2476216, 2476381, 2476256, 2476000, 2476362, 2476345, 2476364, 2476234, 2476346, 2476347, 2476365, 2476276, 2476219, 2476277, 2476402, 2476348, 2476235, 2476383, 2476257, 2476278, 2476236, 2476350, 2476351, 2476307, 2476403, 2476308, 2476258] into oc-release

Change-Id: I3f43b54320d5428efd9522360bf0f73410ea5fbb
tree: 462c1d9dc58897ee467acf35a9ae7eeacf5e5f57
  1. c2hal/
  2. include_hash/
  3. test/
  4. utils/
  5. Android.bp
  6. Annotation.cpp
  7. Annotation.h
  8. ArrayType.cpp
  9. ArrayType.h
  10. AST.cpp
  11. AST.h
  12. CompoundType.cpp
  13. CompoundType.h
  14. ConstantExpression.cpp
  15. ConstantExpression.h
  16. Coordinator.cpp
  17. Coordinator.h
  18. DeathRecipientType.cpp
  19. DeathRecipientType.h
  20. EnumType.cpp
  21. EnumType.h
  22. FmqType.cpp
  23. FmqType.h
  24. generateCpp.cpp
  25. generateCppImpl.cpp
  26. generateJava.cpp
  27. generateVts.cpp
  28. HandleType.cpp
  29. HandleType.h
  30. Hash.cpp
  31. hidl-gen_l.ll
  32. hidl-gen_y.yy
  33. HidlTypeAssertion.cpp
  34. HidlTypeAssertion.h
  35. Interface.cpp
  36. Interface.h
  37. Location.h
  38. main.cpp
  39. MemoryType.cpp
  40. MemoryType.h
  41. Method.cpp
  42. Method.h
  43. MODULE_LICENSE_APACHE2
  44. NamedType.cpp
  45. NamedType.h
  46. NOTICE
  47. PointerType.cpp
  48. PointerType.h
  49. README.md
  50. RefType.cpp
  51. RefType.h
  52. ScalarType.cpp
  53. ScalarType.h
  54. Scope.cpp
  55. Scope.h
  56. StringType.cpp
  57. StringType.h
  58. Type.cpp
  59. Type.h
  60. TypeDef.cpp
  61. TypeDef.h
  62. update-makefiles-helper.sh
  63. VectorType.cpp
  64. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

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:

croot
hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0