• 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 "apex_database.h"
23 #include "apex_manifest.h"
24 #include "status.h"
25 
26 namespace android {
27 namespace apex {
28 
29 class ApexFile;
30 
31 static constexpr int kMkdirMode = 0755;
32 
33 namespace apexd_private {
34 
35 using MountedApexData = MountedApexDatabase::MountedApexData;
36 
37 std::string GetPackageMountPoint(const ApexManifest& manifest);
38 std::string GetActiveMountPoint(const ApexManifest& manifest);
39 
40 Status BindMount(const std::string& target, const std::string& source);
41 
42 bool IsMounted(const std::string& name, const std::string& full_path);
43 
44 Status MountPackage(const ApexFile& apex, const std::string& mountPoint);
45 Status UnmountPackage(const ApexFile& apex);
46 
47 }  // namespace apexd_private
48 }  // namespace apex
49 }  // namespace android
50 
51 #endif  // ANDROID_APEXD_APEXD_PRIVATE_H_
52