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/main.cpp b/main.cpp
index 6367e39..e347a91 100644
--- a/main.cpp
+++ b/main.cpp
@@ -953,10 +953,10 @@
             [&pathPrefix](Formatter &out, const FQName &fqName) {
                 out << "\"" << pathPrefix << fqName.name() << ".h\",\n";
                 if (fqName.name() != "types") {
-                    out << "\"" << pathPrefix << "IHw" << fqName.name().substr(1) << ".h\",\n";
-                    out << "\"" << pathPrefix << "Bn" << fqName.name().substr(1) << ".h\",\n";
-                    out << "\"" << pathPrefix << "Bp" << fqName.name().substr(1) << ".h\",\n";
-                    out << "\"" << pathPrefix << "Bs" << fqName.name().substr(1) << ".h\",\n";
+                    out << "\"" << pathPrefix << fqName.getInterfaceHwName() << ".h\",\n";
+                    out << "\"" << pathPrefix << fqName.getInterfaceStubName() << ".h\",\n";
+                    out << "\"" << pathPrefix << fqName.getInterfaceProxyName() << ".h\",\n";
+                    out << "\"" << pathPrefix << fqName.getInterfacePassthroughName() << ".h\",\n";
                 }
             });