blob: 43d88bc95a3316066a6613f19562c7a5dc585bd9 [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();
23
24 void setDebug(boolean debug);
25
26 void onUserAdded(int userId, int userSerial);
27 void onUserRemoved(int userId);
28 void onUserStarted(int userId);
29 void onUserStopped(int userId);
30
31 void partition(@utf8InCpp String diskId, int partitionType, int ratio);
32 void forgetPartition(@utf8InCpp String partGuid);
33
34 void mount(@utf8InCpp String volId, int mountFlags, int mountUserId);
35 void unmount(@utf8InCpp String volId);
36 void format(@utf8InCpp String volId, @utf8InCpp String fsType);
37 long benchmark(@utf8InCpp String volId);
38
39 void moveStorage(@utf8InCpp String fromVolId, @utf8InCpp String toVolId);
40
41 void remountUid(int uid, int remountMode);
42
43 void mkdirs(@utf8InCpp String path);
44
45 const int MOUNT_FLAG_PRIMARY = 1;
46 const int MOUNT_FLAG_VISIBLE = 2;
47
48 const int PARTITION_TYPE_PUBLIC = 0;
49 const int PARTITION_TYPE_PRIVATE = 1;
50 const int PARTITION_TYPE_MIXED = 2;
51
52 const int REMOUNT_MODE_NONE = 0;
53 const int REMOUNT_MODE_DEFAULT = 1;
54 const int REMOUNT_MODE_READ = 2;
55 const int REMOUNT_MODE_WRITE = 3;
56
57 const int STATE_UNMOUNTED = 0;
58 const int STATE_CHECKING = 1;
59 const int STATE_MOUNTED = 2;
60 const int STATE_MOUNTED_READ_ONLY = 3;
61 const int STATE_FORMATTING = 4;
62 const int STATE_EJECTING = 5;
63 const int STATE_UNMOUNTABLE = 6;
64 const int STATE_REMOVED = 7;
65 const int STATE_BAD_REMOVAL = 8;
66
67 const int TYPE_PUBLIC = 0;
68 const int TYPE_PRIVATE = 1;
69 const int TYPE_EMULATED = 2;
70 const int TYPE_ASEC = 3;
71 const int TYPE_OBB = 4;
Jeff Sharkey068c6be2017-09-06 13:47:40 -060072}