blob: 158ff5945bac1099eb8fb9c09f128b9b13184c75 [file] [log] [blame]
Nate Jiang7a7fd842022-12-06 17:11:13 -08001/*
2 * Copyright (C) 2007 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//
18#ifndef ANDROID_HARDWARE_IMOUNTSERVICE_H
19#define ANDROID_HARDWARE_IMOUNTSERVICE_H
20
21#include <binder/IInterface.h>
22#include <utils/String16.h>
23
24namespace android {
25
26// ----------------------------------------------------------------------
27
28class IMountService : public IInterface {
29 public:
30 static const int OperationSucceeded = 0;
31 static const int OperationFailedInternalError = -1;
32 static const int OperationFailedNoMedia = -2;
33 static const int OperationFailedMediaBlank = -3;
34 static const int OperationFailedMediaCorrupt = -4;
35 static const int OperationFailedVolumeNotMounted = -5;
36
37 public:
38 DECLARE_META_INTERFACE(MountService);
39
40 virtual void getShareMethodList() = 0;
41 virtual bool getShareMethodAvailable(String16 method) = 0;
42 virtual int shareVolume(String16 path, String16 method) = 0;
43 virtual int unshareVolume(String16 path, String16 method) = 0;
44 virtual bool getVolumeShared(String16 path, String16 method) = 0;
45 virtual int mountVolume(String16 path) = 0;
46 virtual int unmountVolume(String16 path) = 0;
47 virtual int formatVolume(String16 path) = 0;
48 virtual String16 getVolumeState(String16 mountPoint) = 0;
49 virtual int createSecureContainer(String16 id, int sizeMb, String16 fstype, String16 key,
50 int ownerUid) = 0;
51 virtual int finalizeSecureContainer(String16 id) = 0;
52 virtual int destroySecureContainer(String16 id) = 0;
53 virtual int mountSecureContainer(String16 id, String16 key, int ownerUid) = 0;
54 virtual int unmountSecureContainer(String16 id) = 0;
55 virtual int renameSecureContainer(String16 oldId, String16 newId) = 0;
56 virtual String16 getSecureContainerPath(String16 id) = 0;
57 virtual void getSecureContainerList() = 0;
58 virtual void shutdown() = 0;
59};
60
61// ----------------------------------------------------------------------
62
63}; // namespace android
64
65#endif // ANDROID_HARDWARE_IMOUNTSERVICE_H