From b843b51f349b66f2929e4fb875b578a8a4a1dc8a Mon Sep 17 00:00:00 2001 From: w30076694 Date: Sat, 13 Sep 2025 11:31:38 +0800 Subject: [PATCH] CameraKit Overload PR4 Signed-off-by: w30076694 --- api/@ohos.multimedia.camera.d.ts | 768 ++++++++++++++++++++++++++++--- 1 file changed, 703 insertions(+), 65 deletions(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 32a2d4b1df..2fdb626b8c 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -10596,7 +10596,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -10616,7 +10615,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -10640,7 +10638,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10660,9 +10657,52 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onFocusStateChange(callback: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offFocusStateChange(callback?: AsyncCallback): void; } /** @@ -10685,7 +10725,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -10698,7 +10737,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -10711,7 +10749,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10724,7 +10761,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10737,7 +10773,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10750,10 +10785,81 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onFocusStateChange(callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onSmoothZoomInfoAvailable(callback: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offFocusStateChange(callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offSmoothZoomInfoAvailable(callback?: AsyncCallback): void; + /** * Gets the light painting type in use. * @@ -10815,7 +10921,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -10828,7 +10933,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -10841,7 +10945,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -10854,7 +10957,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -10867,7 +10969,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10880,7 +10981,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10893,7 +10993,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10906,9 +11005,104 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes to effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } 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 22 static + */ + onEffectSuggestionChange(callback: AsyncCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onFocusStateChange(callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onSmoothZoomInfoAvailable(callback: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } 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 22 static + */ + offEffectSuggestionChange(callback?: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offFocusStateChange(callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offSmoothZoomInfoAvailable(callback?: AsyncCallback): void; } /** @@ -10931,7 +11125,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -10944,7 +11137,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -10957,7 +11149,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10970,9 +11161,56 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 dynamic - * @since 20 static */ off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onFocusStateChange(callback: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offFocusStateChange(callback?: AsyncCallback): void; } /** @@ -10995,7 +11233,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 13 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -11008,7 +11245,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 13 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -11021,7 +11257,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 13 dynamic - * @since 20 static */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -11034,9 +11269,56 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 13 dynamic - * @since 20 static */ off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onFocusStateChange(callback: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offFocusStateChange(callback?: AsyncCallback): void; } /** @@ -11107,8 +11389,8 @@ declare namespace camera { /** * Portrait Photo Conflict Functions object. * - * @interface PortraitPhotoFunctions * @extends ZoomQuery, PortraitQuery, ApertureQuery + * @interface PortraitPhotoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 13 dynamic @@ -11294,7 +11576,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -11314,7 +11595,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -11338,7 +11618,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -11358,7 +11637,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'frameEnd', callback?: AsyncCallback): void; @@ -11382,7 +11660,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -11402,7 +11679,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -11640,22 +11916,116 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 11 dynamic - * @since 20 static */ - on(type: 'sketchStatusChanged', callback: AsyncCallback): void; + on(type: 'sketchStatusChanged', callback: AsyncCallback): void; + + /** + * Unsubscribes sketch status changed event callback. + * + * @param { 'sketchStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get sketch status data. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 11 dynamic + */ + off(type: 'sketchStatusChanged', callback?: AsyncCallback): void; + + /** + * Registers a listener for the preview frame to start 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 { 'frameStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onFrameStart(callback: AsyncCallback): void; + + /** + * Registers a listener for the end of the preview frame 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 { 'frameEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onFrameEnd(callback: AsyncCallback): void; + + /** + * Registers a listener for error events on the preview output 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 preview output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes sketch status changed event callback. + * + * @param { 'sketchStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to sketch status data. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onSketchStatusChanged(callback: AsyncCallback): void; + + /** + * Unsubscribes from frame start event callback. + * + * @param { 'frameStart' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offFrameStart(callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame end event callback. + * + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offFrameEnd(callback?: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the preview output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offError(callback?: ErrorCallback): void; /** * Unsubscribes sketch status changed event callback. * * @param { 'sketchStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get sketch status data. + * @param { AsyncCallback } [callback] - Callback used to get sketch status data. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 dynamic - * @since 20 static + * @since 22 static */ - off(type: 'sketchStatusChanged', callback?: AsyncCallback): void; + offSketchStatusChanged(callback?: AsyncCallback): void; } /** @@ -12593,7 +12963,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'photoAvailable', callback: AsyncCallback): void; @@ -12613,7 +12982,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'photoAvailable', callback?: AsyncCallback): void; @@ -12626,7 +12994,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 11 dynamic - * @since 20 static */ on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; @@ -12639,7 +13006,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 11 dynamic - * @since 20 static */ off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; @@ -12671,7 +13037,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'photoAssetAvailable', callback: AsyncCallback): void; @@ -12691,7 +13056,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'photoAssetAvailable', callback?: AsyncCallback): void; @@ -12785,7 +13149,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'captureStartWithInfo', callback: AsyncCallback): void; @@ -12805,7 +13168,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'captureStartWithInfo', callback?: AsyncCallback): void; @@ -12825,7 +13187,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'frameShutter', callback: AsyncCallback): void; @@ -12845,7 +13206,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'frameShutter', callback?: AsyncCallback): void; @@ -12869,7 +13229,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'frameShutterEnd', callback: AsyncCallback): void; @@ -12889,7 +13248,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'frameShutterEnd', callback?: AsyncCallback): void; @@ -12909,12 +13267,11 @@ declare namespace camera { * within the callback method of on(). * * @param { 'captureEnd' } type - Listens to the event, fixed to 'captureEnd', when photoOutput is - * created successfully. This event can be triggered when the photoOutput is created successfully. + * created successfully. This event can be triggered when the photoOutput is created successfully. * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'captureEnd', callback: AsyncCallback): void; @@ -12934,7 +13291,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'captureEnd', callback?: AsyncCallback): void; @@ -12958,7 +13314,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'captureReady', callback: AsyncCallback): void; @@ -12978,7 +13333,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'captureReady', callback?: AsyncCallback): void; @@ -13002,7 +13356,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; @@ -13022,7 +13375,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; @@ -13046,7 +13398,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ on(type: 'error', callback: ErrorCallback): void; @@ -13066,7 +13417,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 19 dynamic - * @since 20 static */ off(type: 'error', callback?: ErrorCallback): void; @@ -13153,7 +13503,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 10 dynamic - * @since 20 static */ on(type: 'quickThumbnail', callback: AsyncCallback): void; @@ -13166,7 +13515,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 10 dynamic - * @since 20 static */ off(type: 'quickThumbnail', callback?: AsyncCallback): void; @@ -13332,7 +13680,6 @@ declare namespace camera { * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 18 dynamic - * @since 20 static */ on(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; @@ -13341,14 +13688,305 @@ declare namespace camera { * This method is valid only after enableOffline() is called. * * @param { 'offlineDeliveryFinished' } type - Event type. - * @param { AsyncCallback} callback - Callback used to get offline Delivery finished events. + * @param { AsyncCallback} [callback] - Callback used to get offline Delivery finished events. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 18 dynamic - * @since 20 static */ off(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; + + /** + * Registers a listener for full quality chart uploads 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 { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onPhotoAvailable(callback: AsyncCallback): void; + + /** + * Subscribes deferred photo proxy available event callback. + * + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onDeferredPhotoProxyAvailable(callback: AsyncCallback): void; + + /** + * Registers a listener for photoAsset uploads to monitor the upload process. 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(). + * + *

This API processes deferred photo delivery data by quickly displaying low-quality images to give + * users the impression of faster photo capture, while also generating high-quality images to maintain the + * final output quality. For details about the design specifications, see {@link + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

+ * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onPhotoAssetAvailable(callback: AsyncCallback): void; + + /** + * Registers a listener for the start of the photo taking to get the CaptureStartInfo 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 { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onCaptureStartWithInfo(callback: AsyncCallback): void; + + /** + * Subscribes frame shutter event callback. + * + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onFrameShutter(callback: AsyncCallback): void; + + /** + * Registers a listener for the end of photo exposure capture 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 { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onFrameShutterEnd(callback: AsyncCallback): void; + + /** + * Registers a listener for the end of the photo shoot 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 { 'captureEnd' } type - Listens to the event, fixed to 'captureEnd', when photoOutput is + * created successfully. This event can be triggered when the photoOutput is created successfully. + * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onCaptureEnd(callback: AsyncCallback): void; + + /** + * Registers a listener for the next available shot 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 { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onCaptureReady(callback: AsyncCallback): void; + + /** + * Registers a listener for the estimated time to take a picture 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 { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onEstimatedCaptureDuration(callback: AsyncCallback): void; + + /** + * Registers a listener for errors in the photo output 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 photo output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + onError(callback: ErrorCallback): void; + + /** + * Subscribes to camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. + * + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onQuickThumbnailWithCallbackofImagePixelMap(callback: AsyncCallback): void; + + /** + * Subscribes offline Delivery finished events. + * This method is valid only after enableOffline() is called. + * + * @param { 'offlineDeliveryFinished' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get offline Delivery finished events. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + onOfflineDeliveryFinished(callback: AsyncCallback): void; + + /** + * Unsubscribes photo available event callback. + * + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the Photo. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offPhotoAvailable(callback?: AsyncCallback): void; + + /** + * Unsubscribes deferred photo proxy available event callback. + * + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the DeferredPhotoProxy. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offDeferredPhotoProxyAvailable(callback?: AsyncCallback): void; + + /** + * Unsubscribes photo asset event callback. + * + * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offPhotoAssetAvailable(callback?: AsyncCallback): void; + + /** + * Unsubscribes from capture start event callback. + * + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the capture start info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offCaptureStartWithInfo(callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame shutter event callback. + * + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the frame shutter information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offFrameShutter(callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame shutter end event callback. + * + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the frame shutter end information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offFrameShutterEnd(callback?: AsyncCallback): void; + + /** + * Unsubscribes from capture end event callback. + * + * @param { 'captureEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the capture end information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offCaptureEnd(callback?: AsyncCallback): void; + + /** + * Unsubscribes from capture ready event callback. + * + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to notice capture ready. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offCaptureReady(callback?: AsyncCallback): void; + + /** + * Unsubscribes from estimated capture duration event callback. + * + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to notify the estimated + * capture duration (in milliseconds). + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offEstimatedCaptureDuration(callback?: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the photo output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 22 static + */ + offError(callback?: ErrorCallback): void; + + /** + * Unsubscribes from camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. + * + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the quick thumbnail. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offQuickThumbnailWithCallbackofImagePixelMap(callback?: AsyncCallback): void; + + /** + * Unsubscribes offline Delivery finished events. + * This method is valid only after enableOffline() is called. + * + * @param { 'offlineDeliveryFinished' } type - Event type. + * @param { AsyncCallback} [callback] - Callback used to get offline Delivery finished events. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offOfflineDeliveryFinished(callback?: AsyncCallback): void; } /** -- Gitee