From 18ba4f68b2dba746387be206d8d62322996cbfb4 Mon Sep 17 00:00:00 2001 From: w30076694 Date: Wed, 20 Aug 2025 15:34:03 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"CameraKit=20=E9=87=8D=E8=BD=BD?= =?UTF-8?q?=E6=95=B4=E6=94=B9PR1"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0e4aa55da144f8f7639b8bbcc7d571afbce01b05. Signed-off-by: w30076694 --- api/@ohos.multimedia.camera.d.ts | 1246 +++++------------------------- 1 file changed, 202 insertions(+), 1044 deletions(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index a5b1a2336ee..ce0b0c2fb7a 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -1052,13 +1052,14 @@ declare namespace camera { * @permission ohos.permission.CAMERA * @param { CameraDevice } camera - Camera device used to create the instance. * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding - * error code, which is of type CameraErrorCode. + * error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createCameraInput(camera: CameraDevice): CameraInput; @@ -1091,69 +1092,23 @@ declare namespace camera { * * @permission ohos.permission.CAMERA * @param { CameraPosition } position - Camera position, first get the supported camera device - * objects through the getSupportedCameras interface, and then get the device position information - * based on the returned camera device objects. + * objects through the getSupportedCameras interface, and then get the device position information + * based on the returned camera device objects. * @param { CameraType } type - camera type, first get the supported camera device object through - * the getSupportedCameras interface, then get the device type information based on the returned - * camera device object. + * the getSupportedCameras interface, then get the device type information based on the returned + * camera device object. * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns - * the corresponding error code, which is of type CameraErrorCode. + * the corresponding error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createCameraInput(position: CameraPosition, type: CameraType): CameraInput; - /** - * @since 20 - * @arkts 1.2 - */ - overload createCameraInput { createCameraInputWithCamera, createCameraInputWithPositionType }; - - /** - * Creates a CameraInput instance by camera. - * - * Before using this interface, first through the getSupportedCameras interface to query the current list of camera - * devices supported by the device, the developer needs to be based on specific scenarios to choose the camera device - * that meets the needs of the developer, and then use this interface to create a CameraInput instance. - * - * @permission ohos.permission.CAMERA - * @param { CameraDevice } camera - Camera device used to create the instance. - * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding - * error code, which is of type CameraErrorCode. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createCameraInputWithCamera(camera: CameraDevice): CameraInput; - - /** - * Creates a CameraInput instance by camera position and type. - * - * @permission ohos.permission.CAMERA - * @param { CameraPosition } position - Camera position, first get the supported camera device - * objects through the getSupportedCameras interface, and then get the device position information - * based on the returned camera device objects. - * @param { CameraType } type - camera type, first get the supported camera device object through - * the getSupportedCameras interface, then get the device type information based on the returned - * camera device object. - * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns - * the corresponding error code, which is of type CameraErrorCode. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createCameraInputWithPositionType(position: CameraPosition, type: CameraType): CameraInput; - /** * Creates a PreviewOutput instance. * @@ -1179,14 +1134,15 @@ declare namespace camera { * Creates a PreviewOutput instance. * * @param { Profile } profile - Supported preview configuration information, - * obtained through the getSupportedOutputCapability API. + * obtained through the getSupportedOutputCapability API. * @param { string } surfaceId - Surface object id used in camera photo output. * @returns { PreviewOutput } The PreviewOutput instance. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput; @@ -1213,46 +1169,11 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createPreviewOutput(surfaceId: string): PreviewOutput; - /** - * @since 20 - * @arkts 1.2 - */ - overload createPreviewOutput { createPreviewOutputWithProfileSurfaceId, createPreviewOutputWithSurfaceId }; - - /** - * Creates a PreviewOutput instance. - * - * @param { Profile } profile - Supported preview configuration information, - * obtained through the getSupportedOutputCapability API. - * @param { string } surfaceId - Surface object id used in camera photo output. - * @returns { PreviewOutput } The PreviewOutput instance. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createPreviewOutputWithProfileSurfaceId(profile: Profile, surfaceId: string): PreviewOutput; - - /** - * Creates a PreviewOutput instance without profile. - * You can use this method to create a preview output instance without a profile, This instance can - * only be used in a preconfiged session. - * - * @param { string } surfaceId - Surface object id used in camera preview output. - * @returns { PreviewOutput } The PreviewOutput instance. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createPreviewOutputWithSurfaceId(surfaceId: string): PreviewOutput; - /** * Creates a PhotoOutput instance. * @@ -1338,14 +1259,15 @@ declare namespace camera { * Creates a VideoOutput instance. * * @param { VideoProfile } profile - Supported recording configuration information, - * obtained through the getSupportedOutputCapability API. + * obtained through the getSupportedOutputCapability API. * @param { string } surfaceId - Surface object id used in camera video output. * @returns { VideoOutput } The VideoOutput instance. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput; @@ -1372,46 +1294,11 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createVideoOutput(surfaceId: string): VideoOutput; - /** - * @since 20 - * @arkts 1.2 - */ - overload createVideoOutput { createVideoOutputWithProfileSurfaceId, createVideoOutputWithSurfaceId }; - - /** - * Creates a VideoOutput instance. - * - * @param { VideoProfile } profile - Supported recording configuration information, - * obtained through the getSupportedOutputCapability API. - * @param { string } surfaceId - Surface object id used in camera video output. - * @returns { VideoOutput } The VideoOutput instance. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createVideoOutputWithProfileSurfaceId(profile: VideoProfile, surfaceId: string): VideoOutput; - - /** - * Creates a VideoOutput instance without profile. - * You can use this method to create a video output instance without a profile, This instance can - * only be used in a preconfiged session. - * - * @param { string } surfaceId - Surface object id used in camera video output. - * @returns { VideoOutput } The VideoOutput instance. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - createVideoOutputWithSurfaceId(surfaceId: string): VideoOutput; - /** * Creates a MetadataOutput instance. * @@ -1569,7 +1456,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraStatus', callback: AsyncCallback): void; @@ -1588,7 +1476,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraStatus', callback?: AsyncCallback): void; @@ -1610,7 +1499,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'foldStatusChange', callback: AsyncCallback): void; @@ -1629,7 +1519,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'foldStatusChange', callback?: AsyncCallback): void; @@ -1650,7 +1541,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraMute', callback: AsyncCallback): void; @@ -1671,34 +1563,11 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraMute', callback?: AsyncCallback): void; - /** - * Subscribes control center status change event callback. - * - * @param { 'controlCenterStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the control center status change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - */ - on(type: 'controlCenterStatusChange', callback: AsyncCallback): void; - - /** - * Unsubscribes control center status change event callback. - * - * @param { 'controlCenterStatusChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the control center status change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - */ - off(type: 'controlCenterStatusChange', callback?: AsyncCallback): void; - /** * Determines whether the camera device supports prelaunch. * This function must be called in prior to the setPrelaunchConfig and prelaunch functions. @@ -1939,7 +1808,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'torchStatusChange', callback: AsyncCallback): void; @@ -1958,152 +1828,10 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'torchStatusChange', callback?: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload on { onCameraStatus, onFoldStatusChange, onCameraMute, onTorchStatusChange, - onControlCenterStatusChange }; - - /** - * Camera state callback to get the state change of the camera by registering a callback - * function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'cameraStatus' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the camera status change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - onCameraStatus(type: 'cameraStatus', callback: AsyncCallback): void; - - /** - * Registers a listener for fold state changes. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'foldStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the fold status change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - onFoldStatusChange(type: 'foldStatusChange', callback: AsyncCallback): void; - - /** - * Subscribes camera mute change event callback. - * - * @param { 'cameraMute' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the camera mute change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - onCameraMute(type: 'cameraMute', callback: AsyncCallback): void; - - /** - * Registers a listener for flashlight state changes to get flashlight state change by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'torchStatusChange' } type - Event type - * @param { AsyncCallback } callback - Callback used to return the torch status change - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - onTorchStatusChange(type: 'torchStatusChange', callback: AsyncCallback): void; - - /** - * Subscribes control center status change event callback. - * - * @param { 'controlCenterStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the control center status change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - onControlCenterStatusChange(type: 'controlCenterStatusChange', callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload off { offCameraStatus, offFoldStatusChange, offCameraMute, offTorchStatusChange, - offControlCenterStatusChange }; - - /** - * Unsubscribes from camera status change event callback. - * - * @param { 'cameraStatus' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the camera status change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - offCameraStatus(type: 'cameraStatus', callback?: AsyncCallback): void; - - /** - * Unsubscribes from fold status change event callback. - * - * @param { 'foldStatusChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the fold status change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - offFoldStatusChange(type: 'foldStatusChange', callback?: AsyncCallback): void; - - /** - * Unsubscribes from camera mute change event callback. - * - * @param { 'cameraMute' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the camera mute change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - offCameraMute(type: 'cameraMute', callback?: AsyncCallback): void; - - /** - * Unsubscribes torch status change event callback. - * - * @param { 'torchStatusChange' } type - Event type - * @param { AsyncCallback } [callback] - Callback used to return the torch status change - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - offTorchStatusChange(type: 'torchStatusChange', callback?: AsyncCallback): void; - - /** - * Unsubscribes control center status change event callback. - * - * @param { 'controlCenterStatusChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the control center status change. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - offControlCenterStatusChange(type: 'controlCenterStatusChange', callback?: AsyncCallback): void; } /** @@ -3036,7 +2764,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(callback: AsyncCallback): void; @@ -3061,7 +2790,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(): Promise; @@ -3080,95 +2810,30 @@ declare namespace camera { * Open camera. * * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, - * setting false does the opposite. Failure of an interface call returns an error code of type - * CameraErrorCode. + * setting false does the opposite. Failure of an interface call returns an error code of type CameraErrorCode. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(isSecureEnabled: boolean): Promise; /** - * Open camera with specified concurrent type. - * - * @param { CameraConcurrentType } type - Camera concurrent type. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. - * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 18 - */ - /** - * Open camera with specified concurrent type. - * - * @param { CameraConcurrentType } type - Camera concurrent type. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. - * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - open(type: CameraConcurrentType): Promise; - - /** - * @since 20 - * @arkts 1.2 - */ - overload open { openWithCallback, openReturnsPromise, openWithisSecureEnabledReturnsPromiseofBigint, - openWithCameraConcurrentTypeReturnsPromise }; - - /** - * Open camera. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. - * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - openWithCallback(callback: AsyncCallback): void; - - /** - * Open camera. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. - * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - openReturnsPromise(): Promise; - - /** - * Open camera. + * Open camera with specified concurrent type. * - * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, - * setting false does the opposite. Failure of an interface call returns an error code of type - * CameraErrorCode. - * @returns { Promise } Promise used to return the result. + * @param { CameraConcurrentType } type - Camera concurrent type. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @since 18 */ - openWithisSecureEnabledReturnsPromiseofBigint(isSecureEnabled: boolean): Promise; - /** * Open camera with specified concurrent type. * @@ -3179,10 +2844,11 @@ declare namespace camera { * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - openWithCameraConcurrentTypeReturnsPromise(type: CameraConcurrentType): Promise; + open(type: CameraConcurrentType): Promise; /** * Close camera. @@ -3199,7 +2865,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ close(callback: AsyncCallback): void; @@ -3218,38 +2885,11 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ close(): Promise; - /** - * @since 20 - * @arkts 1.2 - */ - overload close { closeWithCallback, closeReturnsPromise }; - - /** - * Close camera. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - closeWithCallback(callback: AsyncCallback): void; - - /** - * Close camera. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - closeReturnsPromise(): Promise; - /** * Delay close camera. * @@ -3286,7 +2926,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; @@ -3307,7 +2948,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void; @@ -3319,7 +2961,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraOcclusionDetection', callback: AsyncCallback): void; @@ -3331,76 +2974,11 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraOcclusionDetection', callback?: AsyncCallback): void; - /** - * @since 20 - * @arkts 1.2 - */ - overload on { onError, onCameraOcclusionDetection }; - - /** - * Registers a listener for CameraInput error events to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'error' } type - Event type. - * @param { CameraDevice } camera - Camera device. - * @param { ErrorCallback } callback - Callback used to get the camera input errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - onError(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; - - /** - * Subscribes to camera occlusion detection results. - * - * @param { 'cameraOcclusionDetection' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get detection results. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - onCameraOcclusionDetection(type: 'cameraOcclusionDetection', callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload off { offError, offCameraOcclusionDetection }; - - /** - * Unsubscribes from error events. - * - * @param { 'error' } type - Event type. - * @param { CameraDevice } camera - Camera device. - * @param { ErrorCallback } [callback] - Callback used to get the camera input errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - offError(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void; - - /** - * Unsubscribes from camera occlusion detection results. - * - * @param { 'cameraOcclusionDetection' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get detection results. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 - */ - offCameraOcclusionDetection(type: 'cameraOcclusionDetection', callback?: AsyncCallback): void; - /** * Sets the camera to be used as a camera at the specified position. * @@ -6923,7 +6501,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ commitConfig(callback: AsyncCallback): void; @@ -6944,40 +6523,11 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ commitConfig(): Promise; - /** - * @since 20 - * @arkts 1.2 - */ - overload commitConfig {commitConfigWithCallback, commitConfigReturnsPromise }; - - /** - * Commit capture session config. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - commitConfigWithCallback(callback: AsyncCallback): void; - - /** - * Commit capture session config. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - commitConfigReturnsPromise(): Promise; - /** * Determines whether the camera input can be added into the session. * This method is valid between Session.beginConfig() and Session.commitConfig(). @@ -7246,7 +6796,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; @@ -7278,42 +6829,11 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; - /** - * @since 20 - * @arkts 1.2 - */ - overload start { startWithCallback, startReturnsPromise }; - - /** - * Starts capture session. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400103 - Session not config. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - startWithCallback(callback: AsyncCallback): void; - - /** - * Starts capture session. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400103 - Session not config. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - startReturnsPromise(): Promise; - /** * Stops capture session. * @@ -7329,7 +6849,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -7348,92 +6869,30 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; - /** - * @since 20 - * @arkts 1.2 - */ - overload stop { stopWithCallback, stopReturnsPromise }; - - /** - * Stops capture session. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - stopWithCallback(callback: AsyncCallback): void; - - /** - * Stops capture session. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - stopReturnsPromise(): Promise; - - /** - * Release capture session instance. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 - */ /** * Release capture session instance. * * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - release(callback: AsyncCallback): void; - - /** - * Release capture session instance. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ - /** - * Release capture session instance. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - release(): Promise; - - /** - * @since 20 - * @arkts 1.2 - */ - overload release { releaseWithCallback, releaseReturnsPromise }; - /** * Release capture session instance. * * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - releaseWithCallback(callback: AsyncCallback): void; + release(callback: AsyncCallback): void; /** * Release capture session instance. @@ -7441,10 +6900,19 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @since 11 */ - releaseReturnsPromise(): Promise; + /** + * Release capture session instance. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + release(): Promise; /** * Set usage for the capture session. @@ -8532,7 +8000,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -8551,7 +8020,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8574,7 +8044,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8593,249 +8064,19 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; - /** - * Subscribes zoom info event callback. - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 - */ - /** - * Registers a listener for state changes in the camera's smooth zoom to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; - - /** - * Unsubscribes from zoom info event callback. - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 - */ - /** - * Unsubscribes from zoom info event callback. - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; - - /** - * Subscribes camera macro status event callback. - * - * @param { 'macroStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 11 - */ - on(type: 'macroStatusChanged', callback: AsyncCallback): void; - - /** - * Unsubscribes camera macro status event callback. - * - * @param { 'macroStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 11 - */ - off(type: 'macroStatusChanged', callback?: AsyncCallback): void; - - /** - * Subscribes to feature detection results. - * - * @param { 'featureDetection' } type - Event type. - * @param { SceneFeatureType } featureType - Feature type. - * @param { AsyncCallback } callback - Callback used to get the detection result. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; - - /** - * Unsubscribes from feature detection result. - * - * @param { 'featureDetection' } type - Event type. - * @param { SceneFeatureType } featureType - Feature type. - * @param { AsyncCallback } callback - Callback used to get the detection result. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; - - /** - * Subscribes to effect suggestion event callback. - * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - on(type: 'effectSuggestionChange', callback: AsyncCallback): void; - - /** - * Unsubscribes from effect suggestion event callback. - * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; - - /** - * Subscribes to auto device switch status event callback. - * - * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 13 - */ - /** - * Registers a listener for the camera's automatic lens switching state changes to get the result - * by registering a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; - - /** - * Unsubscribes to auto device switch status event callback. - * - * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 13 - */ - /** - * Unsubscribes to auto device switch status event callback. - * - * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; - - /** - * Subscribes to lcd flash status. - * - * @param { 'lcdFlashStatus' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the lcd flash status. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 13 - */ - on(type: 'lcdFlashStatus', callback: AsyncCallback): void; - - /** - * Unsubscribes from lcd flash status. - * - * @param { 'lcdFlashStatus' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the lcd flash status. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 13 - */ - off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; - - /** - * Subscribes to system pressure level event callback. - * - * @param { 'systemPressureLevelChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ - on(type: 'systemPressureLevelChange', callback: AsyncCallback): void; - - /** - * Unsubscribes to system pressure level event callback. - * - * @param { 'systemPressureLevelChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ - off(type: 'systemPressureLevelChange', callback?: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onMacroStatusChanged, onFeatureDetection, - onEffectSuggestionChange, onAutoDeviceSwitchStatusChange, onLcdFlashStatus, onSystemPressureLevelChange }; - - /** - * Registers a listener for error events from a normal video session to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 - */ - onError(type: 'error', callback: ErrorCallback): void; - - /** - * Registers a listener for camera focus state changes to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + /** + * Subscribes zoom info event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @since 11 */ - onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; - /** * Registers a listener for state changes in the camera's smooth zoom to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. @@ -8846,205 +8087,179 @@ declare namespace camera { * @param { 'smoothZoomInfoAvailable' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; /** - * Subscribes camera macro status event callback. + * Unsubscribes from zoom info event callback. * - * @param { 'macroStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 + * @since 11 */ - onMacroStatusChanged(type: 'macroStatusChanged', callback: AsyncCallback): void; - /** - * Subscribes to feature detection results. + * Unsubscribes from zoom info event callback. * - * @param { 'featureDetection' } type - Event type. - * @param { SceneFeatureType } featureType - Feature type. - * @param { AsyncCallback } callback - Callback used to get the detection result. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - onFeatureDetection(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; + off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; /** - * Subscribes to effect suggestion event callback. + * Subscribes camera macro status event callback. * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 20 - * @arkts 1.2 - */ - onEffectSuggestionChange(type: 'effectSuggestionChange', callback: AsyncCallback): void; - - /** - * Registers a listener for the camera's automatic lens switching state changes to get the result - * by registering a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - onAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; + on(type: 'macroStatusChanged', callback: AsyncCallback): void; /** - * Subscribes to lcd flash status. + * Unsubscribes camera macro status event callback. * - * @param { 'lcdFlashStatus' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - onLcdFlashStatus(type: 'lcdFlashStatus', callback: AsyncCallback): void; + off(type: 'macroStatusChanged', callback?: AsyncCallback): void; /** - * Subscribes to system pressure level event callback. + * Subscribes to feature detection results. * - * @param { 'systemPressureLevelChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { 'featureDetection' } type - Event type. + * @param { SceneFeatureType } featureType - Feature type. + * @param { AsyncCallback } callback - Callback used to get the detection result. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - onSystemPressureLevelChange(type: 'systemPressureLevelChange', - callback: AsyncCallback): void; - - /** - * @since 20 - * @arkts 1.2 - */ - overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offMacroStatusChanged, - offFeatureDetection, offEffectSuggestionChange, offAutoDeviceSwitchStatusChange, offLcdFlashStatus, - offSystemPressureLevelChange }; + on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; /** - * Unsubscribes from error events. + * Unsubscribes from feature detection result. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @param { 'featureDetection' } type - Event type. + * @param { SceneFeatureType } featureType - Feature type. + * @param { AsyncCallback } callback - Callback used to get the detection result. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offError(type: 'error', callback?: ErrorCallback): void; + off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; /** - * Unsubscribes from focus state change event callback. + * Subscribes to effect suggestion event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + on(type: 'effectSuggestionChange', callback: AsyncCallback): void; /** - * Unsubscribes from zoom info event callback. + * Unsubscribes from effect suggestion event callback. * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; /** - * Unsubscribes camera macro status event callback. + * Subscribes to auto device switch status event callback. * - * @param { 'macroStatusChanged' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to return the result. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 + * @since 13 */ - offMacroStatusChanged(type: 'macroStatusChanged', callback?: AsyncCallback): void; - /** - * Unsubscribes from feature detection result. + * Registers a listener for the camera's automatic lens switching state changes to get the result + * by registering a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'featureDetection' } type - Event type. - * @param { SceneFeatureType } featureType - Feature type. - * @param { AsyncCallback } [callback] - Callback used to get the detection result. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - offFeatureDetection(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; + on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; /** - * Unsubscribes from effect suggestion event callback. + * Unsubscribes to auto device switch status event callback. * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to return the result. + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.2 + * @since 13 */ - offEffectSuggestionChange(type: 'effectSuggestionChange', callback?: AsyncCallback): void; - /** * Unsubscribes to auto device switch status event callback. * * @param { 'autoDeviceSwitchStatusChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - offAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; + off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; /** - * Unsubscribes from lcd flash status. + * Subscribes to lcd flash status. * * @param { 'lcdFlashStatus' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to get the lcd flash status. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - offLcdFlashStatus(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + on(type: 'lcdFlashStatus', callback: AsyncCallback): void; /** - * Unsubscribes to system pressure level event callback. + * Unsubscribes from lcd flash status. * - * @param { 'systemPressureLevelChange' } type - Event type. - * @param { AsyncCallback } [callback] - Callback used to return the result. + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 20 - * @arkts 1.2 + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - offSystemPressureLevelChange(type: 'systemPressureLevelChange', - callback?: AsyncCallback): void; + off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; /** * Gets session functions. @@ -9838,63 +9053,6 @@ declare namespace camera { offLightStatusChange(type: 'lightStatusChange', callback?: AsyncCallback): void; } - /** - * Enumerates the system pressure levels of the current camera session. When the system pressure increases, - * you are advised to reduce the load of the current camera session. - * @enum { int } - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - enum SystemPressureLevel { - /** - * Normal level. This level indicates that the system pressure is normal. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - SYSTEM_PRESSURE_NORMAL = 0, - - /** - * Low level. This level indicates that the system pressure is slightly increased. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - SYSTEM_PRESSURE_MILD = 1, - - /** - * Severity level. This level indicates that the system pressure is severely increased. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - SYSTEM_PRESSURE_SEVERE = 2, - - /** - * Critical level. This level indicates that the system pressure has reached a critical threshold. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - SYSTEM_PRESSURE_CRITICAL = 3, - - /** - * Shutdown level. This level indicates that the system pressure is fatal, and the camera session will be - * shut down soon. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - SYSTEM_PRESSURE_SHUTDOWN = 4 - } - /** * Enum for the camera light status. * -- Gitee