blob: 8d11e26261929da2864d54a36a5ed5d885d1ff25 [file] [log] [blame]
Dario Freniaeb233c2018-08-28 12:48:42 +01001/*
2 * Copyright (C) 2018 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#ifndef ANDROID_APEXD_APEX_MANIFEST_H_
18#define ANDROID_APEXD_APEX_MANIFEST_H_
19
Abhijeet Kaur216e36c2019-01-04 10:15:01 +000020#include "apex_manifest.pb.h"
Jiyong Park69c0f112018-11-22 20:38:05 +090021#include "status_or.h"
Dario Freniaeb233c2018-08-28 12:48:42 +010022
Jiyong Park69c0f112018-11-22 20:38:05 +090023#include <string>
Andreas Gampeeae47842018-10-19 11:53:48 -070024
Abhijeet Kaur216e36c2019-01-04 10:15:01 +000025using ::apex::proto::ApexManifest;
26
Dario Freniaeb233c2018-08-28 12:48:42 +010027namespace android {
28namespace apex {
Abhijeet Kaur216e36c2019-01-04 10:15:01 +000029// Parses and validates APEX manifest.
30StatusOr<ApexManifest> ParseManifest(const std::string& content);
31// Returns package id of an ApexManifest
32std::string GetPackageId(const ApexManifest& apex_manifest);
Dario Freniaeb233c2018-08-28 12:48:42 +010033
34} // namespace apex
35} // namespace android
36
37#endif // ANDROID_APEXD_APEX_MANIFEST_H_