blob: 960ecaa2eb576b9e05cd31d6dfc8481cd45f2f4c [file] [log] [blame]
Yifan Hong676447a2016-11-15 12:57:23 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <iostream>
18#include <vintf/parse_xml.h>
Yifan Hongccf967b2017-01-18 11:04:19 -080019#include <vintf/parse_string.h>
Yifan Honga7201e72017-02-17 10:09:59 -080020#include <vintf/RuntimeInfo.h>
Yifan Hongd2b7e642017-02-17 10:15:32 -080021#include <vintf/HalManifest.h>
Yifan Hong676447a2016-11-15 12:57:23 -080022
23int main(int, char **) {
24 using namespace ::android::vintf;
25
Yifan Hongd2b7e642017-02-17 10:15:32 -080026 const HalManifest *vm = HalManifest::Get();
Yifan Hong676447a2016-11-15 12:57:23 -080027 if (vm != nullptr)
Yifan Hongd2b7e642017-02-17 10:15:32 -080028 std::cout << gHalManifestConverter(*vm);
Yifan Hongccf967b2017-01-18 11:04:19 -080029
30 std::cout << std::endl;
Yifan Honga7201e72017-02-17 10:09:59 -080031 const RuntimeInfo *ki = RuntimeInfo::Get();
Yifan Hongccf967b2017-01-18 11:04:19 -080032 if (ki != nullptr)
33 std::cout << dump(*ki);
34 std::cout << std::endl;
Yifan Hong676447a2016-11-15 12:57:23 -080035}