Add <fqname> to manifests.

The format of <fqname> is:
<hal>
    <name>android.hardware.foo</name>
    <!-- transport, etc. -->
    <fqname>@1.0::IFoo/default</fqname>
</hal>

It is possible to mix <fqname> and <version>
x <interface> x <instance> ; see tests for details.

This allows instances at different versions. For example,
it is now allowed to serve @1.0::IFoo/default, @1.1::IFoo/custom
simultaneously without serving @1.1::IFoo/default.

If override="true" and no <version>x<interface>x<instance> nor
<fqname>, the HAL tag is disabled. (Previously, the HAL tag
is disabled iff no <version> exists).

Bug: 73556059
Test: libvintf_test
Test: vintf_object_test

Change-Id: I80cb9ccdeec708c2c5530812913b37f8b3cc3ffa
Merged-In: I80cb9ccdeec708c2c5530812913b37f8b3cc3ffa
diff --git a/parse_string.cpp b/parse_string.cpp
index 51ca009..0aff5ea 100644
--- a/parse_string.cpp
+++ b/parse_string.cpp
@@ -511,5 +511,13 @@
     return toFQNameString("", range, interface, instance);
 }
 
+std::ostream& operator<<(std::ostream& os, const FqInstance& fqInstance) {
+    return os << fqInstance.string();
+}
+
+bool parse(const std::string& s, FqInstance* fqInstance) {
+    return fqInstance->setTo(s);
+}
+
 } // namespace vintf
 } // namespace android