Extend hidl-gen to support generate vts file.

b/30762234

TODO: add regression test.

Change-Id: I1c31fd9a85805cd450ea03cc0ccc750a756d1009
diff --git a/Interface.cpp b/Interface.cpp
index ab117f2..42186af 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -8,7 +8,7 @@
 
 Interface::Interface(
         Interface *super,
-        KeyedVector<std::string, Annotation *> *annotations)
+        AnnotationVector *annotations)
         : mSuperType(super),
           mAnnotationsByName(annotations) {
 }
@@ -29,7 +29,7 @@
     return mMethods;
 }
 
-const KeyedVector<std::string, Annotation *> &Interface::annotations() const {
+const AnnotationVector &Interface::annotations() const {
     return *mAnnotationsByName;
 }
 
@@ -114,5 +114,13 @@
     }
 }
 
+status_t Interface::emitVtsArgumentType(Formatter &out) const {
+    out << "type: TYPE_HIDL_CALLBACK\n"
+        << "predefined_type: \""
+        << localName()
+        << "\"\n";
+    return OK;
+}
+
 }  // namespace android