Add FqInstance class.

FqInstance is a wrapper around FQName to include instance
name as well.

Bug: 73774955
Fixes: 74361197
Test: libhidl-gen-utils_test
Change-Id: I5c064dec8d0e72ad1c90d3a892986f74d77788ce
Merged-In: I5c064dec8d0e72ad1c90d3a892986f74d77788ce
6 files changed
tree: 10cb079119b423b9ac96acc0334c4ee079986a2f
  1. build/
  2. c2hal/
  3. docs/
  4. include_hash/
  5. scripts/
  6. test/
  7. utils/
  8. .clang-format
  9. Android.bp
  10. Annotation.cpp
  11. Annotation.h
  12. ArrayType.cpp
  13. ArrayType.h
  14. AST.cpp
  15. AST.h
  16. CleanSpec.mk
  17. CompoundType.cpp
  18. CompoundType.h
  19. ConstantExpression.cpp
  20. ConstantExpression.h
  21. Coordinator.cpp
  22. Coordinator.h
  23. DeathRecipientType.cpp
  24. DeathRecipientType.h
  25. EnumType.cpp
  26. EnumType.h
  27. FmqType.cpp
  28. FmqType.h
  29. generateCpp.cpp
  30. generateCppAdapter.cpp
  31. generateCppImpl.cpp
  32. generateJava.cpp
  33. generateVts.cpp
  34. HandleType.cpp
  35. HandleType.h
  36. Hash.cpp
  37. hidl-gen_l.h
  38. hidl-gen_l.ll
  39. hidl-gen_y.yy
  40. HidlTypeAssertion.cpp
  41. HidlTypeAssertion.h
  42. Interface.cpp
  43. Interface.h
  44. Location.cpp
  45. Location.h
  46. main.cpp
  47. MemoryType.cpp
  48. MemoryType.h
  49. Method.cpp
  50. Method.h
  51. MODULE_LICENSE_APACHE2
  52. NamedType.cpp
  53. NamedType.h
  54. NOTICE
  55. OWNERS
  56. PointerType.cpp
  57. PointerType.h
  58. PREUPLOAD.cfg
  59. README.md
  60. Reference.h
  61. RefType.cpp
  62. RefType.h
  63. ScalarType.cpp
  64. ScalarType.h
  65. Scope.cpp
  66. Scope.h
  67. StringType.cpp
  68. StringType.h
  69. Type.cpp
  70. Type.h
  71. TypeDef.cpp
  72. TypeDef.h
  73. update-all-google-makefiles.sh
  74. update-makefiles-helper.sh
  75. VectorType.cpp
  76. 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
hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0