blob: d94535720fc54fb4cd22e893698303d0182deaba [file] [log] [blame]
Jeff Sharkey068c6be2017-09-06 13:47:40 -06001/*
2 * Copyright (C) 2017 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
17package android.os;
18
19/** {@hide} */
20interface IVold {
21 void reset();
Jeff Sharkey9462bdd2017-09-07 15:27:28 -060022 void shutdown();
Jeff Sharkey11c2d382017-09-11 10:32:01 -060023 void mountAll();
Jeff Sharkey9462bdd2017-09-07 15:27:28 -060024
25 void onUserAdded(int userId, int userSerial);
26 void onUserRemoved(int userId);
27 void onUserStarted(int userId);
28 void onUserStopped(int userId);
29
30 void partition(@utf8InCpp String diskId, int partitionType, int ratio);
31 void forgetPartition(@utf8InCpp String partGuid);
32
33 void mount(@utf8InCpp String volId, int mountFlags, int mountUserId);
34 void unmount(@utf8InCpp String volId);
35 void format(@utf8InCpp String volId, @utf8InCpp String fsType);
36 long benchmark(@utf8InCpp String volId);
37
38 void moveStorage(@utf8InCpp String fromVolId, @utf8InCpp String toVolId);
39
40 void remountUid(int uid, int remountMode);
41
42 void mkdirs(@utf8InCpp String path);
43
Jeff Sharkey11c2d382017-09-11 10:32:01 -060044 @utf8InCpp String createObb(@utf8InCpp String sourcePath,
45 @utf8InCpp String sourceKey, int ownerGid);
46 void destroyObb(@utf8InCpp String volId);
47
48 void fstrim(int fstrimFlags);
49
50 FileDescriptor mountAppFuse(int uid, int pid, int mountId);
51 void unmountAppFuse(int uid, int pid, int mountId);
52
53 const int FSTRIM_FLAG_DEEP_TRIM = 1;
54 const int FSTRIM_FLAG_BENCHMARK_AFTER = 2;
55
Jeff Sharkey9462bdd2017-09-07 15:27:28 -060056 const int MOUNT_FLAG_PRIMARY = 1;
57 const int MOUNT_FLAG_VISIBLE = 2;
58
59 const int PARTITION_TYPE_PUBLIC = 0;
60 const int PARTITION_TYPE_PRIVATE = 1;
61 const int PARTITION_TYPE_MIXED = 2;
62
63 const int REMOUNT_MODE_NONE = 0;
64 const int REMOUNT_MODE_DEFAULT = 1;
65 const int REMOUNT_MODE_READ = 2;
66 const int REMOUNT_MODE_WRITE = 3;
67
68 const int STATE_UNMOUNTED = 0;
69 const int STATE_CHECKING = 1;
70 const int STATE_MOUNTED = 2;
71 const int STATE_MOUNTED_READ_ONLY = 3;
72 const int STATE_FORMATTING = 4;
73 const int STATE_EJECTING = 5;
74 const int STATE_UNMOUNTABLE = 6;
75 const int STATE_REMOVED = 7;
76 const int STATE_BAD_REMOVAL = 8;
77
78 const int TYPE_PUBLIC = 0;
79 const int TYPE_PRIVATE = 1;
80 const int TYPE_EMULATED = 2;
81 const int TYPE_ASEC = 3;
82 const int TYPE_OBB = 4;
Jeff Sharkey068c6be2017-09-06 13:47:40 -060083}