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 */ 15 16import DlpPermissionTypes; 17 18sequenceable OHOS.IRemoteObject; 19sequenceable OHOS.AAFwk.Want; 20sequenceable dlp_policy_parcel..OHOS.Security.DlpPermission.DlpPolicyParcel; 21sequenceable cert_parcel..OHOS.Security.DlpPermission.CertParcel; 22sequenceable dlp_permission_info_parcel..OHOS.Security.DlpPermission.DLPPermissionInfoParcel; 23sequenceable retention_sandbox_info..OHOS.Security.DlpPermission.RetentionSandBoxInfo; 24sequenceable visited_dlp_file_info..OHOS.Security.DlpPermission.VisitedDLPFileInfo; 25sequenceable permission_policy..OHOS.Security.DlpPermission.SandboxInfo; 26interface OHOS.Security.DlpPermission.IDlpPermissionCallback; 27 28interface OHOS.Security.DlpPermission.IDlpPermissionService { 29 void GenerateDlpCertificate( 30 [in] sptr<DlpPolicyParcel> policyParcel, 31 [in] IDlpPermissionCallback dlpPermissionCallback); 32 void ParseDlpCertificate( 33 [in] sptr<CertParcel> certParcel, 34 [in] IDlpPermissionCallback dlpPermissionCallback, 35 [in] String appId, 36 [in] boolean offlineAccess); 37 void InstallDlpSandbox( 38 [in] String bundleName, 39 [in] DLPFileAccess dlpFileAccess, 40 [in] int userId, 41 [out] SandboxInfo sandboxInfo, 42 [in] String uri); 43 void UninstallDlpSandbox([in] String bundleName, [in] int appIndex, [in] int userId); 44 void GetSandboxExternalAuthorization( 45 [in] int sandboxUid, 46 [in] Want want, 47 [out] enum SandBoxExternalAuthorType authType); 48 void QueryDlpFileCopyableByTokenId([out] boolean copyable, [in] unsigned int tokenId); 49 void QueryDlpFileAccess([out] DLPPermissionInfoParcel permInfoParcel); 50 void IsInDlpSandbox([out] boolean inSandbox); 51 void GetDlpSupportFileType([out] String[] supportFileType); 52 void RegisterDlpSandboxChangeCallback([in] IRemoteObject cb); 53 void UnRegisterDlpSandboxChangeCallback([out] boolean res); 54 void RegisterOpenDlpFileCallback([in] IRemoteObject cb); 55 void UnRegisterOpenDlpFileCallback([in] IRemoteObject cb); 56 void GetDlpGatheringPolicy([out] boolean isGathering); 57 void SetRetentionState([in] String[] docUriVec); 58 void CancelRetentionState([in] String[] docUriVec); 59 void GetRetentionSandboxList([in] String bundleName, [out] RetentionSandBoxInfo[] retentionSandBoxInfoVec); 60 void ClearUnreservedSandbox(); 61 void GetDLPFileVisitRecord([out] VisitedDLPFileInfo[] infoVec); 62 void SetSandboxAppConfig([in] String configInfo); 63 void CleanSandboxAppConfig(); 64 void GetSandboxAppConfig([out] String configInfo); 65 void IsDLPFeatureProvided([out] boolean isProvideDLPFeature); 66 void SetDlpFeature([in] unsigned int dlpFeatureInfo, [out] boolean statusSetInfo); 67 void SetReadFlag([in] unsigned int uid); 68 void SetMDMPolicy([in] String[] appIdList); 69 void GetMDMPolicy([out] String[] appIdList); 70 void RemoveMDMPolicy(); 71}