/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
sequenceable StorageStats..OHOS.StorageManager.StorageStats;
sequenceable BundleStats..OHOS.StorageManager.BundleStats;
sequenceable ExtBundleStats..OHOS.StorageManager.ExtBundleStats;
sequenceable Disk..OHOS.StorageManager.Disk;
sequenceable VolumeCore..OHOS.StorageManager.VolumeCore;
sequenceable VolumeExternal..OHOS.StorageManager.VolumeExternal;
sequenceable VolumeCore..OHOS.StorageManager.VolumeInfoStr;
sequenceable UserdataDirInfo..OHOS.StorageManager.UserdataDirInfo;
sequenceable PartitionParams..OHOS.StorageManager.PartitionParams;
sequenceable PartitionInfo..OHOS.StorageManager.PartitionInfo;
sequenceable PartitionTableInfo..OHOS.StorageManager.PartitionTableInfo;
sequenceable FormatParams..OHOS.StorageManager.FormatParams;
sequenceable BurnParams..OHOS.StorageManager.BurnParams;
rawdata OHOS.StorageManager.StorageFileRawData;
import IUeceActivationCallback;
interface OHOS.StorageManager.IStorageManager {
[ipccode 1] void PrepareAddUser([in] int userId, [in] unsigned int flags);
[ipccode 2] void RemoveUser([in] int userId, [in] unsigned int flags);
[ipccode 3] void PrepareStartUser([in] int userId);
[ipccode 4] void StopUser([in] int userId);
[ipccode 5] void CompleteAddUser([in] int userId);
[ipccode 7] void GetFreeSizeOfVolume([in] String volumeUuid, [out] long freeSize);
[ipccode 6] void GetTotalSizeOfVolume([in] String volumeUuid, [out] long totalSize);
[ipccode 8] void GetBundleStats([in] String pkgName, [out] BundleStats bundleStats, [in] int appIndex,
[in] unsigned int statFlag);
[ipccode 9] void GetSystemSize([out] long systemSize);
[ipccode 10] void GetTotalSize([out] long totalSize);
[ipccode 11] void GetFreeSize([out] long freeSize);
[ipccode 12] void GetUserStorageStats([out] StorageStats storageStats);
[ipccode 13] void GetUserStorageStats([in] int userId, [out] StorageStats storageStats);
[ipccode 14] void GetCurrentBundleStats([out] BundleStats bundleStats, [in] unsigned int statFlag);
[ipccode 46] void GetUserStorageStatsByType([in] int userId, [out] StorageStats storageStats,
[in] String type);
[ipccode 15] void NotifyVolumeCreated([in] VolumeCore vc);
[ipccode 16] void NotifyVolumeMounted([in] VolumeInfoStr vis);
[ipccode 17] void NotifyVolumeStateChanged([in] String volumeId, [in] unsigned int state);
[ipccode 18] void Mount([in] String volumeId);
[ipccode 19] void Unmount([in] String volumeId);
[ipccode 22] void GetAllVolumes([out] VolumeExternal[] vecOfVol);
[ipccode 23] void NotifyDiskCreated([in] Disk disk);
[ipccode 24] void NotifyDiskDestroyed([in] String diskId);
[ipccode 25] void Partition([in] String diskId, [in] int type);
[ipccode 26] void GetAllDisks([out] Disk[] vecOfDisk);
[ipccode 40] void SetVolumeDescription([in] String fsUuid, [in] String description);
[ipccode 41] void Format([in] String volumeId, [in] String fsType);
[ipccode 54] void NotifyMtpMounted([in] String id, [in] String path, [in] String desc,[in] String uuid,[in] String fsType);
[ipccode 55] void NotifyMtpUnmounted([in] String id, [in] boolean isBadRemove);
[ipccode 30] void UpdateUserAuth([in] unsigned int userId,
[in] unsigned long secureUid,
[in] List<unsigned char> token,
[in] List<unsigned char> oldSecret,
[in] List<unsigned char> newSecret);
[ipccode 32] void ActiveUserKey([in] unsigned int userId, [in] unsigned char[] token,
[in] unsigned char[] secret);
[ipccode 33] void InactiveUserKey([in] unsigned int userId);
[ipccode 37] void UpdateKeyContext([in] unsigned int userId , [in] boolean needRemoveTmpKey);
[oneway, ipccode 34] void LockUserScreen([in] unsigned int userId);
[ipccode 35] void UnlockUserScreen([in] unsigned int userId, [in] unsigned char[] token,
[in] unsigned char[] secret);
[ipccode 36] void GetLockScreenStatus([in] unsigned int userId, [out] boolean lockScreenStatus);
[ipccode 49] void GenerateAppkey([in] unsigned int hashId, [in] unsigned int userId, [out] String keyId,
[in] boolean needReSet);
[ipccode 50] void DeleteAppkey([in] String keyId);
[ipccode 51] void GetFileEncryptStatus([in] unsigned int userId, [out] boolean isEncrypted,
[in] boolean needCheckDirMoun);
[ipccode 52] void CreateRecoverKey([in] unsigned int userId, [in] unsigned int userType,
[in] unsigned char[] token, [in] unsigned char[] secret);
[ipccode 53] void SetRecoverKey([in] unsigned char[] key);
[ipccode 43] int[] CreateShareFile([in] StorageFileRawData rawData,
[in] unsigned int tokenId, [in] unsigned int flag);
[oneway, ipccode 44] void DeleteShareFile([in] unsigned int tokenId, [in] StorageFileRawData rawData);
[ipccode 45] void SetBundleQuota([in] String bundleName, [in] int uid, [in] String bundleDataDirPath,
[in] int limitSizeMb);
[ipccode 20] void MountDfsDocs([in] int userId, [in] String relativePath, [in] String networkId,
[in] String deviceId);
[ipccode 21] void UMountDfsDocs([in] int userId, [in] String relativePath, [in] String networkId,
[in] String deviceId);
[ipccode 56] void MountMediaFuse([in] int userId, [out] FileDescriptor devFd);
[ipccode 57] void UMountMediaFuse([in] int userId);
[ipccode 42] void GetDiskById([in] String diskId, [out] Disk disk);
[ipccode 38] void GetVolumeByUuid([in] String fsUuid, [out] VolumeExternal vc);
[ipccode 39] void GetVolumeById([in] String volumeId, [out] VolumeExternal vc);
[ipccode 31] void UpdateUseAuthWithRecoveryKey([in] unsigned char[] authToken, [in] unsigned char[] newSecret,
[in] unsigned long secureUid, [in] unsigned int userId, [in] List<List<unsigned char>> plainText);
[ipccode 58] void GetUserNeedActiveStatus([in] unsigned int userId, [out] boolean needActive);
[ipccode 59] void MountFileMgrFuse([in] int userId, [in] String path, [out] FileDescriptor fuseFd);
[ipccode 60] void UMountFileMgrFuse([in] int userId, [in] String path);
[ipccode 61] void QueryUsbIsInUse([in] String diskPath, [out] boolean isInUse);
[ipcincapacity 131071, ipcoutcapacity 131071, ipccode 62] void IsFileOccupied([in] String path, [in] String[] inputList,
[out] String[] outputList, [out] boolean isOccupy);
[ipccode 63] void ResetSecretWithRecoveryKey([in] unsigned int userId, [in] unsigned int rkType,
[in] unsigned char[] key);
[ipccode 65] void MountDisShareFile([in] int userId, [in] OrderedMap<String, String> shareFiles);
[ipccode 66] void UMountDisShareFile([in] int userId, [in] String networkId);
[ipccode 67] void NotifyVolumeDamaged([in] VolumeInfoStr vis);
[ipccode 68] void TryToFix([in] String volumeId);
[ipccode 69] void InactiveUserPublicDirKey([in] unsigned int userId);
[ipccode 72] void RegisterUeceActivationCallback([in] IUeceActivationCallback ueceCallback);
[ipccode 73] void UnregisterUeceActivationCallback();
[ipccode 74] void CreateUserDir([in] String path, [in] unsigned int mode,
[in] unsigned int uid, [in] unsigned int gid);
[ipccode 76] void SetDirEncryptionPolicy([in] unsigned int userId, [in] String dirPath, [in] unsigned int type);
[ipccode 77] void UpdateUserPublicDirPolicy([in] unsigned int userId);
[ipccode 78] void NotifyUserChangedEvent([in] unsigned int userId, [in] unsigned int eventType);
[ipccode 79] void SetExtBundleStats([in] unsigned int userId, [in] ExtBundleStats stats);
[ipccode 80] void GetExtBundleStats([in] unsigned int userId, [inout] ExtBundleStats stats);
[ipccode 81] void EraseAllUserEncryptedKeys();
[ipccode 82] void GetAllExtBundleStats([in] unsigned int userId, [out] List<ExtBundleStats> statsVec);
[ipccode 83] void ListUserdataDirInfo([out] List<UserdataDirInfo> dirs);
[ipccode 84] void IsUsbFuseByType([in] String fsType, [out] boolean enabled);
[ipccode 85] void NotifyCreateBundleDataDirWithEl([in] unsigned int userId, [in] unsigned char elx);
[ipccode 86] void QueryActiveOsAccountIds([out] int[] ids);
[ipccode 87] void IsOsAccountExists([in] unsigned int userId, [out] boolean isOsAccountExists);
[ipccode 89] void GetSystemDataSize([out] long systemDataSize);
[ipccode 90] void GetTotalInodes([out] long totalInodes);
[ipccode 91] void GetFreeInodes([out] long freeInodes);
[ipccode 92] void GetCurrentBundleInodes([out] long curInodes);
//disk crypt api
[ipccode 93] void NotifyEncryptVolumeStateChanged([in] VolumeInfoStr vis);
[ipccode 94] void Encrypt([in] String volumeId, [in] String pazzword);
[ipccode 95] void GetCryptProgressById([in] String volumeId, [out] int progress);
[ipccode 96] void GetCryptUuidById([in] String volumeId, [out] String uuid);
[ipccode 97] void BindRecoverKeyToPasswd([in] String volumeId,
[in] String pazzword,
[in] String recoverKey);
[ipccode 98] void UpdateCryptPasswd([in] String volumeId,
[in] String pazzword,
[in] String newPazzword);
[ipccode 99] void ResetCryptPasswd([in] String volumeId,
[in] String recoverKey,
[in] String newPazzword);
[ipccode 100] void VerifyCryptPasswd([in] String volumeId, [in] String pazzword);
[ipccode 101] void Unlock([in] String volumeId, [in] String pazzword);
[ipccode 102] void Decrypt([in] String volumeId, [in] String pazzword);
[ipccode 107] void GetPartitionTable([in] String diskId, [out] PartitionTableInfo partitionTableInfo);
[ipccode 108] void CreatePartition([in] String diskId, [in] PartitionParams partitionParams);
[ipccode 109] void DeletePartition([in] String diskId, [in] unsigned int partitionNum);
[ipccode 110] void FormatPartition([in] String diskId, [in] unsigned int partitionNum, [in] FormatParams formatParams);
[ipccode 113] void UMountDisShareFile([in] String[] distributeDirs);
}