Add VintfObject as the top level API.
VintfObject has:
GetDeviceHalManifest (replace HalManifest::Get)
GetRuntimeInfo (replace RuntimeInfo::Get)
GetFrameworkHalManifest
Test: vintf
Test: libvintf_test
Change-Id: I6c1f0e6af0ea323054102bf713667c23dbc10972
diff --git a/main.cpp b/main.cpp
index 960ecaa..25a8cc6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,18 +17,21 @@
#include <iostream>
#include <vintf/parse_xml.h>
#include <vintf/parse_string.h>
-#include <vintf/RuntimeInfo.h>
-#include <vintf/HalManifest.h>
+#include <vintf/VintfObject.h>
int main(int, char **) {
using namespace ::android::vintf;
- const HalManifest *vm = HalManifest::Get();
+ const HalManifest *vm = VintfObject::GetDeviceHalManifest();
if (vm != nullptr)
std::cout << gHalManifestConverter(*vm);
+ const HalManifest *fm = VintfObject::GetFrameworkHalManifest();
+ if (fm != nullptr)
+ std::cout << gHalManifestConverter(*fm);
+
std::cout << std::endl;
- const RuntimeInfo *ki = RuntimeInfo::Get();
+ const RuntimeInfo *ki = VintfObject::GetRuntimeInfo();
if (ki != nullptr)
std::cout << dump(*ki);
std::cout << std::endl;