• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-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 */
15rawdata OHOS.StorageManager.StorageFileRawData;
16import ../storage_manager/IUeceActivationCallback;
17interface OHOS.StorageDaemon.IStorageDaemon{
18     [ipccode 1] void Shutdown();
19     [ipccode 2] void Mount([in] String volId, [in] unsigned int flags);
20     [ipccode 3] void UMount([in] String volId);
21     [ipccode 4] void Check([in] String volId);
22     [ipccode 5] void Format([in] String volId, [in] String fsType);
23     [ipccode 6] void Partition([in] String diskId, [in] int type);
24     [ipccode 7] void SetVolumeDescription([in] String volId, [in] String description);
25     [ipccode 10] void StartUser([in] int userId);
26     [ipccode 11] void StopUser([in] int userId);
27     [ipccode 8] void PrepareUserDirs([in] int userId, [in] unsigned int flags);
28     [ipccode 9] void DestroyUserDirs([in] int userId,[in] unsigned int flags);
29     [ipccode 12] void CompleteAddUser([in] int userId);
30     // fscrypt api
31     [ipccode 13] void InitGlobalKey();
32     [ipccode 14] void InitGlobalUserKeys();
33     [ipccode 16] void GenerateUserKeys([in] unsigned int userId, [in] unsigned int flags);
34     [ipccode 17] void DeleteUserKeys([in] unsigned int userId);
35     [ipccode 18] void UpdateUserAuth([in] unsigned int userId, [in] unsigned long secureUid,
36          [in] unsigned char[] token,[in] unsigned char[] oldSecret,[in] unsigned char[] newSecret);
37     [ipccode 19] void UpdateUseAuthWithRecoveryKey([in] unsigned char[] authToken,
38          [in] unsigned char[] newSecret, [in] unsigned long secureUid, [in] unsigned int userId,
39          [in] List<List<unsigned char>> plainText);
40     [ipccode 20] void ActiveUserKey([in] unsigned int userId, [in] unsigned char[] token,
41                                     [in] unsigned char[] secret);
42     [ipccode 21] void InactiveUserKey([in] unsigned int userId);
43     [ipccode 22] void UpdateKeyContext([in] unsigned int userId , [in] boolean needRemoveTmpKey);
44     [ipccode 23] void MountCryptoPathAgain([in] unsigned int userId);
45     [ipccode 26] void LockUserScreen([in] unsigned int userId);
46     [ipccode 27] void UnlockUserScreen([in] unsigned int user, [in] unsigned char[] token,
47                                        [in] unsigned char[] secret);
48     [ipccode 28] void GetLockScreenStatus([in] unsigned int user, [out] boolean lockScreenStatus);
49     [ipccode 33] void GenerateAppkey([in] unsigned int userId, [in] unsigned int hashId, [out] String keyId,
50                                      [in] boolean needReSet);
51     [ipccode 34] void DeleteAppkey([in] unsigned int userId, [in] String keyId);
52     [ipccode 38] void CreateRecoverKey([in] unsigned int userId, [in] unsigned int userType,
53                                        [in] unsigned char[] token,[in] unsigned char[] secret);
54     [ipccode 39] void SetRecoverKey([in] unsigned char[] key);
55     // app file share api
56     [ipccode 24] int[] CreateShareFile([in] StorageFileRawData rawData,
57                                        [in] unsigned int tokenId, [in] unsigned int flag);
58     [oneway, ipccode 25] void DeleteShareFile([in] unsigned int tokenId, [in] StorageFileRawData rawData);
59     [ipccode 29] void SetBundleQuota([in] String bundleName, [in] int uid, [in] String bundleDataDirPath,
60                                      [in] int limitSizeMb);
61     [ipccode 30] void GetOccupiedSpace([in] int idType, [in] int id, [out] long size);
62     [ipccode 31] void UpdateMemoryPara([in] int size, [out] int oldSize);
63     [ipccode 35] void MountDfsDocs([in] int userId, [in] String relativePath,
64          [in] String networkId, [in] String deviceId);
65     [ipccode 36] void UMountDfsDocs([in] int userId, [in] String relativePath,
66          [in] String networkId, [in] String deviceId);
67     [ipccode 37] void GetFileEncryptStatus([in] unsigned int userId, [out] boolean isEncrypted,
68                                            [in] boolean needCheckDirMount);
69     // media fuse
70     [ipccode 40] void MountMediaFuse([in] int userId, [out] FileDescriptor devFd);
71     [ipccode 41] void UMountMediaFuse([in] int userId);
72     [ipccode 42] void GetUserNeedActiveStatus([in] unsigned int userId, [out] boolean needActive);
73     [ipccode 43] void MountFileMgrFuse([in] int userId, [in] String path, [out] FileDescriptor fuseFd);
74     [ipccode 44] void UMountFileMgrFuse([in] int userId, [in] String path);
75     [ipccode 45] void QueryUsbIsInUse([in] String diskPath, [out] boolean isInUse);
76     [ipccode 46] void ResetSecretWithRecoveryKey([in] unsigned int userId, [in] unsigned int rkType,
77                                                  [in] unsigned char[] key);
78     [ipcincapacity 131071, ipcoutcapacity 131071, ipccode 47] void IsFileOccupied([in] String path, [in] String[] inputList,
79                                      [out] String[] outputList, [out] boolean isOccupy);
80     [ipccode 49] void MountDisShareFile([in] int userId, [in] OrderedMap<String, String> shareFiles);
81     [ipccode 50] void UMountDisShareFile([in] int userId, [in] String networkId);
82     [ipccode 51] void TryToFix([in] String volId, [in] unsigned int flags);
83     [ipccode 52] void InactiveUserPublicDirKey([in] unsigned int userId);
84     [ipccode 53] void QueryOccupiedSpaceForSa([in] String storageStatus);
85     [ipccode 54] void MountUsbFuse([in] String volumeId, [out] String fsUuid, [out] FileDescriptor fuseFd);
86     [ipccode 55] void RegisterUeceActivationCallback([in] IUeceActivationCallback ueceCallback);
87     [ipccode 56] void UnregisterUeceActivationCallback();
88}