• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15sequenceable StorageStats..OHOS.StorageManager.StorageStats;
16sequenceable BundleStats..OHOS.StorageManager.BundleStats;
17sequenceable Disk..OHOS.StorageManager.Disk;
18sequenceable VolumeCore..OHOS.StorageManager.VolumeCore;
19sequenceable VolumeExternal..OHOS.StorageManager.VolumeExternal;
20rawdata OHOS.StorageManager.StorageFileRawData;
21import IUeceActivationCallback;
22interface OHOS.StorageManager.IStorageManager {
23    [ipccode 1] void PrepareAddUser([in] int userId, [in] unsigned int flags);
24    [ipccode 2] void RemoveUser([in] int userId, [in] unsigned int flags);
25    [ipccode 3] void PrepareStartUser([in] int userId);
26    [ipccode 4] void StopUser([in] int userId);
27    [ipccode 5] void CompleteAddUser([in]  int userId);
28    [ipccode 7] void GetFreeSizeOfVolume([in] String volumeUuid, [out] long freeSize);
29    [ipccode 6] void GetTotalSizeOfVolume([in] String volumeUuid, [out] long totalSize);
30    [ipccode 8] void GetBundleStats([in] String pkgName, [out] BundleStats bundleStats, [in]  int appIndex,
31                                    [in]  unsigned int statFlag);
32    [ipccode 9] void GetSystemSize([out] long systemSize);
33    [ipccode 10] void GetTotalSize([out] long totalSize);
34    [ipccode 11] void GetFreeSize([out] long freeSize);
35    [ipccode 12] void GetUserStorageStats([out] StorageStats storageStats);
36    [ipccode 13] void GetUserStorageStats([in] int userId, [out] StorageStats storageStats);
37    [ipccode 14] void GetCurrentBundleStats([out] BundleStats bundleStats, [in] unsigned int statFlag);
38    [ipccode 46] void GetUserStorageStatsByType([in] int userId, [out] StorageStats storageStats,
39                                                [in] String type);
40    [ipccode 15] void NotifyVolumeCreated([in] VolumeCore vc);
41    [ipccode 16] void NotifyVolumeMounted([in] String volumeId, [in] String fsTypeStr, [in] String fsUuid,
42                                          [in] String path, [in] String description);
43    [ipccode 17] void NotifyVolumeStateChanged([in] String volumeId, [in] unsigned int  state);
44    [ipccode 18] void Mount([in] String volumeId);
45    [ipccode 19] void Unmount([in] String volumeId);
46    [ipccode 22] void GetAllVolumes([out] VolumeExternal[] vecOfVol);
47    [ipccode 23] void NotifyDiskCreated([in] Disk disk);
48    [ipccode 24] void NotifyDiskDestroyed([in] String diskId);
49    [ipccode 25] void Partition([in] String diskId, [in] int  type);
50    [ipccode 26] void GetAllDisks([out] Disk[] vecOfDisk);
51    [ipccode 40] void SetVolumeDescription([in] String fsUuid, [in] String description);
52    [ipccode 41] void Format([in] String volumeId, [in] String fsType);
53    [ipccode 54] void NotifyMtpMounted([in] String id, [in] String path, [in] String desc,[in] String uuid);
54    [ipccode 55] void NotifyMtpUnmounted([in] String id, [in] String path, [in] boolean isBadRemove);
55    [ipccode 28] void GenerateUserKeys([in] unsigned int userId, [in] unsigned int flags);
56    [ipccode 29] void DeleteUserKeys([in] unsigned int userId);
57    [ipccode 30] void UpdateUserAuth([in] unsigned int userId,
58                                     [in] unsigned long secureUid,
59                                     [in] List<unsigned char> token,
60                                     [in] List<unsigned char> oldSecret,
61                                     [in] List<unsigned char> newSecret);
62    [ipccode 32] void ActiveUserKey([in] unsigned int userId, [in] unsigned char[] token,
63                                    [in] unsigned char[] secret);
64    [ipccode 33] void InactiveUserKey([in] unsigned int userId);
65    [ipccode 37] void UpdateKeyContext([in] unsigned int userId , [in] boolean needRemoveTmpKey);
66    [oneway, ipccode 34] void LockUserScreen([in] unsigned int userId);
67    [ipccode 35] void UnlockUserScreen([in] unsigned int userId, [in] unsigned char[] token,
68                                       [in] unsigned char[] secret);
69    [ipccode 36] void GetLockScreenStatus([in] unsigned int userId, [out] boolean lockScreenStatus);
70    [ipccode 49] void GenerateAppkey([in] unsigned int hashId, [in] unsigned int userId, [out] String keyId,
71                                     [in] boolean needReSet);
72    [ipccode 50] void DeleteAppkey([in] String  keyId);
73    [ipccode 51] void GetFileEncryptStatus([in] unsigned int userId, [out] boolean isEncrypted,
74                                           [in] boolean needCheckDirMoun);
75    [ipccode 52] void CreateRecoverKey([in] unsigned int userId, [in] unsigned int userType,
76                                       [in] unsigned char[] token, [in] unsigned char[] secret);
77    [ipccode 53] void SetRecoverKey([in] unsigned char[] key);
78    [ipccode 43] int[] CreateShareFile([in] StorageFileRawData rawData,
79                                       [in] unsigned int tokenId, [in] unsigned int flag);
80    [oneway, ipccode 44] void DeleteShareFile([in] unsigned int  tokenId, [in] StorageFileRawData rawData);
81    [ipccode 45] void SetBundleQuota([in] String bundleName, [in] int uid, [in] String bundleDataDirPath,
82                                     [in] int limitSizeMb);
83    [ipccode 47] void UpdateMemoryPara([in] int size, [out] int oldSize);
84    [ipccode 20] void MountDfsDocs([in] int userId, [in] String relativePath, [in] String networkId,
85                                    [in] String deviceId);
86    [ipccode 21] void UMountDfsDocs([in] int userId, [in] String relativePath, [in] String networkId,
87                                     [in] String deviceId);
88    [ipccode 56] void MountMediaFuse([in] int userId, [out] FileDescriptor devFd);
89    [ipccode 57] void UMountMediaFuse([in] int userId);
90    [ipccode 42] void GetDiskById([in] String diskId, [out] Disk disk);
91    [ipccode 38] void GetVolumeByUuid([in] String fsUuid, [out] VolumeExternal vc);
92    [ipccode 39]  void GetVolumeById([in] String volumeId, [out] VolumeExternal vc);
93    [ipccode 31] void UpdateUseAuthWithRecoveryKey([in] unsigned char[] authToken, [in] unsigned char[] newSecret,
94        [in] unsigned long secureUid, [in] unsigned int userId, [in] List<List<unsigned char>> plainText);
95    [ipccode 58] void GetUserNeedActiveStatus([in] unsigned int userId, [out] boolean needActive);
96    [ipccode 59] void MountFileMgrFuse([in] int userId, [in] String path, [out] FileDescriptor fuseFd);
97    [ipccode 60] void UMountFileMgrFuse([in] int userId, [in] String path);
98    [ipccode 61] void QueryUsbIsInUse([in] String diskPath, [out] boolean isInUse);
99    [ipcincapacity 131071, ipcoutcapacity 131071, ipccode 62] void IsFileOccupied([in] String path, [in] String[] inputList,
100                                     [out] String[] outputList, [out] boolean isOccupy);
101    [ipccode 63] void ResetSecretWithRecoveryKey([in] unsigned int userId, [in] unsigned int rkType,
102                                                 [in] unsigned char[] key);
103    [ipccode 65] void MountDisShareFile([in] int userId, [in] OrderedMap<String, String> shareFiles);
104    [ipccode 66] void UMountDisShareFile([in] int userId, [in] String networkId);
105    [ipccode 67] void NotifyVolumeDamaged([in] String volumeId, [in] String fsTypeStr, [in] String fsUuid,
106                                          [in] String path, [in] String description);
107    [ipccode 68] void TryToFix([in] String volumeId);
108    [ipccode 69] void InactiveUserPublicDirKey([in] unsigned int userId);
109    [ipccode 72] void RegisterUeceActivationCallback([in] IUeceActivationCallback ueceCallback);
110    [ipccode 73] void UnregisterUeceActivationCallback();
111}