blob: 25a8cc65c2eb79d8d8d7a6120ed8d841922337d2 [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 Hong3daec812017-02-27 18:49:11 -080020#include <vintf/VintfObject.h>
Yifan Hong676447a2016-11-15 12:57:23 -080021
22int main(int, char **) {
23 using namespace ::android::vintf;
24
Yifan Hong3daec812017-02-27 18:49:11 -080025 const HalManifest *vm = VintfObject::GetDeviceHalManifest();
Yifan Hong676447a2016-11-15 12:57:23 -080026 if (vm != nullptr)
Yifan Hongd2b7e642017-02-17 10:15:32 -080027 std::cout << gHalManifestConverter(*vm);
Yifan Hongccf967b2017-01-18 11:04:19 -080028
Yifan Hong3daec812017-02-27 18:49:11 -080029 const HalManifest *fm = VintfObject::GetFrameworkHalManifest();
30 if (fm != nullptr)
31 std::cout << gHalManifestConverter(*fm);
32
Yifan Hongccf967b2017-01-18 11:04:19 -080033 std::cout << std::endl;
Yifan Hong3daec812017-02-27 18:49:11 -080034 const RuntimeInfo *ki = VintfObject::GetRuntimeInfo();
Yifan Hongccf967b2017-01-18 11:04:19 -080035 if (ki != nullptr)
36 std::cout << dump(*ki);
37 std::cout << std::endl;
Yifan Hong676447a2016-11-15 12:57:23 -080038}