• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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_APEXD_PRIVATE_H_
18 #define ANDROID_APEXD_APEXD_PRIVATE_H_
19 
20 #include <string>
21 
22 #include <android-base/result.h>
23 #include "apex_database.h"
24 #include "apex_file.h"
25 #include "apex_manifest.h"
26 
27 namespace android {
28 namespace apex {
29 
30 class ApexFile;
31 
32 static constexpr int kMkdirMode = 0755;
33 
34 namespace apexd_private {
35 
36 std::string GetPackageMountPoint(const ::apex::proto::ApexManifest& manifest);
37 std::string GetPackageTempMountPoint(
38     const ::apex::proto::ApexManifest& manifest);
39 std::string GetActiveMountPoint(const ::apex::proto::ApexManifest& manifest);
40 
41 android::base::Result<void> BindMount(const std::string& target,
42                                       const std::string& source);
43 android::base::Result<MountedApexDatabase::MountedApexData>
44 GetTempMountedApexData(const std::string& package);
45 android::base::Result<void> UnmountTempMount(const ApexFile& apex);
46 
47 }  // namespace apexd_private
48 }  // namespace apex
49 }  // namespace android
50 
51 #endif  // ANDROID_APEXD_APEXD_PRIVATE_H_
52