Add getTransportFromManifest
which consult the vendor interface object to see
what transport method is expected for each HAL.
Test: hidl_test
Bug: 32718841
Change-Id: Ic93bea634852554a331824f3f1f003442ffe4841
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index b9e4ffa..4a17c3e 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -34,6 +34,7 @@
#include <utils/Errors.h>
#include <utils/RefBase.h>
#include <utils/StrongPointer.h>
+#include <vintf/Transport.h>
#include <vector>
namespace android {
@@ -58,6 +59,10 @@
namespace hardware {
+// Get transport method from vendor interface manifest.
+// name has the format "android.hardware.foo"
+vintf::Transport getTransportFromManifest(const std::string &name);
+
// hidl_death_recipient is a callback interfaced that can be used with
// linkToDeath() / unlinkToDeath()
struct hidl_death_recipient : public virtual RefBase {