diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 79e4f95f6b15707b6aee9e942c90f1e82695a290..ed2946b46efc5abe73cfb1b7105be3ab468ab647 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -10614,8 +10614,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -10634,8 +10633,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -10658,8 +10656,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10678,10 +10675,53 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ 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; } /** @@ -10703,8 +10743,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -10716,8 +10755,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -10729,8 +10767,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10742,8 +10779,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10755,8 +10791,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10768,11 +10803,82 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ 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. * @@ -10833,8 +10939,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -10846,8 +10951,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -10859,8 +10963,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -10872,8 +10975,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -10885,8 +10987,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10898,8 +10999,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10911,8 +11011,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10924,10 +11023,105 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ 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; } /** @@ -10949,8 +11143,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -10962,8 +11155,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -10975,8 +11167,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10988,10 +11179,57 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 dynamic */ 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; } /** @@ -11013,8 +11251,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -11026,8 +11263,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -11039,8 +11275,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 dynamic */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -11052,10 +11287,57 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 dynamic */ 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; } /** @@ -11126,8 +11408,8 @@ declare namespace camera { /** * Portrait Photo Conflict Functions object. * - * @interface PortraitPhotoFunctions * @extends ZoomQuery, PortraitQuery, ApertureQuery + * @interface PortraitPhotoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -11312,8 +11594,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -11332,8 +11613,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -11356,8 +11636,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -11376,8 +11655,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'frameEnd', callback?: AsyncCallback): void; @@ -11400,8 +11678,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -11420,8 +11697,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -11658,8 +11934,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 dynamic */ on(type: 'sketchStatusChanged', callback: AsyncCallback): void; @@ -11671,10 +11946,105 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 22 static + */ + offSketchStatusChanged(callback?: AsyncCallback): void; } /** @@ -12611,8 +12981,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'photoAvailable', callback: AsyncCallback): void; @@ -12631,8 +13000,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'photoAvailable', callback?: AsyncCallback): void; @@ -12644,8 +13012,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 dynamic */ on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; @@ -12657,8 +13024,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 dynamic */ off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; @@ -12689,8 +13055,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'photoAssetAvailable', callback: AsyncCallback): void; @@ -12709,8 +13074,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'photoAssetAvailable', callback?: AsyncCallback): void; @@ -12803,8 +13167,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'captureStartWithInfo', callback: AsyncCallback): void; @@ -12823,8 +13186,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'captureStartWithInfo', callback?: AsyncCallback): void; @@ -12842,9 +13204,8 @@ declare namespace camera { * @param { 'frameShutter' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 19 dynamic */ on(type: 'frameShutter', callback: AsyncCallback): void; @@ -12863,8 +13224,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'frameShutter', callback?: AsyncCallback): void; @@ -12887,8 +13247,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'frameShutterEnd', callback: AsyncCallback): void; @@ -12907,8 +13266,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'frameShutterEnd', callback?: AsyncCallback): void; @@ -12928,12 +13286,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 arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'captureEnd', callback: AsyncCallback): void; @@ -12952,8 +13309,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'captureEnd', callback?: AsyncCallback): void; @@ -12976,8 +13332,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'captureReady', callback: AsyncCallback): void; @@ -12996,8 +13351,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'captureReady', callback?: AsyncCallback): void; @@ -13020,8 +13374,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; @@ -13040,8 +13393,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; @@ -13064,8 +13416,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ on(type: 'error', callback: ErrorCallback): void; @@ -13084,8 +13435,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 dynamic */ off(type: 'error', callback?: ErrorCallback): void; @@ -13171,8 +13521,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 dynamic */ on(type: 'quickThumbnail', callback: AsyncCallback): void; @@ -13184,8 +13533,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 dynamic */ off(type: 'quickThumbnail', callback?: AsyncCallback): void; @@ -13350,8 +13698,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 dynamic */ on(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; @@ -13360,14 +13707,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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 dynamic */ 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; } /**