From 8063acf8ce9412e2602b341fdb718905834a76bc Mon Sep 17 00:00:00 2001 From: jiaxin <13161618211@163.com> Date: Mon, 16 Jun 2025 04:00:42 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90MDM=E3=80=91=E3=80=90=E7=AE=A1?= =?UTF-8?q?=E6=8E=A7=E7=AD=96=E7=95=A5=E7=A9=BA=E9=97=B4=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E3=80=91MDM=E6=94=AF=E6=8C=81=E7=A6=81=E7=94=A8=E6=98=9F?= =?UTF-8?q?=E9=97=AA=E6=95=B0=E4=BC=A0=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiaxin <13161618211@163.com> --- api/@ohos.enterprise.systemManager.d.ts | 83 +++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/api/@ohos.enterprise.systemManager.d.ts b/api/@ohos.enterprise.systemManager.d.ts index 5e14e768b1..e72fce0dfb 100644 --- a/api/@ohos.enterprise.systemManager.d.ts +++ b/api/@ohos.enterprise.systemManager.d.ts @@ -650,6 +650,89 @@ declare namespace systemManager { * @since 20 */ function getAutoUnlockAfterReboot(admin: Want): boolean; + + /** + * Near link protocol + * + * @enum { number } + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + enum NearLinkProtocol { + /** + * SSAP protocol. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + SSAP = 0, + + /** + * DATATRANSFER protocol. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + DATA_TRANSFER = 1 + } + + /** + * Adds protocols to the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } NearLinkProtocol - protocol of the near link to be added to the list. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function addDisallowedNearLinkProtocols(admin: Want, protocol: Array, accountId: number): void; + + /** + * Remove protocol from the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } NearLinkProtocol - protocol of the near link to be added to the list. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function removeDisallowedNearLinkProtocols(admin: Want, protocol: Array, accountId: number): void; + + /** + * Gets protocols from the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * If the admin is not empty, it must have the corresponding permission. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @returns { Array } protocol of the near link list. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getDisallowedNearLinkProtocols(admin: Want, accountId: number): Array; } export default systemManager; \ No newline at end of file -- Gitee From 66c3c8e6d4ad8244bf5d7e30a70d4e42a5ee3299 Mon Sep 17 00:00:00 2001 From: jiaxin <13161618211@163.com> Date: Wed, 18 Jun 2025 08:14:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiaxin <13161618211@163.com> --- api/@ohos.enterprise.systemManager.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.enterprise.systemManager.d.ts b/api/@ohos.enterprise.systemManager.d.ts index e72fce0dfb..37947ba753 100644 --- a/api/@ohos.enterprise.systemManager.d.ts +++ b/api/@ohos.enterprise.systemManager.d.ts @@ -690,7 +690,6 @@ declare namespace systemManager { * @param { number } accountId - accountId indicates the local ID of the OS account. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. - * @throws { BusinessError } 9200010 - A conflict policy has been configured. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly -- Gitee