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 16sequenceable Want..OHOS.AAFwk.Want; 17sequenceable ElementName..OHOS.AppExecFwk.ElementName; 18sequenceable EntInfo..OHOS.EDM.EntInfo; 19interface_token ohos.edm.IEnterpriseDeviceMgr; 20import AdminType; 21 22interface OHOS.EDM.IEnterpriseDeviceMgrIdl { 23 [ipccode 1] void EnableAdmin([in] ElementName admin, [in] EntInfo entInfo, [in] AdminType adminType, [in] int userId); 24 [ipccode 2] void DisableAdmin([in] ElementName admin, [in] int userId); 25 [ipccode 4] void DisableSuperAdmin([in] String bundleName); 26 [ipccode 5] void GetEnabledAdmin([in] AdminType adminType, [out] String[] enabledAdminList); 27 [ipccode 6] void GetEnterpriseInfo([in] ElementName admin, [out] EntInfo entInfo); 28 [ipccode 7] void SetEnterpriseInfo([in] ElementName admin, [in] EntInfo entInfo); 29 [ipccode 8] void IsSuperAdmin([in] String bundleName, [out] boolean isSuper); 30 [ipccode 9] void IsAdminEnabled([in] ElementName admin, [in] int userId, [out] boolean isEnabled); 31 [ipccode 10] void SubscribeManagedEvent([in] ElementName admin, [in] unsigned int[] events); 32 [ipccode 11] void UnsubscribeManagedEvent([in] ElementName admin, [in] unsigned int[] events); 33 [ipccode 12] void AuthorizeAdmin([in] ElementName admin, [in] String bundleName); 34 [ipccode 13] void GetSuperAdmin([out] String bundleName, [out] String abilityName); 35 [ipccode 14] void SetDelegatedPolicies([in] ElementName parentAdmin, [in] String bundleName, [in] String[] policies); 36 [ipccode 15] void GetDelegatedPolicies([in] ElementName parentAdmin, [in] String bundleName, [out] String[] policies); 37 [ipccode 16] void GetDelegatedBundleNames([in] ElementName parentAdmin, [in] String policyName, [out] String[] bundleNames); 38 [ipccode 17] void ReplaceSuperAdmin([in] ElementName oldAdmin, [in] ElementName newAdmin, [in] boolean keepPolicy); 39 [ipccode 18] void GetAdmins([out] List<sharedptr<Want>> wants); 40 [ipccode 19] void SetAdminRunningMode([in] ElementName admin, [in] unsigned int runningMode); 41 [ipccode 20] void SetDelegatedPolicies([in] String bundleName, [in] String[] policies, [in] int userId); 42 [ipccode 21] void SetBundleInstallPolicies([in] String[] bundles, [in] int userId, [in] int policyType); 43 [ipccode 22] void IsByodAdmin([in] ElementName admin, [out] boolean isByod); 44} 45