blob: 4e5abc9069f4303018c9c4a16c30a09938f16dbd [file] [log] [blame]
Mårten Kongstad02751232018-04-27 13:16:32 +02001/*
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 IDMAP2_IDMAP2D_IDMAP2SERVICE_H_
18#define IDMAP2_IDMAP2D_IDMAP2SERVICE_H_
19
20#include <android-base/unique_fd.h>
21#include <binder/BinderService.h>
22
23#include <memory>
24#include <string>
25
26#include "android/os/BnIdmap2.h"
27
28namespace android {
29namespace os {
30class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
31 public:
32 static char const* getServiceName() {
33 return "idmap";
34 }
35
36 binder::Status getIdmapPath(const std::string& overlay_apk_path, int32_t user_id,
37 std::string* _aidl_return);
38
39 binder::Status removeIdmap(const std::string& overlay_apk_path, int32_t user_id,
40 bool* _aidl_return);
41
Mårten Kongstadef0695d2018-12-04 14:36:48 +010042 binder::Status verifyIdmap(const std::string& overlay_apk_path, int32_t user_id,
43 bool* _aidl_return);
44
Mårten Kongstad02751232018-04-27 13:16:32 +020045 binder::Status createIdmap(const std::string& target_apk_path,
46 const std::string& overlay_apk_path, int32_t user_id,
47 std::unique_ptr<std::string>* _aidl_return);
48};
49} // namespace os
50} // namespace android
51
52#endif // IDMAP2_IDMAP2D_IDMAP2SERVICE_H_