create gBsConstructorMap; add wrapPassthrough
Similar to gBnConstructorMap, this map helps wrapping a local
interface with the smallest BsFoo possible. They are added
in Static.h/cpp.
Added HidlPassthroughSupport.h/cpp to hold wrapPassthrough.
Also fixes a few Return object isOk() checks.
Fix: 33307350
Test: hidl_test
Change-Id: I92a7283699bfe5b022df5ab5a9ead5690477ea97
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index 2a40125..1f6fa9f 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -32,7 +32,14 @@
// For HidlBinderSupport
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBinder>
-extern std::map<std::string, std::function<sp<IBinder>(void*)>> gBnConstructorMap;
+extern std::map<std::string, std::function<sp<IBinder>(void *)>>
+ gBnConstructorMap;
+
+// For HidlPassthroughSupport
+// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
+// returns sp<IBase>
+extern std::map<std::string, std::function<sp<::android::hidl::base::V1_0::IBase>(void *)>>
+ gBsConstructorMap;
} // namespace hardware
} // namespace android