Clean up hard-coded Bp/Bn/Bs/IHw prefixes.

Also,
* use iface->localName() instead of "I" + iface->getBaseName()
* do not hardcode IBase related strings
* remove baseName in some places

Bug: 32559427
Test: hidl_test
Change-Id: Ib2049f570ca27d33a945dd6ccb5442e336a11262
diff --git a/FQName.cpp b/FQName.cpp
index 700af9f..5e9e347 100644
--- a/FQName.cpp
+++ b/FQName.cpp
@@ -281,12 +281,44 @@
     return !(*this == other);
 }
 
-std::string FQName::getInterfaceBaseName() const {
+std::string FQName::getInterfaceName() const {
     CHECK(names().size() == 1) << "Must be a top level type";
     CHECK(!mName.empty() && mName[0] == 'I') << mName;
 
+    return mName;
+}
+
+std::string FQName::getInterfaceBaseName() const {
     // cut off the leading 'I'.
-    return mName.substr(1);
+    return getInterfaceName().substr(1);
+}
+
+std::string FQName::getInterfaceHwName() const {
+    return "IHw" + getInterfaceBaseName();
+}
+
+std::string FQName::getInterfaceProxyName() const {
+    return "Bp" + getInterfaceBaseName();
+}
+
+std::string FQName::getInterfaceStubName() const {
+    return "Bn" + getInterfaceBaseName();
+}
+
+std::string FQName::getInterfacePassthroughName() const {
+    return "Bs" + getInterfaceBaseName();
+}
+
+FQName FQName::getInterfaceProxyFqName() const {
+    return FQName(package(), version(), getInterfaceProxyName());
+}
+
+FQName FQName::getInterfaceStubFqName() const {
+    return FQName(package(), version(), getInterfaceStubName());
+}
+
+FQName FQName::getInterfacePassthroughFqName() const {
+    return FQName(package(), version(), getInterfacePassthroughName());
 }
 
 FQName FQName::getTypesForPackage() const {