Add tags for hidl interfaces.
IFoo -> i_tag
BsFoo -> bs_tag
BnFoo -> bnhw_tag
BpFoo -> bphw_tag
Also added enable_if. This will allow us to give better error
messages and add static_asserts in certain places.
Note, the tags are in HidlSupport instead of split between
HidlSupport/HidlPassthroughSupport/HidlBinderSupport because
of this loop in that case:
HidlBinderSupport.h --> HwBnBase.h --> HidlBinderSupport.h
Bug: 62807182
Test: compiles (these are all static checks)
Change-Id: I49a5ec824959484d237c8fa3c81eaa530be8e073
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 6c0d8df..9b9457f 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -28,6 +28,18 @@
namespace hardware {
namespace details {
+// tag for pure interfaces (e.x. IFoo)
+struct i_tag {};
+
+// tag for server interfaces (e.x. BnHwFoo)
+struct bnhw_tag {};
+
+// tag for proxy interfaces (e.x. BpHwFoo)
+struct bphw_tag {};
+
+// tag for server interfaces (e.x. BsFoo)
+struct bs_tag {};
+
//Templated classes can use the below method
//to avoid creating dependencies on liblog.
void logAlwaysFatal(const char *message);