1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit CameraKit
19 */
20
21import { ErrorCallback, AsyncCallback } from './@ohos.base';
22import type Context from './application/BaseContext';
23import image from './@ohos.multimedia.image';
24import type colorSpaceManager from './@ohos.graphics.colorSpaceManager';
25import photoAccessHelper from './@ohos.file.photoAccessHelper';
26
27/**
28 * @namespace camera
29 * @syscap SystemCapability.Multimedia.Camera.Core
30 * @since 10
31 */
32/**
33 * @namespace camera
34 * @syscap SystemCapability.Multimedia.Camera.Core
35 * @atomicservice
36 * @since 12
37 */
38declare namespace camera {
39  /**
40   * Creates a CameraManager instance.
41   *
42   * @param { Context } context - Current application context.
43   * @returns { CameraManager } CameraManager instance.
44   * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
45   * @throws { BusinessError } 7400201 - Camera service fatal error.
46   * @syscap SystemCapability.Multimedia.Camera.Core
47   * @since 10
48   */
49  function getCameraManager(context: Context): CameraManager;
50
51  /**
52   * Enum for camera status.
53   *
54   * @enum { number }
55   * @syscap SystemCapability.Multimedia.Camera.Core
56   * @since 10
57   */
58  enum CameraStatus {
59    /**
60     * Appear status.
61     *
62     * @syscap SystemCapability.Multimedia.Camera.Core
63     * @since 10
64     */
65    CAMERA_STATUS_APPEAR = 0,
66
67    /**
68     * Disappear status.
69     *
70     * @syscap SystemCapability.Multimedia.Camera.Core
71     * @since 10
72     */
73    CAMERA_STATUS_DISAPPEAR = 1,
74
75    /**
76     * Available status.
77     *
78     * @syscap SystemCapability.Multimedia.Camera.Core
79     * @since 10
80     */
81    CAMERA_STATUS_AVAILABLE = 2,
82
83    /**
84     * Unavailable status.
85     *
86     * @syscap SystemCapability.Multimedia.Camera.Core
87     * @since 10
88     */
89    CAMERA_STATUS_UNAVAILABLE = 3
90  }
91
92  /**
93   * Enum for fold status.
94   *
95   * @enum { number }
96   * @syscap SystemCapability.Multimedia.Camera.Core
97   * @since 12
98   */
99  enum FoldStatus {
100    /**
101     * Non-foldable status.
102     *
103     * @syscap SystemCapability.Multimedia.Camera.Core
104     * @since 12
105     */
106    NON_FOLDABLE = 0,
107
108    /**
109     * Expanded status.
110     *
111     * @syscap SystemCapability.Multimedia.Camera.Core
112     * @since 12
113     */
114    EXPANDED = 1,
115
116    /**
117     * Folded status.
118     *
119     * @syscap SystemCapability.Multimedia.Camera.Core
120     * @since 12
121     */
122    FOLDED = 2
123  }
124
125  /**
126   * Profile for camera streams.
127   *
128   * @typedef Profile
129   * @syscap SystemCapability.Multimedia.Camera.Core
130   * @since 10
131   */
132  interface Profile {
133    /**
134     * Camera format.
135     *
136     * @type { CameraFormat }
137     * @readonly
138     * @syscap SystemCapability.Multimedia.Camera.Core
139     * @since 10
140     */
141    readonly format: CameraFormat;
142
143    /**
144     * Picture size.
145     *
146     * @type { Size }
147     * @readonly
148     * @syscap SystemCapability.Multimedia.Camera.Core
149     * @since 10
150     */
151    readonly size: Size;
152  }
153
154  /**
155   * Frame rate range.
156   *
157   * @typedef FrameRateRange
158   * @syscap SystemCapability.Multimedia.Camera.Core
159   * @since 10
160   */
161  interface FrameRateRange {
162    /**
163     * Min frame rate.
164     *
165     * @type { number }
166     * @readonly
167     * @syscap SystemCapability.Multimedia.Camera.Core
168     * @since 10
169     */
170    readonly min: number;
171
172    /**
173     * Max frame rate.
174     *
175     * @type { number }
176     * @readonly
177     * @syscap SystemCapability.Multimedia.Camera.Core
178     * @since 10
179     */
180    readonly max: number;
181  }
182
183  /**
184   * Video profile.
185   *
186   * @typedef VideoProfile
187   * @syscap SystemCapability.Multimedia.Camera.Core
188   * @since 10
189   */
190  interface VideoProfile extends Profile {
191    /**
192     * Frame rate in unit fps (frames per second).
193     *
194     * @type { FrameRateRange }
195     * @readonly
196     * @syscap SystemCapability.Multimedia.Camera.Core
197     * @since 10
198     */
199    readonly frameRateRange: FrameRateRange;
200  }
201
202  /**
203   * Camera output capability.
204   *
205   * @typedef CameraOutputCapability
206   * @syscap SystemCapability.Multimedia.Camera.Core
207   * @since 10
208   */
209  interface CameraOutputCapability {
210    /**
211     * Preview profiles.
212     *
213     * @type { Array<Profile> }
214     * @readonly
215     * @syscap SystemCapability.Multimedia.Camera.Core
216     * @since 10
217     */
218    readonly previewProfiles: Array<Profile>;
219
220    /**
221     * Photo profiles.
222     *
223     * @type { Array<Profile> }
224     * @readonly
225     * @syscap SystemCapability.Multimedia.Camera.Core
226     * @since 10
227     */
228    readonly photoProfiles: Array<Profile>;
229
230    /**
231     * Video profiles.
232     *
233     * @type { Array<VideoProfile> }
234     * @readonly
235     * @syscap SystemCapability.Multimedia.Camera.Core
236     * @since 10
237     */
238    readonly videoProfiles: Array<VideoProfile>;
239
240    /**
241     * All the supported metadata Object Types.
242     *
243     * @type { Array<MetadataObjectType> }
244     * @readonly
245     * @syscap SystemCapability.Multimedia.Camera.Core
246     * @since 10
247     */
248    readonly supportedMetadataObjectTypes: Array<MetadataObjectType>;
249  }
250
251  /**
252   * Enum for camera error code.
253   *
254   * @enum { number }
255   * @syscap SystemCapability.Multimedia.Camera.Core
256   * @since 10
257   */
258  enum CameraErrorCode {
259    /**
260     * Parameter missing or parameter type incorrect.
261     *
262     * @syscap SystemCapability.Multimedia.Camera.Core
263     * @since 10
264     */
265    INVALID_ARGUMENT = 7400101,
266
267    /**
268     * Operation not allowed.
269     *
270     * @syscap SystemCapability.Multimedia.Camera.Core
271     * @since 10
272     */
273    OPERATION_NOT_ALLOWED = 7400102,
274
275    /**
276     * Session not config.
277     *
278     * @syscap SystemCapability.Multimedia.Camera.Core
279     * @since 10
280     */
281    SESSION_NOT_CONFIG = 7400103,
282
283    /**
284     * Session not running.
285     *
286     * @syscap SystemCapability.Multimedia.Camera.Core
287     * @since 10
288     */
289    SESSION_NOT_RUNNING = 7400104,
290
291    /**
292     * Session config locked.
293     *
294     * @syscap SystemCapability.Multimedia.Camera.Core
295     * @since 10
296     */
297    SESSION_CONFIG_LOCKED = 7400105,
298
299    /**
300     * Device setting locked.
301     *
302     * @syscap SystemCapability.Multimedia.Camera.Core
303     * @since 10
304     */
305    DEVICE_SETTING_LOCKED = 7400106,
306
307    /**
308     * Can not use camera cause of conflict.
309     *
310     * @syscap SystemCapability.Multimedia.Camera.Core
311     * @since 10
312     */
313    CONFLICT_CAMERA = 7400107,
314
315    /**
316     * Camera disabled cause of security reason.
317     *
318     * @syscap SystemCapability.Multimedia.Camera.Core
319     * @since 10
320     */
321    DEVICE_DISABLED = 7400108,
322
323    /**
324     * Can not use camera cause of preempted.
325     *
326     * @syscap SystemCapability.Multimedia.Camera.Core
327     * @since 10
328     */
329    DEVICE_PREEMPTED = 7400109,
330
331    /**
332     * Unresolved conflicts with current configurations.
333     *
334     * @syscap SystemCapability.Multimedia.Camera.Core
335     * @since 12
336     */
337    UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110,
338
339    /**
340     * Camera service fatal error.
341     *
342     * @syscap SystemCapability.Multimedia.Camera.Core
343     * @since 10
344     */
345    SERVICE_FATAL_ERROR = 7400201
346  }
347
348  /**
349   * Enum for restore parameter.
350   *
351   * @enum { number }
352   * @syscap SystemCapability.Multimedia.Camera.Core
353   * @systemapi
354   * @since 11
355   */
356  enum RestoreParamType {
357    /**
358     * No need set restore Stream Parameter, only prelaunch camera device.
359     *
360     * @syscap SystemCapability.Multimedia.Camera.Core
361     * @systemapi
362     * @since 11
363     */
364    NO_NEED_RESTORE_PARAM = 0,
365
366    /**
367     * Presistent default parameter, long-lasting effect after T minutes.
368     *
369     * @syscap SystemCapability.Multimedia.Camera.Core
370     * @systemapi
371     * @since 11
372     */
373    PRESISTENT_DEFAULT_PARAM = 1,
374
375    /**
376     * Transient active parameter, which has a higher priority than PRESISTENT_DEFAULT_PARAM when both exist.
377     *
378     * @syscap SystemCapability.Multimedia.Camera.Core
379     * @systemapi
380     * @since 11
381     */
382    TRANSIENT_ACTIVE_PARAM = 2
383  }
384
385  /**
386   * Setting parameter for stream.
387   *
388   * @typedef SettingParam
389   * @syscap SystemCapability.Multimedia.Camera.Core
390   * @systemapi
391   * @since 11
392   */
393  interface SettingParam {
394    /**
395     * Skin smooth level value for restore.
396     *
397     * @type { number }
398     * @syscap SystemCapability.Multimedia.Camera.Core
399     * @systemapi
400     * @since 11
401     */
402    skinSmoothLevel: number;
403
404    /**
405     * Face slender value for restore.
406     *
407     * @type { number }
408     * @syscap SystemCapability.Multimedia.Camera.Core
409     * @systemapi
410     * @since 11
411     */
412    faceSlender: number;
413
414    /**
415     * Skin tone value for restore.
416     *
417     * @type { number }
418     * @syscap SystemCapability.Multimedia.Camera.Core
419     * @systemapi
420     * @since 11
421     */
422    skinTone: number;
423  }
424
425  /**
426   * Prelaunch config object.
427   *
428   * @typedef PrelaunchConfig
429   * @syscap SystemCapability.Multimedia.Camera.Core
430   * @systemapi
431   * @since 10
432   */
433  interface PrelaunchConfig {
434    /**
435     * Camera instance.
436     *
437     * @type { CameraDevice }
438     * @syscap SystemCapability.Multimedia.Camera.Core
439     * @systemapi
440     * @since 10
441     */
442    cameraDevice: CameraDevice;
443
444    /**
445     * Restore parameter type.
446     *
447     * @type { ?RestoreParamType }
448     * @syscap SystemCapability.Multimedia.Camera.Core
449     * @systemapi
450     * @since 11
451     */
452    restoreParamType?: RestoreParamType;
453
454    /**
455     * Begin active time.
456     *
457     * @type { ?number }
458     * @syscap SystemCapability.Multimedia.Camera.Core
459     * @systemapi
460     * @since 11
461     */
462    activeTime?: number;
463
464    /**
465     * Setting parameter.
466     *
467     * @type { ?SettingParam }
468     * @syscap SystemCapability.Multimedia.Camera.Core
469     * @systemapi
470     * @since 11
471     */
472    settingParam?: SettingParam;
473  }
474
475  /**
476   * Camera manager object.
477   *
478   * @interface CameraManager
479   * @syscap SystemCapability.Multimedia.Camera.Core
480   * @since 10
481   */
482  interface CameraManager {
483    /**
484     * Gets supported camera descriptions.
485     *
486     * @returns { Array<CameraDevice> } An array of supported cameras.
487     * @syscap SystemCapability.Multimedia.Camera.Core
488     * @since 10
489     */
490    getSupportedCameras(): Array<CameraDevice>;
491
492    /**
493     * Gets supported output capability for specific camera.
494     *
495     * @param { CameraDevice } camera - Camera device.
496     * @returns { CameraOutputCapability } The camera output capability.
497     * @syscap SystemCapability.Multimedia.Camera.Core
498     * @since 10
499     * @deprecated since 11
500     * @useinstead ohos.multimedia.camera.CameraManager#getSupportedOutputCapability
501     */
502    getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability;
503
504    /**
505     * Gets supported scene mode for specific camera.
506     *
507     * @param { CameraDevice } camera - Camera device.
508     * @returns { Array<SceneMode> } An array of supported scene mode of camera.
509     * @syscap SystemCapability.Multimedia.Camera.Core
510     * @since 11
511     */
512    getSupportedSceneModes(camera: CameraDevice): Array<SceneMode>;
513
514    /**
515     * Gets supported output capability for specific camera.
516     *
517     * @param { CameraDevice } camera - Camera device.
518     * @param { SceneMode } mode - Scene mode.
519     * @returns { CameraOutputCapability } The camera output capability.
520     * @syscap SystemCapability.Multimedia.Camera.Core
521     * @since 11
522     */
523    getSupportedOutputCapability(camera: CameraDevice, mode: SceneMode): CameraOutputCapability;
524
525    /**
526     * Determine whether camera is muted.
527     *
528     * @returns { boolean } Is camera muted.
529     * @syscap SystemCapability.Multimedia.Camera.Core
530     * @since 10
531     */
532    isCameraMuted(): boolean;
533
534    /**
535     * Determine whether camera mute is supported.
536     *
537     * @returns { boolean } Is camera mute supported.
538     * @syscap SystemCapability.Multimedia.Camera.Core
539     * @systemapi
540     * @since 10
541     */
542    /**
543     * Determine whether camera mute is supported.
544     *
545     * @returns { boolean } Is camera mute supported.
546     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
547     * @syscap SystemCapability.Multimedia.Camera.Core
548     * @systemapi
549     * @since 12
550     */
551    isCameraMuteSupported(): boolean;
552
553    /**
554     * Mute camera.
555     *
556     * @param { boolean } mute - Mute camera if TRUE, otherwise unmute camera.
557     * @syscap SystemCapability.Multimedia.Camera.Core
558     * @systemapi
559     * @since 10
560     * @deprecated since 12
561     * @useinstead ohos.multimedia.camera.CameraManager#muteCameraPersistent
562     */
563    muteCamera(mute: boolean): void;
564
565    /**
566     * Mutes or unmutes camera for persistence purpose.
567     *
568     * @permission ohos.camera.CAMERA_CONTROL
569     * @param { boolean } mute - Mute camera if TRUE, otherwise unmute camera.
570     * @param { PolicyType } type - Type for indicating the calling role.
571     * @throws { BusinessError } 201 - Permission denied. 
572     * @throws { BusinessError } 202 - Not System Application.
573     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. 
574     * @syscap SystemCapability.Multimedia.Camera.Core
575     * @systemapi
576     * @since 12
577     */
578    muteCameraPersistent(mute: boolean, type: PolicyType): void;
579
580    /**
581     * Creates a CameraInput instance by camera.
582     *
583     * @permission ohos.permission.CAMERA
584     * @param { CameraDevice } camera - Camera device used to create the instance.
585     * @returns { CameraInput } The CameraInput instance.
586     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
587     * @syscap SystemCapability.Multimedia.Camera.Core
588     * @since 10
589     */
590    /**
591     * Creates a CameraInput instance by camera.
592     *
593     * @permission ohos.permission.CAMERA
594     * @param { CameraDevice } camera - Camera device used to create the instance.
595     * @returns { CameraInput } The CameraInput instance.
596     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
597     * @throws { BusinessError } 7400102 - Operation not allowed.
598     * @throws { BusinessError } 7400201 - Camera service fatal error.
599     * @syscap SystemCapability.Multimedia.Camera.Core
600     * @since 12
601     */
602    createCameraInput(camera: CameraDevice): CameraInput;
603
604    /**
605     * Creates a CameraInput instance by camera position and type.
606     *
607     * @permission ohos.permission.CAMERA
608     * @param { CameraPosition } position - Target camera position.
609     * @param { CameraType } type - Target camera type.
610     * @returns { CameraInput } The CameraInput instance.
611     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
612     * @syscap SystemCapability.Multimedia.Camera.Core
613     * @since 10
614     */
615    /**
616     * Creates a CameraInput instance by camera position and type.
617     *
618     * @permission ohos.permission.CAMERA
619     * @param { CameraPosition } position - Target camera position.
620     * @param { CameraType } type - Target camera type.
621     * @returns { CameraInput } The CameraInput instance.
622     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
623     * @throws { BusinessError } 7400102 - Operation not allowed.
624     * @throws { BusinessError } 7400201 - Camera service fatal error.
625     * @syscap SystemCapability.Multimedia.Camera.Core
626     * @since 12
627     */
628    createCameraInput(position: CameraPosition, type: CameraType): CameraInput;
629
630    /**
631     * Creates a PreviewOutput instance.
632     *
633     * @param { Profile } profile - Preview output profile.
634     * @param { string } surfaceId - Surface object id used in camera photo output.
635     * @returns { PreviewOutput } The PreviewOutput instance.
636     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
637     * @syscap SystemCapability.Multimedia.Camera.Core
638     * @since 10
639     */
640    /**
641     * Creates a PreviewOutput instance.
642     *
643     * @param { Profile } profile - Preview output profile.
644     * @param { string } surfaceId - Surface object id used in camera photo output.
645     * @returns { PreviewOutput } The PreviewOutput instance.
646     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
647     * @throws { BusinessError } 7400201 - Camera service fatal error.
648     * @syscap SystemCapability.Multimedia.Camera.Core
649     * @since 12
650     */
651    createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput;
652
653    /**
654     * Creates a PreviewOutput instance without profile.
655     * You can use this method to create a preview output instance without a profile, This instance can
656     * only be used in a preconfiged session.
657     *
658     * @param { string } surfaceId - Surface object id used in camera preview output.
659     * @returns { PreviewOutput } The PreviewOutput instance.
660     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
661     * @throws { BusinessError } 7400201 - Camera service fatal error.
662     * @syscap SystemCapability.Multimedia.Camera.Core
663     * @since 12
664     */
665    createPreviewOutput(surfaceId: string): PreviewOutput;
666
667    /**
668     * Creates a PhotoOutput instance.
669     *
670     * @param { Profile } profile - Photo output profile.
671     * @param { string } surfaceId - Surface object id used in camera photo output.
672     * @returns { PhotoOutput } The PhotoOutput instance.
673     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
674     * @syscap SystemCapability.Multimedia.Camera.Core
675     * @since 10
676     * @deprecated since 11
677     * @useinstead ohos.multimedia.camera.CameraManager#createPhotoOutput
678     */
679    createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput;
680
681    /**
682     * Creates a PhotoOutput instance without surfaceId.
683     * Call PhotoOutput capture interface will give a callback,
684     * {@link on(type: 'photoAvailable', callback: AsyncCallback<Photo>)}
685     *
686     * @param { Profile } profile - Photo output profile.
687     * @returns { PhotoOutput } The PhotoOutput instance.
688     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
689     * @syscap SystemCapability.Multimedia.Camera.Core
690     * @since 11
691     */
692    /**
693     * Creates a PhotoOutput instance without surfaceId.
694     * Call PhotoOutput capture interface will give a callback,
695     * {@link on(type: 'photoAvailable', callback: AsyncCallback<Photo>)}
696     * You can use this method to create a photo output instance without a profile, This instance can
697     * only be used in a preconfiged session.
698     *
699     * @param { Profile } profile - Photo output profile.
700     * @returns { PhotoOutput } The PhotoOutput instance.
701     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
702     * @throws { BusinessError } 7400201 - Camera service fatal error.
703     * @syscap SystemCapability.Multimedia.Camera.Core
704     * @since 12
705     */
706    createPhotoOutput(profile?: Profile): PhotoOutput;
707
708    /**
709     * Creates a VideoOutput instance.
710     *
711     * @param { VideoProfile } profile - Video profile.
712     * @param { string } surfaceId - Surface object id used in camera video output.
713     * @returns { VideoOutput } The VideoOutput instance.
714     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
715     * @syscap SystemCapability.Multimedia.Camera.Core
716     * @since 10
717     */
718    /**
719     * Creates a VideoOutput instance.
720     *
721     * @param { VideoProfile } profile - Video profile.
722     * @param { string } surfaceId - Surface object id used in camera video output.
723     * @returns { VideoOutput } The VideoOutput instance.
724     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
725     * @throws { BusinessError } 7400201 - Camera service fatal error.
726     * @syscap SystemCapability.Multimedia.Camera.Core
727     * @since 12
728     */
729    createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput;
730
731    /**
732     * Creates a VideoOutput instance without profile.
733     * You can use this method to create a video output instance without a profile, This instance can
734     * only be used in a preconfiged session.
735     *
736     * @param { string } surfaceId - Surface object id used in camera video output.
737     * @returns { VideoOutput } The VideoOutput instance.
738     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
739     * @throws { BusinessError } 7400201 - Camera service fatal error.
740     * @syscap SystemCapability.Multimedia.Camera.Core
741     * @since 12
742     */
743    createVideoOutput(surfaceId: string): VideoOutput;
744
745    /**
746     * Creates a MetadataOutput instance.
747     *
748     * @param { Array<MetadataObjectType> } metadataObjectTypes - Array of MetadataObjectType.
749     * @returns { MetadataOutput } The MetadataOutput instance.
750     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
751     * @syscap SystemCapability.Multimedia.Camera.Core
752     * @since 10
753     */
754    /**
755     * Creates a MetadataOutput instance.
756     *
757     * @param { Array<MetadataObjectType> } metadataObjectTypes - Array of MetadataObjectType.
758     * @returns { MetadataOutput } The MetadataOutput instance.
759     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
760     * @throws { BusinessError } 7400201 - Camera service fatal error.
761     * @syscap SystemCapability.Multimedia.Camera.Core
762     * @since 12
763     */
764    createMetadataOutput(metadataObjectTypes: Array<MetadataObjectType>): MetadataOutput;
765
766    /**
767     * Gets a CaptureSession instance.
768     *
769     * @returns { CaptureSession } The CaptureSession instance.
770     * @throws { BusinessError } 7400201 - Camera service fatal error.
771     * @syscap SystemCapability.Multimedia.Camera.Core
772     * @since 10
773     * @deprecated since 11
774     * @useinstead ohos.multimedia.camera.CameraManager#createSession
775     */
776    createCaptureSession(): CaptureSession;
777
778    /**
779     * Gets a Session instance by specific scene mode.
780     *
781     * @param { SceneMode } mode - Scene mode.
782     * @returns { T } The specific Session instance by specific scene mode.
783     * @throws { BusinessError } 7400201 - Camera service fatal error.
784     * @syscap SystemCapability.Multimedia.Camera.Core
785     * @since 11
786     */
787    createSession<T extends Session>(mode: SceneMode): T;
788
789    /**
790     * Subscribes camera status change event callback.
791     *
792     * @param { 'cameraStatus' } type - Event type.
793     * @param { AsyncCallback<CameraStatusInfo> } callback - Callback used to get the camera status change.
794     * @syscap SystemCapability.Multimedia.Camera.Core
795     * @since 10
796     */
797    on(type: 'cameraStatus', callback: AsyncCallback<CameraStatusInfo>): void;
798
799    /**
800     * Unsubscribes from camera status change event callback.
801     *
802     * @param { 'cameraStatus' } type - Event type.
803     * @param { AsyncCallback<CameraStatusInfo> } callback - Callback used to get the camera status change.
804     * @syscap SystemCapability.Multimedia.Camera.Core
805     * @since 10
806     */
807    off(type: 'cameraStatus', callback?: AsyncCallback<CameraStatusInfo>): void;
808
809    /**
810     * Subscribes fold status change event callback.
811     *
812     * @param { 'foldStatusChanged' } type - Event type.
813     * @param { AsyncCallback<FoldStatusInfo> } callback - Callback used to get the fold status change.
814     * @syscap SystemCapability.Multimedia.Camera.Core
815     * @since 12
816     */
817    on(type: 'foldStatusChange', callback: AsyncCallback<FoldStatusInfo>): void;
818
819    /**
820     * Unsubscribes from fold status change event callback.
821     *
822     * @param { 'foldStatusChanged' } type - Event type.
823     * @param { AsyncCallback<FoldStatusInfo> } callback - Callback used to get the fold status change.
824     * @syscap SystemCapability.Multimedia.Camera.Core
825     * @since 12
826     */
827    off(type: 'foldStatusChange', callback?: AsyncCallback<FoldStatusInfo>): void;
828
829    /**
830     * Subscribes camera mute change event callback.
831     *
832     * @param { 'cameraMute' } type - Event type.
833     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
834     * @syscap SystemCapability.Multimedia.Camera.Core
835     * @systemapi
836     * @since 10
837     */
838    /**
839     * Subscribes camera mute change event callback.
840     *
841     * @param { 'cameraMute' } type - Event type.
842     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
843     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
844     * @syscap SystemCapability.Multimedia.Camera.Core
845     * @systemapi
846     * @since 12
847     */
848    on(type: 'cameraMute', callback: AsyncCallback<boolean>): void;
849
850    /**
851     * Unsubscribes from camera mute change event callback.
852     *
853     * @param { 'cameraMute' } type - Event type.
854     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
855     * @syscap SystemCapability.Multimedia.Camera.Core
856     * @systemapi
857     * @since 10
858     */
859    /**
860     * Unsubscribes from camera mute change event callback.
861     *
862     * @param { 'cameraMute' } type - Event type.
863     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
864     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
865     * @syscap SystemCapability.Multimedia.Camera.Core
866     * @systemapi
867     * @since 12
868     */
869    off(type: 'cameraMute', callback?: AsyncCallback<boolean>): void;
870
871    /**
872     * Determines whether the camera device supports prelaunch.
873     * This function must be called in prior to the setPrelaunchConfig and prelaunch functions.
874     *
875     * @param { CameraDevice } camera - Camera device.
876     * @returns { boolean } Whether prelaunch is supported.
877     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
878     * @syscap SystemCapability.Multimedia.Camera.Core
879     * @systemapi
880     * @since 10
881     */
882    /**
883     * Determines whether the camera device supports prelaunch.
884     * This function must be called in prior to the setPrelaunchConfig and prelaunch functions.
885     *
886     * @param { CameraDevice } camera - Camera device.
887     * @returns { boolean } Whether prelaunch is supported.
888     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
889     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
890     * @syscap SystemCapability.Multimedia.Camera.Core
891     * @systemapi
892     * @since 12
893     */
894    isPrelaunchSupported(camera: CameraDevice): boolean;
895
896    /**
897     * Sets the camera prelaunch configuration.
898     * The configuration is sent to the camera service when you exit the camera or change the configuration next time.
899     *
900     * @permission ohos.permission.CAMERA
901     * @param { PrelaunchConfig } prelaunchConfig - Prelaunch configuration info.
902     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
903     * @throws { BusinessError } 7400102 - Operation not allowed.
904     * @syscap SystemCapability.Multimedia.Camera.Core
905     * @systemapi
906     * @since 10
907     */
908    /**
909     * Sets the camera prelaunch configuration.
910     * The configuration is sent to the camera service when you exit the camera or change the configuration next time.
911     *
912     * @permission ohos.permission.CAMERA
913     * @param { PrelaunchConfig } prelaunchConfig - Prelaunch configuration info.
914     * @throws { BusinessError } 202 - Not System Application.
915     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
916     * @throws { BusinessError } 7400102 - Operation not allowed.
917     * @throws { BusinessError } 7400201 - Camera service fatal error.
918     * @syscap SystemCapability.Multimedia.Camera.Core
919     * @systemapi
920     * @since 12
921     */
922    setPrelaunchConfig(prelaunchConfig: PrelaunchConfig): void;
923
924    /**
925     * Enable the camera to prelaunch and start.
926     * This function is called when the user clicks the system camera icon to start the camera application.
927     *
928     * @syscap SystemCapability.Multimedia.Camera.Core
929     * @systemapi
930     * @since 10
931     */
932    /**
933     * Enable the camera to prelaunch and start.
934     * This function is called when the user clicks the system camera icon to start the camera application.
935     *
936     * @throws { BusinessError } 202 - Not System Application.
937     * @syscap SystemCapability.Multimedia.Camera.Core
938     * @systemapi
939     * @since 12
940     */
941    prelaunch(): void;
942
943    /**
944     * Prepare the camera resources.
945     * This function is called when the user touch down the camera switch icon in camera application.
946     *
947     * @param { string } cameraId - The camera to prepare.
948     * @throws { BusinessError } 202 - Not System Application.
949     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
950     * @syscap SystemCapability.Multimedia.Camera.Core
951     * @systemapi
952     * @since 11
953     */
954    /**
955     * Prepare the camera resources.
956     * This function is called when the user touch down the camera switch icon in camera application.
957     *
958     * @param { string } cameraId - The camera to prepare.
959     * @throws { BusinessError } 202 - Not System Application.
960     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
961     * @throws { BusinessError } 7400201 - Camera service fatal error.
962     * @syscap SystemCapability.Multimedia.Camera.Core
963     * @systemapi
964     * @since 12
965     */
966    preSwitchCamera(cameraId: string): void;
967
968    /**
969     * Creates a deferred PreviewOutput instance.
970     *
971     * @param { Profile } profile - Preview output profile.
972     * @returns { PreviewOutput } the PreviewOutput instance.
973     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
974     * @syscap SystemCapability.Multimedia.Camera.Core
975     * @systemapi
976     * @since 10
977     */
978    /**
979     * Creates a deferred PreviewOutput instance.
980     * You can use the method to create deferred preview output without profile, then you must add this output
981     * to a session which already preconfiged.
982     *
983     * @param { Profile } profile - Preview output profile.
984     * @returns { PreviewOutput } the PreviewOutput instance.
985     * @throws { BusinessError } 202 - Not System Application.
986     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
987     * @syscap SystemCapability.Multimedia.Camera.Core
988     * @systemapi
989     * @since 12
990     */
991    createDeferredPreviewOutput(profile?: Profile): PreviewOutput;
992
993    /**
994     * Check if the device has a torch.
995     *
996     * @returns { boolean } this value that specifies whether the device has a torch.
997     * @syscap SystemCapability.Multimedia.Camera.Core
998     * @since 11
999     */
1000    isTorchSupported(): boolean;
1001
1002    /**
1003     * Check if a specifies torch mode is supported.
1004     * @param { TorchMode } mode - torch mode.
1005     * @returns { boolean } is torch mode supported.
1006     * @syscap SystemCapability.Multimedia.Camera.Core
1007     * @since 11
1008     */
1009    isTorchModeSupported(mode: TorchMode): boolean;
1010
1011    /**
1012     * Get current torch mode.
1013     *
1014     * @returns { TorchMode } torch mode.
1015     * @syscap SystemCapability.Multimedia.Camera.Core
1016     * @since 11
1017     */
1018    getTorchMode(): TorchMode;
1019
1020    /**
1021     * Set torch mode to the device.
1022     *
1023     * @param { TorchMode } mode - torch mode.
1024     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1025     * @syscap SystemCapability.Multimedia.Camera.Core
1026     * @since 11
1027     */
1028    /**
1029     * Set torch mode to the device.
1030     *
1031     * @param { TorchMode } mode - torch mode.
1032     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1033     * @throws { BusinessError } 7400102 - Operation not allowed.
1034     * @throws { BusinessError } 7400201 - Camera service fatal error.
1035     * @syscap SystemCapability.Multimedia.Camera.Core
1036     * @since 12
1037     */
1038    setTorchMode(mode: TorchMode): void;
1039
1040    /**
1041     * Subscribes torch status change event callback.
1042     *
1043     * @param { 'torchStatusChange' } type - Event type
1044     * @param { AsyncCallback<TorchStatusInfo> } callback - Callback used to return the torch status change
1045     * @syscap SystemCapability.Multimedia.Camera.Core
1046     * @since 11
1047     */
1048    on(type: 'torchStatusChange', callback: AsyncCallback<TorchStatusInfo>): void;
1049
1050    /**
1051     * Unsubscribes torch status change event callback.
1052     *
1053     * @param { 'torchStatusChange' } type - Event type
1054     * @param { AsyncCallback<TorchStatusInfo> } callback - Callback used to return the torch status change
1055     * @syscap SystemCapability.Multimedia.Camera.Core
1056     * @since 11
1057     */
1058    off(type: 'torchStatusChange', callback?: AsyncCallback<TorchStatusInfo>): void;
1059  }
1060
1061  /**
1062   * Torch status info.
1063   *
1064   * @typedef TorchStatusInfo
1065   * @syscap SystemCapability.Multimedia.Camera.Core
1066   * @since 11
1067   */
1068  interface TorchStatusInfo {
1069    /**
1070     * is torch available
1071     *
1072     * @type { boolean }
1073     * @readonly
1074     * @syscap SystemCapability.Multimedia.Camera.Core
1075     * @since 11
1076     */
1077    readonly isTorchAvailable: boolean;
1078
1079    /**
1080     * is torch active
1081     *
1082     * @type { boolean }
1083     * @readonly
1084     * @syscap SystemCapability.Multimedia.Camera.Core
1085     * @since 11
1086     */
1087    readonly isTorchActive: boolean;
1088
1089    /**
1090     * the current torch brightness level.
1091     *
1092     * @type { number }
1093     * @readonly
1094     * @syscap SystemCapability.Multimedia.Camera.Core
1095     * @since 11
1096     */
1097    readonly torchLevel: number;
1098  }
1099
1100  /**
1101   * Enum for torch mode.
1102   *
1103   * @enum { number }
1104   * @syscap SystemCapability.Multimedia.Camera.Core
1105   * @since 11
1106   */
1107  enum TorchMode {
1108    /**
1109     * The device torch is always off.
1110     *
1111     * @syscap SystemCapability.Multimedia.Camera.Core
1112     * @since 11
1113     */
1114    OFF = 0,
1115
1116    /**
1117     * The device torch is always on.
1118     *
1119     * @syscap SystemCapability.Multimedia.Camera.Core
1120     * @since 11
1121     */
1122    ON = 1,
1123
1124    /**
1125     * The device continuously monitors light levels and uses the torch when necessary.
1126     *
1127     * @syscap SystemCapability.Multimedia.Camera.Core
1128     * @since 11
1129     */
1130    AUTO = 2
1131  }
1132
1133  /**
1134   * Camera status info.
1135   *
1136   * @typedef CameraStatusInfo
1137   * @syscap SystemCapability.Multimedia.Camera.Core
1138   * @since 10
1139   */
1140  interface CameraStatusInfo {
1141    /**
1142     * Camera instance.
1143     *
1144     * @type { CameraDevice }
1145     * @syscap SystemCapability.Multimedia.Camera.Core
1146     * @since 10
1147     */
1148    camera: CameraDevice;
1149
1150    /**
1151     * Current camera status.
1152     *
1153     * @type { CameraStatus }
1154     * @syscap SystemCapability.Multimedia.Camera.Core
1155     * @since 10
1156     */
1157    status: CameraStatus;
1158  }
1159
1160  /**
1161   * Fold status info.
1162   *
1163   * @typedef FoldStatusInfo
1164   * @syscap SystemCapability.Multimedia.Camera.Core
1165   * @since 12
1166   */
1167  interface FoldStatusInfo {
1168    /**
1169     * Gets supported camera devices under the current fold status.
1170     *
1171     * @type { Array<CameraDevice> }
1172     * @readonly
1173     * @syscap SystemCapability.Multimedia.Camera.Core
1174     * @since 12
1175     */
1176    readonly supportedCameras: Array<CameraDevice>;
1177
1178    /**
1179     * Current fold status.
1180     *
1181     * @type { FoldStatus }
1182     * @readonly
1183     * @syscap SystemCapability.Multimedia.Camera.Core
1184     * @since 12
1185     */
1186    readonly foldStatus: FoldStatus;
1187  }
1188
1189  /**
1190   * Enum for camera position.
1191   *
1192   * @enum { number }
1193   * @syscap SystemCapability.Multimedia.Camera.Core
1194   * @since 10
1195   */
1196  /**
1197   * Enum for camera position.
1198   *
1199   * @enum { number }
1200   * @syscap SystemCapability.Multimedia.Camera.Core
1201   * @atomicservice
1202   * @since 12
1203   */
1204  enum CameraPosition {
1205    /**
1206     * Unspecified position.
1207     *
1208     * @syscap SystemCapability.Multimedia.Camera.Core
1209     * @since 10
1210     */
1211    /**
1212     * Unspecified position.
1213     *
1214     * @syscap SystemCapability.Multimedia.Camera.Core
1215     * @atomicservice
1216     * @since 12
1217     */
1218    CAMERA_POSITION_UNSPECIFIED = 0,
1219
1220    /**
1221     * Back position.
1222     *
1223     * @syscap SystemCapability.Multimedia.Camera.Core
1224     * @since 10
1225     */
1226    /**
1227     * Back position.
1228     *
1229     * @syscap SystemCapability.Multimedia.Camera.Core
1230     * @atomicservice
1231     * @since 12
1232     */
1233    CAMERA_POSITION_BACK = 1,
1234
1235    /**
1236     * Front position.
1237     *
1238     * @syscap SystemCapability.Multimedia.Camera.Core
1239     * @since 10
1240     */
1241    /**
1242     * Front position.
1243     *
1244     * @syscap SystemCapability.Multimedia.Camera.Core
1245     * @atomicservice
1246     * @since 12
1247     */
1248    CAMERA_POSITION_FRONT = 2,
1249
1250    /**
1251     * Camera that is inner position when the device is folded.
1252     *
1253     * @syscap SystemCapability.Multimedia.Camera.Core
1254     * @since 11
1255     */
1256    /**
1257     * Camera that is inner position when the device is folded.
1258     *
1259     * @syscap SystemCapability.Multimedia.Camera.Core
1260     * @atomicservice
1261     * @since 12
1262     * @deprecated since 12
1263     */
1264    CAMERA_POSITION_FOLD_INNER = 3
1265  }
1266
1267  /**
1268   * Enum for camera type.
1269   *
1270   * @enum { number }
1271   * @syscap SystemCapability.Multimedia.Camera.Core
1272   * @since 10
1273   */
1274  enum CameraType {
1275    /**
1276     * Default camera type
1277     *
1278     * @syscap SystemCapability.Multimedia.Camera.Core
1279     * @since 10
1280     */
1281    CAMERA_TYPE_DEFAULT = 0,
1282
1283    /**
1284     * Wide camera
1285     *
1286     * @syscap SystemCapability.Multimedia.Camera.Core
1287     * @since 10
1288     */
1289    CAMERA_TYPE_WIDE_ANGLE = 1,
1290
1291    /**
1292     * Ultra wide camera
1293     *
1294     * @syscap SystemCapability.Multimedia.Camera.Core
1295     * @since 10
1296     */
1297    CAMERA_TYPE_ULTRA_WIDE = 2,
1298
1299    /**
1300     * Telephoto camera
1301     *
1302     * @syscap SystemCapability.Multimedia.Camera.Core
1303     * @since 10
1304     */
1305    CAMERA_TYPE_TELEPHOTO = 3,
1306
1307    /**
1308     * True depth camera
1309     *
1310     * @syscap SystemCapability.Multimedia.Camera.Core
1311     * @since 10
1312     */
1313    CAMERA_TYPE_TRUE_DEPTH = 4
1314  }
1315
1316  /**
1317   * Enum for camera connection type.
1318   *
1319   * @enum { number }
1320   * @syscap SystemCapability.Multimedia.Camera.Core
1321   * @since 10
1322   */
1323  enum ConnectionType {
1324    /**
1325     * Built-in camera.
1326     *
1327     * @syscap SystemCapability.Multimedia.Camera.Core
1328     * @since 10
1329     */
1330    CAMERA_CONNECTION_BUILT_IN = 0,
1331
1332    /**
1333     * Camera connected using USB
1334     *
1335     * @syscap SystemCapability.Multimedia.Camera.Core
1336     * @since 10
1337     */
1338    CAMERA_CONNECTION_USB_PLUGIN = 1,
1339
1340    /**
1341     * Remote camera
1342     *
1343     * @syscap SystemCapability.Multimedia.Camera.Core
1344     * @since 10
1345     */
1346    CAMERA_CONNECTION_REMOTE = 2
1347  }
1348
1349  /**
1350   * Enum for remote camera device type.
1351   *
1352   * @enum { number }
1353   * @syscap SystemCapability.Multimedia.Camera.Core
1354   * @systemapi
1355   * @since 10
1356   */
1357  enum HostDeviceType {
1358    /**
1359     * Indicates an unknown device camera.
1360     *
1361     * @syscap SystemCapability.Multimedia.Camera.Core
1362     * @systemapi
1363     * @since 10
1364     */
1365    UNKNOWN_TYPE = 0,
1366
1367    /**
1368     * Indicates a smartphone camera.
1369     *
1370     * @syscap SystemCapability.Multimedia.Camera.Core
1371     * @systemapi
1372     * @since 10
1373     */
1374    PHONE = 0x0E,
1375
1376    /**
1377     * Indicates a tablet camera.
1378     *
1379     * @syscap SystemCapability.Multimedia.Camera.Core
1380     * @systemapi
1381     * @since 10
1382     */
1383    TABLET = 0x11
1384  }
1385
1386  /**
1387   * Camera device object.
1388   *
1389   * @typedef CameraDevice
1390   * @syscap SystemCapability.Multimedia.Camera.Core
1391   * @since 10
1392   */
1393  interface CameraDevice {
1394    /**
1395     * Camera id attribute.
1396     *
1397     * @type { string }
1398     * @readonly
1399     * @syscap SystemCapability.Multimedia.Camera.Core
1400     * @since 10
1401     */
1402    readonly cameraId: string;
1403
1404    /**
1405     * Camera position attribute.
1406     *
1407     * @type { CameraPosition }
1408     * @readonly
1409     * @syscap SystemCapability.Multimedia.Camera.Core
1410     * @since 10
1411     */
1412    readonly cameraPosition: CameraPosition;
1413
1414    /**
1415     * Camera type attribute.
1416     *
1417     * @type { CameraType }
1418     * @readonly
1419     * @syscap SystemCapability.Multimedia.Camera.Core
1420     * @since 10
1421     */
1422    readonly cameraType: CameraType;
1423
1424    /**
1425     * Camera connection type attribute.
1426     *
1427     * @type { ConnectionType }
1428     * @readonly
1429     * @syscap SystemCapability.Multimedia.Camera.Core
1430     * @since 10
1431     */
1432    readonly connectionType: ConnectionType;
1433
1434    /**
1435     * Camera remote camera device name attribute.
1436     *
1437     * @type { string }
1438     * @readonly
1439     * @syscap SystemCapability.Multimedia.Camera.Core
1440     * @systemapi
1441     * @since 10
1442     */
1443    readonly hostDeviceName: string;
1444
1445    /**
1446     * Camera remote camera device type attribute.
1447     *
1448     * @type { HostDeviceType }
1449     * @readonly
1450     * @syscap SystemCapability.Multimedia.Camera.Core
1451     * @systemapi
1452     * @since 10
1453     */
1454    readonly hostDeviceType: HostDeviceType;
1455
1456    /**
1457     * Camera sensor orientation attribute.
1458     *
1459     * @type { number }
1460     * @readonly
1461     * @syscap SystemCapability.Multimedia.Camera.Core
1462     * @since 12
1463     */
1464    readonly cameraOrientation: number;
1465  }
1466
1467  /**
1468   * Size parameter.
1469   *
1470   * @typedef Size
1471   * @syscap SystemCapability.Multimedia.Camera.Core
1472   * @since 10
1473   */
1474  interface Size {
1475    /**
1476     * Height.
1477     *
1478     * @type { number }
1479     * @syscap SystemCapability.Multimedia.Camera.Core
1480     * @since 10
1481     */
1482    height: number;
1483
1484    /**
1485     * Width.
1486     *
1487     * @type { number }
1488     * @syscap SystemCapability.Multimedia.Camera.Core
1489     * @since 10
1490     */
1491    width: number;
1492  }
1493
1494  /**
1495   * Point parameter.
1496   *
1497   * @typedef Point
1498   * @syscap SystemCapability.Multimedia.Camera.Core
1499   * @since 10
1500   */
1501  interface Point {
1502    /**
1503     * x co-ordinate
1504     *
1505     * @type { number }
1506     * @syscap SystemCapability.Multimedia.Camera.Core
1507     * @since 10
1508     */
1509    x: number;
1510
1511    /**
1512     * y co-ordinate
1513     *
1514     * @type { number }
1515     * @syscap SystemCapability.Multimedia.Camera.Core
1516     * @since 10
1517     */
1518    y: number;
1519  }
1520
1521  /**
1522   * Camera input object.
1523   *
1524   * @interface CameraInput
1525   * @syscap SystemCapability.Multimedia.Camera.Core
1526   * @since 10
1527   */
1528  interface CameraInput {
1529    /**
1530     * Open camera.
1531     *
1532     * @param { AsyncCallback<void> } callback - Callback used to return the result.
1533     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1534     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1535     * @throws { BusinessError } 7400201 - Camera service fatal error.
1536     * @syscap SystemCapability.Multimedia.Camera.Core
1537     * @since 10
1538     */
1539    open(callback: AsyncCallback<void>): void;
1540
1541    /**
1542     * Open camera.
1543     *
1544     * @returns { Promise<void> } Promise used to return the result.
1545     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1546     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1547     * @throws { BusinessError } 7400201 - Camera service fatal error.
1548     * @syscap SystemCapability.Multimedia.Camera.Core
1549     * @since 10
1550     */
1551    open(): Promise<void>;
1552
1553    /**
1554     * Open camera.
1555     *
1556     * @param { boolean } isSecureEnabled - Enable secure camera.
1557     * @returns { Promise<bigint> } Promise used to return the result.
1558     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1559     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1560     * @throws { BusinessError } 7400201 - Camera service fatal error.
1561     * @syscap SystemCapability.Multimedia.Camera.Core
1562     * @since 12
1563     */
1564    open(isSecureEnabled: boolean): Promise<bigint>;
1565
1566    /**
1567     * Close camera.
1568     *
1569     * @param { AsyncCallback<void> } callback - Callback used to return the result.
1570     * @throws { BusinessError } 7400201 - Camera service fatal error.
1571     * @syscap SystemCapability.Multimedia.Camera.Core
1572     * @since 10
1573     */
1574    close(callback: AsyncCallback<void>): void;
1575
1576    /**
1577     * Close camera.
1578     *
1579     * @returns { Promise<void> } Promise used to return the result.
1580     * @throws { BusinessError } 7400201 - Camera service fatal error.
1581     * @syscap SystemCapability.Multimedia.Camera.Core
1582     * @since 10
1583     */
1584    close(): Promise<void>;
1585
1586    /**
1587     * Subscribes to error events.
1588     *
1589     * @param { 'error' } type - Event type.
1590     * @param { CameraDevice } camera - Camera device.
1591     * @param { ErrorCallback } callback - Callback used to get the camera input errors.
1592     * @syscap SystemCapability.Multimedia.Camera.Core
1593     * @since 10
1594     */
1595    on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void;
1596
1597    /**
1598     * Unsubscribes from error events.
1599     *
1600     * @param { 'error' } type - Event type.
1601     * @param { CameraDevice } camera - Camera device.
1602     * @param { ErrorCallback } callback - Callback used to get the camera input errors.
1603     * @syscap SystemCapability.Multimedia.Camera.Core
1604     * @since 10
1605     */
1606    off(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void;
1607
1608    /**
1609     * Subscribes to camera occlusion detection results.
1610     *
1611     * @param { 'cameraOcclusionDetection' } type - Event type.
1612     * @param { AsyncCallback<CameraOcclusionDetectionResult> } callback - Callback used to get detection results.
1613     * @throws { BusinessError } 202 - Not System Application.
1614     * @syscap SystemCapability.Multimedia.Camera.Core
1615     * @systemapi
1616     * @since 12
1617     */
1618    on(type: 'cameraOcclusionDetection', callback: AsyncCallback<CameraOcclusionDetectionResult>): void;
1619    
1620    /**
1621     * Unsubscribes from camera occlusion detection results.
1622     *
1623     * @param { 'cameraOcclusionDetection' } type - Event type.
1624     * @param { AsyncCallback<CameraOcclusionDetectionResult> } callback - Callback used to get detection results.
1625     * @throws { BusinessError } 202 - Not System Application.
1626     * @syscap SystemCapability.Multimedia.Camera.Core
1627     * @systemapi
1628     * @since 12
1629     */
1630    off(type: 'cameraOcclusionDetection', callback?: AsyncCallback<CameraOcclusionDetectionResult>): void;
1631  }
1632
1633  /**
1634   * Enumerates the camera scene modes.
1635   *
1636   * @enum { number }
1637   * @syscap SystemCapability.Multimedia.Camera.Core
1638   * @since 11
1639   */
1640  enum SceneMode {
1641    /**
1642     * Normal photo mode.
1643     *
1644     * @syscap SystemCapability.Multimedia.Camera.Core
1645     * @since 11
1646     */
1647    NORMAL_PHOTO = 1,
1648
1649    /**
1650     * Normal video mode.
1651     *
1652     * @syscap SystemCapability.Multimedia.Camera.Core
1653     * @since 11
1654     */
1655    NORMAL_VIDEO = 2,
1656
1657    /**
1658     * Portrait photo mode.
1659     *
1660     * @syscap SystemCapability.Multimedia.Camera.Core
1661     * @systemapi
1662     * @since 11
1663     */
1664    PORTRAIT_PHOTO = 3,
1665
1666    /**
1667     * Night photo mode.
1668     *
1669     * @syscap SystemCapability.Multimedia.Camera.Core
1670     * @systemapi
1671     * @since 11
1672     */
1673    NIGHT_PHOTO = 4,
1674
1675    /**
1676     * Professional photo mode.
1677     *
1678     * @syscap SystemCapability.Multimedia.Camera.Core
1679     * @systemapi
1680     * @since 12
1681     */
1682    PROFESSIONAL_PHOTO = 5,
1683
1684    /**
1685     * Professional video mode.
1686     *
1687     * @syscap SystemCapability.Multimedia.Camera.Core
1688     * @systemapi
1689     * @since 12
1690     */
1691    PROFESSIONAL_VIDEO = 6,
1692
1693    /**
1694     * Slow motion video mode.
1695     *
1696     * @syscap SystemCapability.Multimedia.Camera.Core
1697     * @systemapi
1698     * @since 12
1699     */
1700    SLOW_MOTION_VIDEO = 7,
1701
1702    /**
1703     * Macro photo mode.
1704     *
1705     * @syscap SystemCapability.Multimedia.Camera.Core
1706     * @systemapi
1707     * @since 12
1708     */
1709    MACRO_PHOTO = 8,
1710
1711    /**
1712     * Macro video mode.
1713     *
1714     * @syscap SystemCapability.Multimedia.Camera.Core
1715     * @systemapi
1716     * @since 12
1717     */
1718    MACRO_VIDEO = 9,
1719
1720    /**
1721     * Light painting photo mode.
1722     *
1723     * @syscap SystemCapability.Multimedia.Camera.Core
1724     * @systemapi
1725     * @since 12
1726     */
1727    LIGHT_PAINTING_PHOTO = 10,
1728
1729    /**
1730     * High resolution mode.
1731     *
1732     * @syscap SystemCapability.Multimedia.Camera.Core
1733     * @systemapi
1734     * @since 12
1735     */
1736    HIGH_RESOLUTION_PHOTO = 11,
1737
1738    /**
1739     * Secure camera mode.
1740     *
1741     * @syscap SystemCapability.Multimedia.Camera.Core
1742     * @since 12
1743     */
1744    SECURE_PHOTO = 12,
1745
1746    /**
1747     * Quick shot mode.
1748     *
1749     * @syscap SystemCapability.Multimedia.Camera.Core
1750     * @systemapi
1751     * @since 12
1752     */
1753    QUICK_SHOT_PHOTO = 13,
1754
1755    /**
1756     * Aperture video mode.
1757     *
1758     * @syscap SystemCapability.Multimedia.Camera.Core
1759     * @systemapi
1760     * @since 12
1761     */
1762    APERTURE_VIDEO = 14,
1763
1764    /**
1765     * Panorama photo camera mode.
1766     *
1767     * @syscap SystemCapability.Multimedia.Camera.Core
1768     * @systemapi
1769     * @since 12
1770     */
1771    PANORAMA_PHOTO = 15,
1772
1773    /**
1774     * Fluorescence photo mode.
1775     *
1776     * @syscap SystemCapability.Multimedia.Camera.Core
1777     * @systemapi
1778     * @since 12
1779     */
1780    FLUORESCENCE_PHOTO = 17
1781  }
1782
1783  /**
1784   * Enum for camera format type.
1785   *
1786   * @enum { number }
1787   * @syscap SystemCapability.Multimedia.Camera.Core
1788   * @since 10
1789   */
1790  enum CameraFormat {
1791    /**
1792     * RGBA 8888 Format.
1793     *
1794     * @syscap SystemCapability.Multimedia.Camera.Core
1795     * @since 10
1796     */
1797    CAMERA_FORMAT_RGBA_8888 = 3,
1798
1799    /**
1800     * Digital negative Format.
1801     *
1802     * @syscap SystemCapability.Multimedia.Camera.Core
1803     * @systemapi
1804     * @since 12
1805     */
1806    CAMERA_FORMAT_DNG = 4,
1807
1808    /**
1809     * YUV 420 Format.
1810     *
1811     * @syscap SystemCapability.Multimedia.Camera.Core
1812     * @since 10
1813     */
1814    CAMERA_FORMAT_YUV_420_SP = 1003,
1815
1816    /**
1817     * JPEG Format.
1818     *
1819     * @syscap SystemCapability.Multimedia.Camera.Core
1820     * @since 10
1821     */
1822    CAMERA_FORMAT_JPEG = 2000,
1823
1824    /**
1825     * YCBCR P010 Format.
1826     *
1827     * @syscap SystemCapability.Multimedia.Camera.Core
1828     * @since 11
1829     */
1830    CAMERA_FORMAT_YCBCR_P010,
1831
1832    /**
1833     * YCRCB P010 Format.
1834     *
1835     * @syscap SystemCapability.Multimedia.Camera.Core
1836     * @since 11
1837     */
1838    CAMERA_FORMAT_YCRCB_P010
1839  }
1840
1841  /**
1842   * Enum for flash mode.
1843   *
1844   * @enum { number }
1845   * @syscap SystemCapability.Multimedia.Camera.Core
1846   * @since 10
1847   */
1848  enum FlashMode {
1849    /**
1850     * Close mode.
1851     *
1852     * @syscap SystemCapability.Multimedia.Camera.Core
1853     * @since 10
1854     */
1855    FLASH_MODE_CLOSE = 0,
1856
1857    /**
1858     * Open mode.
1859     *
1860     * @syscap SystemCapability.Multimedia.Camera.Core
1861     * @since 10
1862     */
1863    FLASH_MODE_OPEN = 1,
1864
1865    /**
1866     * Auto mode.
1867     *
1868     * @syscap SystemCapability.Multimedia.Camera.Core
1869     * @since 10
1870     */
1871    FLASH_MODE_AUTO = 2,
1872
1873    /**
1874     * Always open mode.
1875     *
1876     * @syscap SystemCapability.Multimedia.Camera.Core
1877     * @since 10
1878     */
1879    FLASH_MODE_ALWAYS_OPEN = 3
1880  }
1881
1882  /**
1883   * LCD Flash Status.
1884   *
1885   * @typedef LcdFlashStatus
1886   * @syscap SystemCapability.Multimedia.Camera.Core
1887   * @systemapi
1888   * @since 12
1889   */
1890  interface LcdFlashStatus {
1891    /**
1892     * Check whether lcd flash is needed.
1893     *
1894     * @type { boolean }
1895     * @syscap SystemCapability.Multimedia.Camera.Core
1896     * @systemapi
1897     * @since 12
1898     */
1899    readonly isLcdFlashNeeded: boolean;
1900
1901    /**
1902     * Compensate value for lcd flash.
1903     *
1904     * @type { number }
1905     * @syscap SystemCapability.Multimedia.Camera.Core
1906     * @systemapi
1907     * @since 12
1908     */
1909    readonly lcdCompensation: number;
1910  }
1911
1912  /**
1913   * Flash Query object.
1914   *
1915   * @interface FlashQuery
1916   * @syscap SystemCapability.Multimedia.Camera.Core
1917   * @since 12
1918   */
1919  interface FlashQuery {
1920    /**
1921     * Check if device has flash light.
1922     *
1923     * @returns { boolean } The flash light support status.
1924     * @throws { BusinessError } 7400103 - Session not config.
1925     * @syscap SystemCapability.Multimedia.Camera.Core
1926     * @since 11
1927     */
1928    /**
1929     * Check if device has flash light.
1930     * Move to FlashQuery interface from Flash since 12.
1931     *
1932     * @returns { boolean } The flash light support status.
1933     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
1934     * @syscap SystemCapability.Multimedia.Camera.Core
1935     * @since 12
1936     */
1937    hasFlash(): boolean;
1938
1939    /**
1940     * Checks whether a specified flash mode is supported.
1941     *
1942     * @param { FlashMode } flashMode - Flash mode
1943     * @returns { boolean } Is the flash mode supported.
1944     * @throws { BusinessError } 7400103 - Session not config.
1945     * @syscap SystemCapability.Multimedia.Camera.Core
1946     * @since 11
1947     */
1948    /**
1949     * Checks whether a specified flash mode is supported.
1950     * Move to FlashQuery interface from Flash since 12.
1951     *
1952     * @param { FlashMode } flashMode - Flash mode
1953     * @returns { boolean } Is the flash mode supported.
1954     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
1955     * @syscap SystemCapability.Multimedia.Camera.Core
1956     * @since 12
1957     */
1958    isFlashModeSupported(flashMode: FlashMode): boolean;
1959
1960    /**
1961     * Checks whether lcd flash is supported.
1962     *
1963     * @returns { boolean } Is lcd flash supported.
1964     * @throws { BusinessError } 202 - Not System Application.
1965     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
1966     * @syscap SystemCapability.Multimedia.Camera.Core
1967     * @systemapi
1968     * @since 12
1969     */
1970    isLcdFlashSupported(): boolean;
1971  }
1972
1973  /**
1974   * Flash object.
1975   *
1976   * @interface Flash
1977   * @syscap SystemCapability.Multimedia.Camera.Core
1978   * @since 11
1979   */
1980  interface Flash extends FlashQuery {
1981    /**
1982     * Gets current flash mode.
1983     *
1984     * @returns { FlashMode } The current flash mode.
1985     * @throws { BusinessError } 7400103 - Session not config.
1986     * @syscap SystemCapability.Multimedia.Camera.Core
1987     * @since 11
1988     */
1989    getFlashMode(): FlashMode;
1990
1991    /**
1992     * Sets flash mode.
1993     *
1994     * @param { FlashMode } flashMode - Target flash mode.
1995     * @throws { BusinessError } 7400103 - Session not config.
1996     * @syscap SystemCapability.Multimedia.Camera.Core
1997     * @since 11
1998     */
1999    setFlashMode(flashMode: FlashMode): void;
2000  }
2001
2002  /**
2003   * Enum for exposure mode.
2004   *
2005   * @enum { number }
2006   * @syscap SystemCapability.Multimedia.Camera.Core
2007   * @since 10
2008   */
2009  enum ExposureMode {
2010    /**
2011     * Lock exposure mode.
2012     *
2013     * @syscap SystemCapability.Multimedia.Camera.Core
2014     * @since 10
2015     */
2016    EXPOSURE_MODE_LOCKED = 0,
2017
2018    /**
2019     * Auto exposure mode.
2020     *
2021     * @syscap SystemCapability.Multimedia.Camera.Core
2022     * @since 10
2023     */
2024    EXPOSURE_MODE_AUTO = 1,
2025
2026    /**
2027     * Continuous automatic exposure.
2028     *
2029     * @syscap SystemCapability.Multimedia.Camera.Core
2030     * @since 10
2031     */
2032    EXPOSURE_MODE_CONTINUOUS_AUTO = 2,
2033
2034    /**
2035     * Manual exposure mode.
2036     *
2037     * @syscap SystemCapability.Multimedia.Camera.Core
2038     * @systemapi
2039     * @since 12
2040     */
2041    EXPOSURE_MODE_MANUAL = 3
2042  }
2043
2044  /**
2045   * Enum for exposure metering mode.
2046   *
2047   * @enum { number }
2048   * @syscap SystemCapability.Multimedia.Camera.Core
2049   * @systemapi
2050   * @since 12
2051   */
2052  enum ExposureMeteringMode {
2053    /**
2054     * Matrix metering.
2055     *
2056     * @syscap SystemCapability.Multimedia.Camera.Core
2057     * @systemapi
2058     * @since 12
2059     */
2060    MATRIX = 0,
2061
2062    /**
2063     * Center metering.
2064     *
2065     * @syscap SystemCapability.Multimedia.Camera.Core
2066     * @systemapi
2067     * @since 12
2068     */
2069    CENTER = 1,
2070
2071    /**
2072     * Spot metering.
2073     *
2074     * @syscap SystemCapability.Multimedia.Camera.Core
2075     * @systemapi
2076     * @since 12
2077     */
2078    SPOT = 2
2079  }
2080
2081  /**
2082   * AutoExposureQuery object.
2083   *
2084   * @interface AutoExposureQuery
2085   * @syscap SystemCapability.Multimedia.Camera.Core
2086   * @since 12
2087   */
2088  interface AutoExposureQuery {
2089    /**
2090     * Checks whether a specified exposure mode is supported.
2091     *
2092     * @param { ExposureMode } aeMode - Exposure mode
2093     * @returns { boolean } Is the exposure mode supported.
2094     * @throws { BusinessError } 7400103 - Session not config.
2095     * @syscap SystemCapability.Multimedia.Camera.Core
2096     * @since 11
2097     */
2098    /**
2099     * Checks whether a specified exposure mode is supported.
2100     * Move to AutoExposureQuery interface from AutoExposure interface since 12.
2101     *
2102     * @param { ExposureMode } aeMode - Exposure mode
2103     * @returns { boolean } Is the exposure mode supported.
2104     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2105     * @syscap SystemCapability.Multimedia.Camera.Core
2106     * @since 12
2107     */
2108    isExposureModeSupported(aeMode: ExposureMode): boolean;
2109
2110    /**
2111     * Query the exposure compensation range.
2112     *
2113     * @returns { Array<number> } The array of compensation range.
2114     * @throws { BusinessError } 7400103 - Session not config.
2115     * @syscap SystemCapability.Multimedia.Camera.Core
2116     * @since 11
2117     */
2118    /**
2119     * Query the exposure compensation range.
2120     * Move to AutoExposureQuery interface from AutoExposure interface since 12.
2121     *
2122     * @returns { Array<number> } The array of compensation range.
2123     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2124     * @syscap SystemCapability.Multimedia.Camera.Core
2125     * @since 12
2126     */
2127    getExposureBiasRange(): Array<number>;
2128
2129    /**
2130     * Checks whether a specified exposure metering mode is supported.
2131     *
2132     * @param { ExposureMeteringMode } aeMeteringMode - Exposure metering mode
2133     * @returns { boolean } Is the exposure metering mode supported.
2134     * @throws { BusinessError } 202 - Not System Application.
2135     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2136     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2137     * @syscap SystemCapability.Multimedia.Camera.Core
2138     * @systemapi
2139     * @since 12
2140     */
2141    isExposureMeteringModeSupported(aeMeteringMode: ExposureMeteringMode): boolean;
2142  }
2143
2144  /**
2145   * AutoExposure object.
2146   *
2147   * @interface AutoExposure
2148   * @syscap SystemCapability.Multimedia.Camera.Core
2149   * @since 11
2150   */
2151  interface AutoExposure extends AutoExposureQuery {
2152    /**
2153     * Gets current exposure mode.
2154     *
2155     * @returns { ExposureMode } The current exposure mode.
2156     * @throws { BusinessError } 7400103 - Session not config.
2157     * @syscap SystemCapability.Multimedia.Camera.Core
2158     * @since 11
2159     */
2160    getExposureMode(): ExposureMode;
2161
2162    /**
2163     * Sets Exposure mode.
2164     *
2165     * @param { ExposureMode } aeMode - Exposure mode
2166     * @throws { BusinessError } 7400103 - Session not config.
2167     * @syscap SystemCapability.Multimedia.Camera.Core
2168     * @since 11
2169     */
2170    setExposureMode(aeMode: ExposureMode): void;
2171
2172    /**
2173     * Gets current metering point.
2174     *
2175     * @returns { Point } The current metering point.
2176     * @throws { BusinessError } 7400103 - Session not config.
2177     * @syscap SystemCapability.Multimedia.Camera.Core
2178     * @since 11
2179     */
2180    getMeteringPoint(): Point;
2181
2182    /**
2183     * Set the center point of the metering area.
2184     *
2185     * @param { Point } point - metering point
2186     * @throws { BusinessError } 7400103 - Session not config.
2187     * @syscap SystemCapability.Multimedia.Camera.Core
2188     * @since 11
2189     */
2190    setMeteringPoint(point: Point): void;
2191
2192    /**
2193     * Query the exposure compensation range.
2194     *
2195     * @returns { Array<number> } The array of compensation range.
2196     * @throws { BusinessError } 7400103 - Session not config.
2197     * @syscap SystemCapability.Multimedia.Camera.Core
2198     * @since 11
2199     */
2200    getExposureBiasRange(): Array<number>;
2201
2202    /**
2203     * Set exposure compensation.
2204     *
2205     * @param { number } exposureBias - Exposure compensation
2206     * @throws { BusinessError } 7400103 - Session not config.
2207     * @syscap SystemCapability.Multimedia.Camera.Core
2208     * @since 11
2209     */
2210    /**
2211     * Set exposure compensation.
2212     *
2213     * @param { number } exposureBias - Exposure compensation
2214     * @throws { BusinessError } 7400102 - Operation not allowed.
2215     * @throws { BusinessError } 7400103 - Session not config.
2216     * @syscap SystemCapability.Multimedia.Camera.Core
2217     * @since 12
2218     */
2219    setExposureBias(exposureBias: number): void;
2220
2221    /**
2222     * Query the exposure value.
2223     *
2224     * @returns { number } The exposure value.
2225     * @throws { BusinessError } 7400103 - Session not config.
2226     * @syscap SystemCapability.Multimedia.Camera.Core
2227     * @since 11
2228     */
2229    getExposureValue(): number;
2230
2231    /**
2232     * Gets current exposure metering mode.
2233     *
2234     * @returns { ExposureMeteringMode } The current exposure metering mode.
2235     * @throws { BusinessError } 202 - Not System Application.
2236     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2237     * @syscap SystemCapability.Multimedia.Camera.Core
2238     * @systemapi
2239     * @since 12
2240     */
2241    getExposureMeteringMode(): ExposureMeteringMode;
2242
2243    /**
2244     * Sets exposure metering mode.
2245     *
2246     * @param { ExposureMeteringMode } aeMeteringMode - Exposure metering mode
2247     * @throws { BusinessError } 202 - Not System Application.
2248     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2249     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2250     * @syscap SystemCapability.Multimedia.Camera.Core
2251     * @systemapi
2252     * @since 12
2253     */
2254    setExposureMeteringMode(aeMeteringMode: ExposureMeteringMode): void;
2255  }
2256
2257  /**
2258   * Enum for focus mode.
2259   *
2260   * @enum { number }
2261   * @syscap SystemCapability.Multimedia.Camera.Core
2262   * @since 10
2263   */
2264  enum FocusMode {
2265    /**
2266     * Manual mode.
2267     *
2268     * @syscap SystemCapability.Multimedia.Camera.Core
2269     * @since 10
2270     */
2271    FOCUS_MODE_MANUAL = 0,
2272
2273    /**
2274     * Continuous auto mode.
2275     *
2276     * @syscap SystemCapability.Multimedia.Camera.Core
2277     * @since 10
2278     */
2279    FOCUS_MODE_CONTINUOUS_AUTO = 1,
2280
2281    /**
2282     * Auto mode.
2283     *
2284     * @syscap SystemCapability.Multimedia.Camera.Core
2285     * @since 10
2286     */
2287    FOCUS_MODE_AUTO = 2,
2288
2289    /**
2290     * Locked mode.
2291     *
2292     * @syscap SystemCapability.Multimedia.Camera.Core
2293     * @since 10
2294     */
2295    FOCUS_MODE_LOCKED = 3
2296  }
2297
2298  /**
2299   * Enum for focus state.
2300   *
2301   * @enum { number }
2302   * @syscap SystemCapability.Multimedia.Camera.Core
2303   * @since 10
2304   */
2305  enum FocusState {
2306    /**
2307     * Scan state.
2308     *
2309     * @syscap SystemCapability.Multimedia.Camera.Core
2310     * @since 10
2311     */
2312    FOCUS_STATE_SCAN = 0,
2313
2314    /**
2315     * Focused state.
2316     *
2317     * @syscap SystemCapability.Multimedia.Camera.Core
2318     * @since 10
2319     */
2320    FOCUS_STATE_FOCUSED = 1,
2321
2322    /**
2323     * Unfocused state.
2324     *
2325     * @syscap SystemCapability.Multimedia.Camera.Core
2326     * @since 10
2327     */
2328    FOCUS_STATE_UNFOCUSED = 2
2329  }
2330
2331  /**
2332   * Focus Query object.
2333   *
2334   * @interface FocusQuery
2335   * @syscap SystemCapability.Multimedia.Camera.Core
2336   * @since 12
2337   */
2338  interface FocusQuery {
2339    /**
2340     * Checks whether a specified focus mode is supported.
2341     *
2342     * @param { FocusMode } afMode - Focus mode.
2343     * @returns { boolean } Is the focus mode supported.
2344     * @throws { BusinessError } 7400103 - Session not config.
2345     * @syscap SystemCapability.Multimedia.Camera.Core
2346     * @since 11
2347     */
2348    /**
2349     * Checks whether a specified focus mode is supported.
2350     * Move to FocusQuery interface from Focus interface since 12.
2351     *
2352     * @param { FocusMode } afMode - Focus mode.
2353     * @returns { boolean } Is the focus mode supported.
2354     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2355     * @syscap SystemCapability.Multimedia.Camera.Core
2356     * @since 12
2357     */
2358    isFocusModeSupported(afMode: FocusMode): boolean;
2359
2360    /**
2361     * Checks whether a focus assist is supported.
2362     *
2363     * @returns { boolean } Is the focus assist supported.
2364     * @throws { BusinessError } 202 - Not System Application.
2365     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2366     * @syscap SystemCapability.Multimedia.Camera.Core
2367     * @systemapi
2368     * @since 12
2369     */
2370    isFocusAssistSupported(): boolean;
2371  }
2372
2373  /**
2374   * Focus object.
2375   *
2376   * @interface Focus
2377   * @syscap SystemCapability.Multimedia.Camera.Core
2378   * @since 11
2379   */
2380  interface Focus extends FocusQuery {
2381    /**
2382     * Gets current focus mode.
2383     *
2384     * @returns { FocusMode } The current focus mode.
2385     * @throws { BusinessError } 7400103 - Session not config.
2386     * @syscap SystemCapability.Multimedia.Camera.Core
2387     * @since 11
2388     */
2389    getFocusMode(): FocusMode;
2390
2391    /**
2392     * Sets focus mode.
2393     *
2394     * @param { FocusMode } afMode - Target focus mode.
2395     * @throws { BusinessError } 7400103 - Session not config.
2396     * @syscap SystemCapability.Multimedia.Camera.Core
2397     * @since 11
2398     */
2399    setFocusMode(afMode: FocusMode): void;
2400
2401    /**
2402     * Sets focus point.
2403     *
2404     * @param { Point } point - Target focus point.
2405     * @throws { BusinessError } 7400103 - Session not config.
2406     * @syscap SystemCapability.Multimedia.Camera.Core
2407     * @since 11
2408     */
2409    setFocusPoint(point: Point): void;
2410
2411    /**
2412     * Gets current focus point.
2413     *
2414     * @returns { Point } The current focus point.
2415     * @throws { BusinessError } 7400103 - Session not config.
2416     * @syscap SystemCapability.Multimedia.Camera.Core
2417     * @since 11
2418     */
2419    getFocusPoint(): Point;
2420
2421    /**
2422     * Gets current focal length.
2423     *
2424     * @returns { number } The current focal point.
2425     * @throws { BusinessError } 7400103 - Session not config.
2426     * @syscap SystemCapability.Multimedia.Camera.Core
2427     * @since 11
2428     */
2429    getFocalLength(): number;
2430
2431    /**
2432     * Gets current focus assist.
2433     *
2434     * @returns { boolean } The current focus assist.
2435     * @throws { BusinessError } 202 - Not System Application.
2436     * @throws { BusinessError } 7400103 - Session not config.
2437     * @syscap SystemCapability.Multimedia.Camera.Core
2438     * @systemapi
2439     * @since 12
2440     */
2441    getFocusAssist(): boolean;
2442
2443    /**
2444     * Sets focus assist.
2445     *
2446     * @param { boolean } enabled - Enable focus assist if TRUE.
2447     * @throws { BusinessError } 202 - Not System Application.
2448     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2449     * @throws { BusinessError } 7400103 - Session not config.
2450     * @syscap SystemCapability.Multimedia.Camera.Core
2451     * @systemapi
2452     * @since 12
2453     */
2454    setFocusAssist(enabled: boolean): void;
2455  }
2456
2457  /**
2458   * ManualFocus object.
2459   *
2460   * @interface ManualFocus
2461   * @syscap SystemCapability.Multimedia.Camera.Core
2462   * @systemapi
2463   * @since 12
2464   */
2465  interface ManualFocus {
2466    /**
2467     * Gets current focus distance.
2468     *
2469     * @returns { number } The current focus distance.
2470     * @throws { BusinessError } 202 - Not System Application.
2471     * @throws { BusinessError } 7400103 - Session not config.
2472     * @syscap SystemCapability.Multimedia.Camera.Core
2473     * @systemapi
2474     * @since 12
2475     */
2476    getFocusDistance(): number;
2477
2478    /**
2479     * Sets focus distance.
2480     *
2481     * @param { number } distance - Focus distance
2482     * @throws { BusinessError } 202 - Not System Application.
2483     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2484     * @throws { BusinessError } 7400103 - Session not config.
2485     * @syscap SystemCapability.Multimedia.Camera.Core
2486     * @systemapi
2487     * @since 12
2488     */
2489    setFocusDistance(distance: number): void;
2490  }
2491
2492  /**
2493   * Enumerates the camera white balance modes.
2494   *
2495   * @enum { number }
2496   * @syscap SystemCapability.Multimedia.Camera.Core
2497   * @systemapi
2498   * @since 12
2499   */
2500  enum WhiteBalanceMode {
2501    /**
2502     * Auto white balance mode.
2503     *
2504     * @syscap SystemCapability.Multimedia.Camera.Core
2505     * @systemapi
2506     * @since 12
2507     */
2508    AUTO = 0,
2509
2510    /**
2511     * Cloudy white balance mode.
2512     *
2513     * @syscap SystemCapability.Multimedia.Camera.Core
2514     * @systemapi
2515     * @since 12
2516     */
2517    CLOUDY = 1,
2518
2519    /**
2520     * Incandescent white balance mode.
2521     *
2522     * @syscap SystemCapability.Multimedia.Camera.Core
2523     * @systemapi
2524     * @since 12
2525     */
2526    INCANDESCENT = 2,
2527
2528    /**
2529     * Fluorescent white balance mode.
2530     *
2531     * @syscap SystemCapability.Multimedia.Camera.Core
2532     * @systemapi
2533     * @since 12
2534     */
2535    FLUORESCENT = 3,
2536
2537    /**
2538     * Daylight white balance mode.
2539     *
2540     * @syscap SystemCapability.Multimedia.Camera.Core
2541     * @systemapi
2542     * @since 12
2543     */
2544    DAYLIGHT = 4,
2545
2546    /**
2547     * Manual white balance mode.
2548     *
2549     * @syscap SystemCapability.Multimedia.Camera.Core
2550     * @systemapi
2551     * @since 12
2552     */
2553    MANUAL = 5,
2554
2555    /**
2556     * Lock white balance mode.
2557     *
2558     * @syscap SystemCapability.Multimedia.Camera.Core
2559     * @systemapi
2560     * @since 12
2561     */
2562    LOCKED = 6
2563  }
2564
2565  /**
2566   * White Balance Query object.
2567   *
2568   * @interface WhiteBalanceQuery
2569   * @syscap SystemCapability.Multimedia.Camera.Core
2570   * @systemapi
2571   * @since 12
2572   */
2573  interface WhiteBalanceQuery {
2574    /**
2575     * Checks whether a specified white balance mode is supported.
2576     *
2577     * @param { WhiteBalanceMode } mode - White balance mode.
2578     * @returns { boolean } Is the white balance mode supported.
2579     * @throws { BusinessError } 202 - Not System Application.
2580     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2581     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2582     * @syscap SystemCapability.Multimedia.Camera.Core
2583     * @systemapi
2584     * @since 12
2585     */
2586    isWhiteBalanceModeSupported(mode: WhiteBalanceMode): boolean;
2587
2588    /**
2589     * Query the white balance mode range.
2590     *
2591     * @returns { Array<number> } The array of white balance mode range.
2592     * @throws { BusinessError } 202 - Not System Application.
2593     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2594     * @syscap SystemCapability.Multimedia.Camera.Core
2595     * @systemapi
2596     * @since 12
2597     */
2598    getWhiteBalanceRange(): Array<number>;
2599  }
2600
2601  /**
2602   * WhiteBalance object.
2603   *
2604   * @interface WhiteBalance
2605   * @syscap SystemCapability.Multimedia.Camera.Core
2606   * @systemapi
2607   * @since 12
2608   */
2609  interface WhiteBalance extends WhiteBalanceQuery {
2610    /**
2611     * Gets current white balance mode.
2612     *
2613     * @returns { WhiteBalanceMode } The current white balance mode.
2614     * @throws { BusinessError } 202 - Not System Application.
2615     * @throws { BusinessError } 7400103 - Session not config.
2616     * @syscap SystemCapability.Multimedia.Camera.Core
2617     * @systemapi
2618     * @since 12
2619     */
2620    getWhiteBalanceMode(): WhiteBalanceMode;
2621
2622    /**
2623     * Sets white balance mode.
2624     *
2625     * @param { WhiteBalanceMode } mode - Target white balance mode.
2626     * @throws { BusinessError } 202 - Not System Application.
2627     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2628     * @throws { BusinessError } 7400103 - Session not config.
2629     * @syscap SystemCapability.Multimedia.Camera.Core
2630     * @systemapi
2631     * @since 12
2632     */
2633    setWhiteBalanceMode(mode: WhiteBalanceMode): void;
2634
2635    /**
2636     * Gets current white balance.
2637     *
2638     * @returns { number } The current white balance.
2639     * @throws { BusinessError } 202 - Not System Application.
2640     * @throws { BusinessError } 7400103 - Session not config.
2641     * @syscap SystemCapability.Multimedia.Camera.Core
2642     * @systemapi
2643     * @since 12
2644     */
2645    getWhiteBalance(): number;
2646
2647    /**
2648     * Sets white balance.
2649     *
2650     * @param { number } whiteBalance - White balance.
2651     * @throws { BusinessError } 202 - Not System Application.
2652     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2653     * @throws { BusinessError } 7400103 - Session not config.
2654     * @syscap SystemCapability.Multimedia.Camera.Core
2655     * @systemapi
2656     * @since 12
2657     */
2658    setWhiteBalance(whiteBalance: number): void;
2659  }
2660
2661  /**
2662   * Manual ISO Query object.
2663   *
2664   * @interface ManualIsoQuery
2665   * @syscap SystemCapability.Multimedia.Camera.Core
2666   * @systemapi
2667   * @since 12
2668   */
2669  interface ManualIsoQuery {
2670    /**
2671     * Checks whether ISO is supported.
2672     *
2673     * @returns { boolean } Is the ISO supported.
2674     * @throws { BusinessError } 202 - Not System Application.
2675     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2676     * @syscap SystemCapability.Multimedia.Camera.Core
2677     * @systemapi
2678     * @since 12
2679     */
2680    isManualIsoSupported(): boolean;
2681
2682    /**
2683     * Get the ISO range.
2684     *
2685     * @returns { Array<number> } The array of ISO range.
2686     * @throws { BusinessError } 202 - Not System Application.
2687     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2688     * @syscap SystemCapability.Multimedia.Camera.Core
2689     * @systemapi
2690     * @since 12
2691     */
2692    getIsoRange(): Array<number>;
2693  }
2694
2695  /**
2696   * ManualIso object.
2697   *
2698   * @interface ManualIso
2699   * @syscap SystemCapability.Multimedia.Camera.Core
2700   * @systemapi
2701   * @since 12
2702   */
2703  interface ManualIso extends ManualIsoQuery {
2704    /**
2705     * Gets current ISO.
2706     *
2707     * @returns { number } The current ISO.
2708     * @throws { BusinessError } 202 - Not System Application.
2709     * @throws { BusinessError } 7400103 - Session not config.
2710     * @syscap SystemCapability.Multimedia.Camera.Core
2711     * @systemapi
2712     * @since 12
2713     */
2714    getIso(): number;
2715
2716    /**
2717     * Sets ISO.
2718     *
2719     * @param { number } iso - ISO
2720     * @throws { BusinessError } 202 - Not System Application.
2721     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2722     * @throws { BusinessError } 7400103 - Session not config.
2723     * @syscap SystemCapability.Multimedia.Camera.Core
2724     * @systemapi
2725     * @since 12
2726     */
2727    setIso(iso: number): void;
2728  }
2729
2730  /**
2731   * Enum for smooth zoom mode.
2732   *
2733   * @enum { number }
2734   * @syscap SystemCapability.Multimedia.Camera.Core
2735   * @since 11
2736   */
2737  enum SmoothZoomMode {
2738    /**
2739     * Normal zoom mode.
2740     *
2741     * @syscap SystemCapability.Multimedia.Camera.Core
2742     * @since 11
2743     */
2744    NORMAL = 0
2745  }
2746
2747  /**
2748   * SmoothZoomInfo object
2749   *
2750   * @typedef SmoothZoomInfo
2751   * @syscap SystemCapability.Multimedia.Camera.Core
2752   * @since 11
2753   */
2754  interface SmoothZoomInfo {
2755    /**
2756     * The duration of smooth zoom.
2757     *
2758     * @type { number }
2759     * @syscap SystemCapability.Multimedia.Camera.Core
2760     * @since 11
2761     */
2762    duration: number;
2763  }
2764
2765  /**
2766   * ZoomPointInfo object.
2767   *
2768   * @typedef ZoomPointInfo
2769   * @syscap SystemCapability.Multimedia.Camera.Core
2770   * @systemapi
2771   * @since 12
2772   */
2773  interface ZoomPointInfo {
2774    /**
2775     * The zoom ratio value.
2776     *
2777     * @type { number }
2778     * @readonly
2779     * @syscap SystemCapability.Multimedia.Camera.Core
2780     * @systemapi
2781     * @since 12
2782     */
2783    readonly zoomRatio: number;
2784
2785    /**
2786     * The equivalent focal Length.
2787     *
2788     * @type { number }
2789     * @readonly
2790     * @syscap SystemCapability.Multimedia.Camera.Core
2791     * @systemapi
2792     * @since 12
2793     */
2794    readonly equivalentFocalLength: number;
2795  }
2796
2797  /**
2798   * Zoom query object.
2799   *
2800   * @interface ZoomQuery
2801   * @syscap SystemCapability.Multimedia.Camera.Core
2802   * @since 12
2803   */
2804  interface ZoomQuery {
2805    /**
2806     * Gets all supported zoom ratio range.
2807     *
2808     * @returns { Array<number> } The zoom ratio range.
2809     * @throws { BusinessError } 7400103 - Session not config.
2810     * @syscap SystemCapability.Multimedia.Camera.Core
2811     * @since 11
2812     */
2813    /**
2814     * Gets all supported zoom ratio range.
2815     * Move to ZoomQuery interface from Zoom since 12.
2816     *
2817     * @returns { Array<number> } The zoom ratio range.
2818     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2819     * @syscap SystemCapability.Multimedia.Camera.Core
2820     * @since 12
2821     */
2822    getZoomRatioRange(): Array<number>;
2823
2824    /**
2825     * Gets all important zoom ratio infos.
2826     *
2827     * @returns { Array<ZoomPointInfo> } The zoom point infos.
2828     * @throws { BusinessError } 202 - Not System Application.
2829     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2830     * @syscap SystemCapability.Multimedia.Camera.Core
2831     * @systemapi
2832     * @since 12
2833     */
2834    getZoomPointInfos(): Array<ZoomPointInfo>;
2835  }
2836
2837  /**
2838   * Zoom object.
2839   *
2840   * @interface Zoom
2841   * @syscap SystemCapability.Multimedia.Camera.Core
2842   * @since 11
2843   */
2844  interface Zoom extends ZoomQuery {
2845    /**
2846     * Gets zoom ratio.
2847     *
2848     * @returns { number } The zoom ratio value.
2849     * @throws { BusinessError } 7400103 - Session not config.
2850     * @syscap SystemCapability.Multimedia.Camera.Core
2851     * @since 11
2852     */
2853    /**
2854     * Gets zoom ratio.
2855     *
2856     * @returns { number } The zoom ratio value.
2857     * @throws { BusinessError } 7400103 - Session not config.
2858     * @throws { BusinessError } 7400201 - Camera service fatal error.
2859     * @syscap SystemCapability.Multimedia.Camera.Core
2860     * @since 12
2861     */
2862    getZoomRatio(): number;
2863
2864    /**
2865     * Sets zoom ratio.
2866     *
2867     * @param { number } zoomRatio - Target zoom ratio.
2868     * @throws { BusinessError } 7400103 - Session not config.
2869     * @syscap SystemCapability.Multimedia.Camera.Core
2870     * @since 11
2871     */
2872    setZoomRatio(zoomRatio: number): void;
2873
2874    /**
2875     * Sets target zoom ratio by smooth method.
2876     *
2877     * @param { number } targetRatio - Target zoom ratio.
2878     * @param { SmoothZoomMode } mode - Smooth zoom mode.
2879     * @throws { BusinessError } 7400103 - Session not config.
2880     * @syscap SystemCapability.Multimedia.Camera.Core
2881     * @since 11
2882     */
2883    setSmoothZoom(targetRatio: number, mode?: SmoothZoomMode): void;
2884
2885    /**
2886     * Notify device to prepare for zoom.
2887     *
2888     * @throws { BusinessError } 202 - Not System Application.
2889     * @throws { BusinessError } 7400103 - Session not config.
2890     * @syscap SystemCapability.Multimedia.Camera.Core
2891     * @systemapi
2892     * @since 11
2893     */
2894    prepareZoom(): void;
2895
2896    /**
2897     * Notify device of zoom completion.
2898     *
2899     * @throws { BusinessError } 202 - Not System Application.
2900     * @throws { BusinessError } 7400103 - Session not config.
2901     * @syscap SystemCapability.Multimedia.Camera.Core
2902     * @systemapi
2903     * @since 11
2904     */
2905    unprepareZoom(): void;
2906  }
2907
2908  /**
2909   * Enum for video stabilization mode.
2910   *
2911   * @enum { number }
2912   * @syscap SystemCapability.Multimedia.Camera.Core
2913   * @since 10
2914   */
2915  enum VideoStabilizationMode {
2916    /**
2917     * Turn off video stablization.
2918     *
2919     * @syscap SystemCapability.Multimedia.Camera.Core
2920     * @since 10
2921     */
2922    OFF = 0,
2923
2924    /**
2925     * LOW mode provides basic stabilization effect.
2926     *
2927     * @syscap SystemCapability.Multimedia.Camera.Core
2928     * @since 10
2929     */
2930    LOW = 1,
2931
2932    /**
2933     * MIDDLE mode means algorithms can achieve better effects than LOW mode.
2934     *
2935     * @syscap SystemCapability.Multimedia.Camera.Core
2936     * @since 10
2937     */
2938    MIDDLE = 2,
2939
2940    /**
2941     * HIGH mode means algorithms can achieve better effects than MIDDLE mode.
2942     *
2943     * @syscap SystemCapability.Multimedia.Camera.Core
2944     * @since 10
2945     */
2946    HIGH = 3,
2947
2948    /**
2949     * Camera HDF can select mode automatically.
2950     *
2951     * @syscap SystemCapability.Multimedia.Camera.Core
2952     * @since 10
2953     */
2954    AUTO = 4
2955  }
2956
2957  /**
2958   * Stabilization Query object.
2959   *
2960   * @interface StabilizationQuery
2961   * @syscap SystemCapability.Multimedia.Camera.Core
2962   * @since 12
2963   */
2964  interface StabilizationQuery {
2965    /**
2966     * Check whether the specified video stabilization mode is supported.
2967     *
2968     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
2969     * @returns { boolean } Is flash mode supported.
2970     * @throws { BusinessError } 7400103 - Session not config.
2971     * @syscap SystemCapability.Multimedia.Camera.Core
2972     * @since 11
2973     */
2974    /**
2975     * Check whether the specified video stabilization mode is supported.
2976     * Move to StabilizationQuery interface from Stabilization since 12.
2977     *
2978     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
2979     * @returns { boolean } Is flash mode supported.
2980     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2981     * @syscap SystemCapability.Multimedia.Camera.Core
2982     * @since 12
2983     */
2984    isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
2985  }
2986
2987  /**
2988   * Stabilization object.
2989   *
2990   * @interface Stabilization
2991   * @syscap SystemCapability.Multimedia.Camera.Core
2992   * @since 11
2993   */
2994  interface Stabilization extends StabilizationQuery {
2995    /**
2996     * Query the video stabilization mode currently in use.
2997     *
2998     * @returns { VideoStabilizationMode } The current video stabilization mode.
2999     * @throws { BusinessError } 7400103 - Session not config.
3000     * @syscap SystemCapability.Multimedia.Camera.Core
3001     * @since 11
3002     */
3003    getActiveVideoStabilizationMode(): VideoStabilizationMode;
3004
3005    /**
3006     * Set video stabilization mode.
3007     *
3008     * @param { VideoStabilizationMode } mode - video stabilization mode to set.
3009     * @throws { BusinessError } 7400103 - Session not config.
3010     * @syscap SystemCapability.Multimedia.Camera.Core
3011     * @since 11
3012     */
3013    setVideoStabilizationMode(mode: VideoStabilizationMode): void;
3014  }
3015
3016  /**
3017   * Enumerates the camera beauty effect types.
3018   *
3019   * @enum { number }
3020   * @syscap SystemCapability.Multimedia.Camera.Core
3021   * @systemapi
3022   * @since 10
3023   */
3024  enum BeautyType {
3025    /**
3026     * Auto beauty type.
3027     *
3028     * @syscap SystemCapability.Multimedia.Camera.Core
3029     * @systemapi
3030     * @since 10
3031     */
3032    AUTO = 0,
3033
3034    /**
3035     * Skin smooth beauty type.
3036     *
3037     * @syscap SystemCapability.Multimedia.Camera.Core
3038     * @systemapi
3039     * @since 10
3040     */
3041    SKIN_SMOOTH = 1,
3042
3043    /**
3044     * Face slender beauty type.
3045     *
3046     * @syscap SystemCapability.Multimedia.Camera.Core
3047     * @systemapi
3048     * @since 10
3049     */
3050    FACE_SLENDER = 2,
3051
3052    /**
3053     * Skin tone beauty type.
3054     *
3055     * @syscap SystemCapability.Multimedia.Camera.Core
3056     * @systemapi
3057     * @since 10
3058     */
3059    SKIN_TONE = 3
3060  }
3061
3062  /**
3063   * Beauty Query object.
3064   *
3065   * @interface BeautyQuery
3066   * @syscap SystemCapability.Multimedia.Camera.Core
3067   * @systemapi
3068   * @since 12
3069   */
3070  interface BeautyQuery {
3071    /**
3072     * Gets supported beauty effect types.
3073     *
3074     * @returns { Array<BeautyType> } List of beauty effect types.
3075     * @throws { BusinessError } 202 - Not System Application.
3076     * @throws { BusinessError } 7400103 - Session not config.
3077     * @syscap SystemCapability.Multimedia.Camera.Core
3078     * @systemapi
3079     * @since 11
3080     */
3081    /**
3082     * Gets supported beauty effect types.
3083     * Move to BeautyQuery from Beauty since 12.
3084     *
3085     * @returns { Array<BeautyType> } List of beauty effect types.
3086     * @throws { BusinessError } 202 - Not System Application.
3087     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3088     * @syscap SystemCapability.Multimedia.Camera.Core
3089     * @systemapi
3090     * @since 12
3091     */
3092    getSupportedBeautyTypes(): Array<BeautyType>;
3093
3094    /**
3095     * Gets the specific beauty effect type range.
3096     *
3097     * @param { BeautyType } type - The type of beauty effect.
3098     * @returns { Array<number> } The array of the specific beauty effect range.
3099     * @throws { BusinessError } 202 - Not System Application.
3100     * @throws { BusinessError } 7400103 - Session not config.
3101     * @syscap SystemCapability.Multimedia.Camera.Core
3102     * @systemapi
3103     * @since 11
3104     */
3105    /**
3106     * Gets the specific beauty effect type range.
3107     * Move to BeautyQuery from Beauty since 12.
3108     *
3109     * @param { BeautyType } type - The type of beauty effect.
3110     * @returns { Array<number> } The array of the specific beauty effect range.
3111     * @throws { BusinessError } 202 - Not System Application.
3112     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3113     * @syscap SystemCapability.Multimedia.Camera.Core
3114     * @systemapi
3115     * @since 12
3116     */
3117    getSupportedBeautyRange(type: BeautyType): Array<number>;
3118  }
3119
3120  /**
3121   * Beauty object.
3122   *
3123   * @interface Beauty
3124   * @syscap SystemCapability.Multimedia.Camera.Core
3125   * @systemapi
3126   * @since 11
3127   */
3128  interface Beauty extends BeautyQuery {
3129    /**
3130     * Gets the beauty effect in use.
3131     *
3132     * @param { BeautyType } type - The type of beauty effect.
3133     * @returns { number } the beauty effect in use.
3134     * @throws { BusinessError } 202 - Not System Application.
3135     * @throws { BusinessError } 7400103 - Session not config.
3136     * @syscap SystemCapability.Multimedia.Camera.Core
3137     * @systemapi
3138     * @since 11
3139     */
3140    getBeauty(type: BeautyType): number;
3141
3142    /**
3143     * Sets a beauty effect for a camera device.
3144     *
3145     * @param { BeautyType } type - The type of beauty effect.
3146     * @param { number } value The number of beauty effect.
3147     * @throws { BusinessError } 202 - Not System Application.
3148     * @throws { BusinessError } 7400103 - Session not config.
3149     * @syscap SystemCapability.Multimedia.Camera.Core
3150     * @systemapi
3151     * @since 11
3152     */
3153    setBeauty(type: BeautyType, value: number): void;
3154  }
3155
3156  /**
3157   * EffectSuggestion object.
3158   *
3159   * @typedef EffectSuggestion
3160   * @syscap SystemCapability.Multimedia.Camera.Core
3161   * @systemapi
3162   * @since 12
3163   */
3164  interface EffectSuggestion {
3165
3166    /**
3167     * Checks whether effect suggestion is supported.
3168     *
3169     * @returns { boolean } Is the effect suggestion supported.
3170     * @throws { BusinessError } 202 - Not System Application.
3171     * @throws { BusinessError } 7400103 - Session not config.
3172     * @syscap SystemCapability.Multimedia.Camera.Core
3173     * @systemapi
3174     * @since 12
3175     */
3176    isEffectSuggestionSupported(): boolean;
3177
3178    /**
3179     * Enable effect suggestion for session.
3180     *
3181     * @param { boolean } enabled enable effect suggestion for session if TRUE..
3182     * @throws { BusinessError } 202 - Not System Application.
3183     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3184     * @throws { BusinessError } 7400103 - Session not config.
3185     * @syscap SystemCapability.Multimedia.Camera.Core
3186     * @systemapi
3187     * @since 12
3188     */
3189    enableEffectSuggestion(enabled: boolean): void;
3190
3191    /**
3192     * Gets supported effect suggestion types.
3193     *
3194     * @returns { Array<EffectSuggestionType> } The array of the effect suggestion types.
3195     * @throws { BusinessError } 202 - Not System Application.
3196     * @throws { BusinessError } 7400103 - Session not config.
3197     * @syscap SystemCapability.Multimedia.Camera.Core
3198     * @systemapi
3199     * @since 12
3200     */
3201    getSupportedEffectSuggestionTypes(): Array<EffectSuggestionType>;
3202
3203    /**
3204     * Set the range of effect suggestion type and enable status.
3205     * The application should fully set all data when it starts up.
3206     *
3207     * @param { Array<EffectSuggestionStatus> } status - The array of the effect suggestion status.
3208     * @throws { BusinessError } 202 - Not System Application.
3209     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3210     * @throws { BusinessError } 7400103 - Session not config.
3211     * @syscap SystemCapability.Multimedia.Camera.Core
3212     * @systemapi
3213     * @since 12
3214     */
3215    setEffectSuggestionStatus(status: Array<EffectSuggestionStatus>): void;
3216  
3217    /**
3218     * Update the enable status of the effect suggestion type.
3219     *
3220     * @param { EffectSuggestionType } type - The type of effect suggestion.
3221     * @param { boolean } enabled - The status of effect suggestion type.
3222     * @throws { BusinessError } 202 - Not System Application.
3223     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3224     * @throws { BusinessError } 7400103 - Session not config.
3225     * @syscap SystemCapability.Multimedia.Camera.Core
3226     * @systemapi
3227     * @since 12
3228     */
3229    updateEffectSuggestion(type: EffectSuggestionType, enabled: boolean): void;
3230  }
3231
3232  /**
3233   * Enumerates the camera color effect types.
3234   *
3235   * @enum { number }
3236   * @syscap SystemCapability.Multimedia.Camera.Core
3237   * @systemapi
3238   * @since 11
3239   */
3240  enum ColorEffectType {
3241    /**
3242     * Normal color effect type.
3243     *
3244     * @syscap SystemCapability.Multimedia.Camera.Core
3245     * @systemapi
3246     * @since 11
3247     */
3248    NORMAL = 0,
3249
3250    /**
3251     * Bright color effect type.
3252     *
3253     * @syscap SystemCapability.Multimedia.Camera.Core
3254     * @systemapi
3255     * @since 11
3256     */
3257    BRIGHT = 1,
3258
3259    /**
3260     * Soft color effect type.
3261     *
3262     * @syscap SystemCapability.Multimedia.Camera.Core
3263     * @systemapi
3264     * @since 11
3265     */
3266    SOFT = 2,
3267
3268    /**
3269     * Black white color effect type.
3270     *
3271     * @syscap SystemCapability.Multimedia.Camera.Core
3272     * @systemapi
3273     * @since 12
3274     */
3275    BLACK_WHITE = 3
3276  }
3277
3278  /**
3279   * Enum for policy type
3280   *
3281   * @enum { number }
3282   * @syscap SystemCapability.Multimedia.Camera.Core
3283   * @systemapi
3284   * @since 12
3285   */
3286  enum PolicyType {
3287    /**
3288     * PRIVACY type.
3289     *
3290     * @syscap SystemCapability.Multimedia.Camera.Core
3291     * @systemapi
3292     * @since 12
3293     */
3294    PRIVACY = 1,
3295  }
3296
3297  /**
3298   * Color Effect Query object.
3299   *
3300   * @interface ColorEffectQuery
3301   * @syscap SystemCapability.Multimedia.Camera.Core
3302   * @systemapi
3303   * @since 12
3304   */
3305  interface ColorEffectQuery {
3306    /**
3307     * Gets supported color effect types.
3308     *
3309     * @returns { Array<ColorEffectType> } List of color effect types.
3310     * @throws { BusinessError } 202 - Not System Application.
3311     * @throws { BusinessError } 7400103 - Session not config.
3312     * @syscap SystemCapability.Multimedia.Camera.Core
3313     * @systemapi
3314     * @since 11
3315     */
3316    /**
3317     * Gets supported color effect types.
3318     * Move to ColorEffectQuery from ColorEffect since 12.
3319     *
3320     * @returns { Array<ColorEffectType> } List of color effect types.
3321     * @throws { BusinessError } 202 - Not System Application.
3322     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3323     * @syscap SystemCapability.Multimedia.Camera.Core
3324     * @systemapi
3325     * @since 12
3326     */
3327    getSupportedColorEffects(): Array<ColorEffectType>;
3328  }
3329
3330  /**
3331   * Color effect object.
3332   *
3333   * @interface ColorEffect
3334   * @syscap SystemCapability.Multimedia.Camera.Core
3335   * @systemapi
3336   * @since 11
3337   */
3338  interface ColorEffect extends ColorEffectQuery {
3339    /**
3340     * Gets the specific color effect type.
3341     *
3342     * @returns { ColorEffectType } The array of the specific color effect type.
3343     * @throws { BusinessError } 202 - Not System Application.
3344     * @throws { BusinessError } 7400103 - Session not config.
3345     * @syscap SystemCapability.Multimedia.Camera.Core
3346     * @systemapi
3347     * @since 11
3348     */
3349    getColorEffect(): ColorEffectType;
3350
3351    /**
3352     * Sets a color effect for a camera device.
3353     *
3354     * @param { ColorEffectType } type - The type of color effect.
3355     * @throws { BusinessError } 202 - Not System Application.
3356     * @throws { BusinessError } 7400103 - Session not config.
3357     * @syscap SystemCapability.Multimedia.Camera.Core
3358     * @systemapi
3359     * @since 11
3360     */
3361    setColorEffect(type: ColorEffectType): void;
3362  }
3363
3364  /**
3365   * Color Management Query object.
3366   *
3367   * @interface ColorManagementQuery
3368   * @syscap SystemCapability.Multimedia.Camera.Core
3369   * @since 12
3370   */
3371  interface ColorManagementQuery {
3372    /**
3373     * Gets the supported color space types.
3374     *
3375     * @returns { Array<colorSpaceManager.ColorSpace> } The array of the supported color space for the session.
3376     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3377     * @syscap SystemCapability.Multimedia.Camera.Core
3378     * @since 12
3379     */
3380    getSupportedColorSpaces(): Array<colorSpaceManager.ColorSpace>;
3381  }
3382
3383  /**
3384   * Color Management object.
3385   *
3386   * @interface ColorManagement
3387   * @syscap SystemCapability.Multimedia.Camera.Core
3388   * @since 12
3389   */
3390  interface ColorManagement extends ColorManagementQuery {
3391    /**
3392     * Gets the specific color space type.
3393     *
3394     * @returns { colorSpaceManager.ColorSpace } Current color space.
3395     * @throws { BusinessError } 7400103 - Session not config.
3396     * @syscap SystemCapability.Multimedia.Camera.Core
3397     * @since 12
3398     */
3399    getActiveColorSpace(): colorSpaceManager.ColorSpace;
3400
3401    /**
3402     * Sets a color space for the session.
3403     *
3404     * @param { colorSpaceManager.ColorSpace } colorSpace - The type of color space.
3405     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3406     * @throws { BusinessError } 7400102 - The colorSpace does not match the format.
3407     * @throws { BusinessError } 7400103 - Session not config.
3408     * @throws { BusinessError } 7400201 - Camera service fatal error.
3409     * @syscap SystemCapability.Multimedia.Camera.Core
3410     * @since 12
3411     */
3412    setColorSpace(colorSpace: colorSpaceManager.ColorSpace): void;
3413  }
3414
3415  /**
3416   * Macro Query object.
3417   *
3418   * @interface MacroQuery
3419   * @syscap SystemCapability.Multimedia.Camera.Core
3420   * @systemapi
3421   * @since 12
3422   */
3423  interface MacroQuery {
3424    /**
3425     * Determine whether camera macro is supported.
3426     *
3427     * @returns { boolean } Is camera macro supported.
3428     * @throws { BusinessError } 202 - Not System Application.
3429     * @syscap SystemCapability.Multimedia.Camera.Core
3430     * @systemapi
3431     * @since 11
3432     */
3433    /**
3434     * Determine whether camera macro is supported.
3435     * Move to MacroQuery interface from Macro since 12.
3436     *
3437     * @returns { boolean } Is camera macro supported.
3438     * @throws { BusinessError } 202 - Not System Application.
3439     * @syscap SystemCapability.Multimedia.Camera.Core
3440     * @systemapi
3441     * @since 12
3442     */
3443    isMacroSupported(): boolean;
3444  }
3445
3446  /**
3447   * Macro object.
3448   *
3449   * @interface Macro
3450   * @syscap SystemCapability.Multimedia.Camera.Core
3451   * @systemapi
3452   * @since 11
3453   */
3454  interface Macro extends MacroQuery {
3455    /**
3456     * Enable macro for camera.
3457     *
3458     * @param { boolean } enabled - enable macro for camera if TRUE.
3459     * @throws { BusinessError } 202 - Not System Application.
3460     * @throws { BusinessError } 7400103 - Session not config.
3461     * @syscap SystemCapability.Multimedia.Camera.Core
3462     * @systemapi
3463     * @since 11
3464     */
3465    /**
3466     * Enable macro for camera.
3467     *
3468     * @param { boolean } enabled - enable macro for camera if TRUE.
3469     * @throws { BusinessError } 202 - Not System Application.
3470     * @throws { BusinessError } 7400102 - Operation not allowed.
3471     * @throws { BusinessError } 7400103 - Session not config.
3472     * @syscap SystemCapability.Multimedia.Camera.Core
3473     * @systemapi
3474     * @since 12
3475     */
3476    enableMacro(enabled: boolean): void;
3477  }
3478
3479  /**
3480   * Enum for usage type used in capture session.
3481   *
3482   * @enum { number }
3483   * @syscap SystemCapability.Multimedia.Camera.Core
3484   * @systemapi
3485   * @since 12
3486   */
3487  enum UsageType {
3488    /**
3489     * Bokeh usage type.
3490     *
3491     * @syscap SystemCapability.Multimedia.Camera.Core
3492     * @systemapi
3493     * @since 12
3494     */
3495    BOKEH = 0
3496  }
3497
3498  /**
3499   * Session object.
3500   *
3501   * @interface Session
3502   * @syscap SystemCapability.Multimedia.Camera.Core
3503   * @since 11
3504   */
3505  interface Session {
3506    /**
3507     * Begin capture session config.
3508     *
3509     * @throws { BusinessError } 7400105 - Session config locked.
3510     * @syscap SystemCapability.Multimedia.Camera.Core
3511     * @since 11
3512     */
3513    /**
3514     * Begin capture session config.
3515     *
3516     * @throws { BusinessError } 7400105 - Session config locked.
3517     * @throws { BusinessError } 7400201 - Camera service fatal error.
3518     * @syscap SystemCapability.Multimedia.Camera.Core
3519     * @since 12
3520     */
3521    beginConfig(): void;
3522
3523    /**
3524     * Commit capture session config.
3525     *
3526     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3527     * @throws { BusinessError } 7400102 - Operation not allowed.
3528     * @throws { BusinessError } 7400201 - Camera service fatal error.
3529     * @syscap SystemCapability.Multimedia.Camera.Core
3530     * @since 11
3531     */
3532    commitConfig(callback: AsyncCallback<void>): void;
3533
3534    /**
3535     * Commit capture session config.
3536     *
3537     * @returns { Promise<void> } Promise used to return the result.
3538     * @throws { BusinessError } 7400102 - Operation not allowed.
3539     * @throws { BusinessError } 7400201 - Camera service fatal error.
3540     * @syscap SystemCapability.Multimedia.Camera.Core
3541     * @since 11
3542     */
3543    commitConfig(): Promise<void>;
3544
3545    /**
3546     * Determines whether the camera input can be added into the session.
3547     * This method is valid between Session.beginConfig() and Session.commitConfig().
3548     *
3549     * @param { CameraInput } cameraInput - Target camera input to add.
3550     * @returns { boolean } You can add the input into the session.
3551     * @syscap SystemCapability.Multimedia.Camera.Core
3552     * @since 11
3553     */
3554    canAddInput(cameraInput: CameraInput): boolean;
3555
3556    /**
3557     * Adds a camera input.
3558     * This method is valid between Session.beginConfig() and Session.commitConfig().
3559     *
3560     * @param { CameraInput } cameraInput - Target camera input to add.
3561     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3562     * @throws { BusinessError } 7400102 - Operation not allowed.
3563     * @throws { BusinessError } 7400103 - Session not config.
3564     * @syscap SystemCapability.Multimedia.Camera.Core
3565     * @since 11
3566     */
3567    /**
3568     * Adds a camera input.
3569     * This method is valid between Session.beginConfig() and Session.commitConfig().
3570     *
3571     * @param { CameraInput } cameraInput - Target camera input to add.
3572     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3573     * @throws { BusinessError } 7400102 - Operation not allowed.
3574     * @throws { BusinessError } 7400103 - Session not config.
3575     * @throws { BusinessError } 7400201 - Camera service fatal error.
3576     * @syscap SystemCapability.Multimedia.Camera.Core
3577     * @since 12
3578     */
3579    addInput(cameraInput: CameraInput): void;
3580
3581    /**
3582     * Removes a camera input.
3583     * This method is valid between Session.beginConfig() and Session.commitConfig().
3584     *
3585     * @param { CameraInput } cameraInput - Target camera input to remove.
3586     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3587     * @throws { BusinessError } 7400102 - Operation not allowed.
3588     * @throws { BusinessError } 7400103 - Session not config.
3589     * @syscap SystemCapability.Multimedia.Camera.Core
3590     * @since 11
3591     */
3592    /**
3593     * Removes a camera input.
3594     * This method is valid between Session.beginConfig() and Session.commitConfig().
3595     *
3596     * @param { CameraInput } cameraInput - Target camera input to remove.
3597     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3598     * @throws { BusinessError } 7400102 - Operation not allowed.
3599     * @throws { BusinessError } 7400103 - Session not config.
3600     * @throws { BusinessError } 7400201 - Camera service fatal error.
3601     * @syscap SystemCapability.Multimedia.Camera.Core
3602     * @since 12
3603     */
3604    removeInput(cameraInput: CameraInput): void;
3605
3606    /**
3607     * Determines whether the camera output can be added into the session.
3608     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3609     *
3610     * @param { CameraOutput } cameraOutput - Target camera output to add.
3611     * @returns { boolean } You can add the output into the session.
3612     * @syscap SystemCapability.Multimedia.Camera.Core
3613     * @since 11
3614     */
3615    canAddOutput(cameraOutput: CameraOutput): boolean;
3616
3617    /**
3618     * Adds a camera output.
3619     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3620     *
3621     * @param { CameraOutput } cameraOutput - Target camera output to add.
3622     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3623     * @throws { BusinessError } 7400102 - Operation not allowed.
3624     * @throws { BusinessError } 7400103 - Session not config.
3625     * @syscap SystemCapability.Multimedia.Camera.Core
3626     * @since 11
3627     */
3628    /**
3629     * Adds a camera output.
3630     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3631     *
3632     * @param { CameraOutput } cameraOutput - Target camera output to add.
3633     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3634     * @throws { BusinessError } 7400102 - Operation not allowed.
3635     * @throws { BusinessError } 7400103 - Session not config.
3636     * @throws { BusinessError } 7400201 - Camera service fatal error.
3637     * @syscap SystemCapability.Multimedia.Camera.Core
3638     * @since 12
3639     */
3640    addOutput(cameraOutput: CameraOutput): void;
3641
3642    /**
3643     * Removes a camera output.
3644     * This method is valid between Session.beginConfig() and Session.commitConfig().
3645     *
3646     * @param { CameraOutput } cameraOutput - Target camera output to remove.
3647     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3648     * @throws { BusinessError } 7400102 - Operation not allowed.
3649     * @throws { BusinessError } 7400103 - Session not config.
3650     * @syscap SystemCapability.Multimedia.Camera.Core
3651     * @since 11
3652     */
3653    /**
3654     * Removes a camera output.
3655     * This method is valid between Session.beginConfig() and Session.commitConfig().
3656     *
3657     * @param { CameraOutput } cameraOutput - Target camera output to remove.
3658     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3659     * @throws { BusinessError } 7400102 - Operation not allowed.
3660     * @throws { BusinessError } 7400103 - Session not config.
3661     * @throws { BusinessError } 7400201 - Camera service fatal error.
3662     * @syscap SystemCapability.Multimedia.Camera.Core
3663     * @since 12
3664     */
3665    removeOutput(cameraOutput: CameraOutput): void;
3666
3667    /**
3668     * Starts capture session.
3669     *
3670     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3671     * @throws { BusinessError } 7400103 - Session not config.
3672     * @throws { BusinessError } 7400201 - Camera service fatal error.
3673     * @syscap SystemCapability.Multimedia.Camera.Core
3674     * @since 11
3675     */
3676    /**
3677     * Starts capture session.
3678     *
3679     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3680     * @throws { BusinessError } 7400102 - Operation not allowed.
3681     * @throws { BusinessError } 7400103 - Session not config.
3682     * @throws { BusinessError } 7400201 - Camera service fatal error.
3683     * @syscap SystemCapability.Multimedia.Camera.Core
3684     * @since 12
3685     */
3686    start(callback: AsyncCallback<void>): void;
3687
3688    /**
3689     * Starts capture session.
3690     *
3691     * @returns { Promise<void> } Promise used to return the result.
3692     * @throws { BusinessError } 7400103 - Session not config.
3693     * @throws { BusinessError } 7400201 - Camera service fatal error.
3694     * @syscap SystemCapability.Multimedia.Camera.Core
3695     * @since 11
3696     */
3697    /**
3698     * Starts capture session.
3699     *
3700     * @returns { Promise<void> } Promise used to return the result.
3701     * @throws { BusinessError } 7400102 - Operation not allowed.
3702     * @throws { BusinessError } 7400103 - Session not config.
3703     * @throws { BusinessError } 7400201 - Camera service fatal error.
3704     * @syscap SystemCapability.Multimedia.Camera.Core
3705     * @since 12
3706     */
3707    start(): Promise<void>;
3708
3709    /**
3710     * Stops capture session.
3711     *
3712     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3713     * @throws { BusinessError } 7400201 - Camera service fatal error.
3714     * @syscap SystemCapability.Multimedia.Camera.Core
3715     * @since 11
3716     */
3717    stop(callback: AsyncCallback<void>): void;
3718
3719    /**
3720     * Stops capture session.
3721     *
3722     * @returns { Promise<void> } Promise used to return the result.
3723     * @throws { BusinessError } 7400201 - Camera service fatal error.
3724     * @syscap SystemCapability.Multimedia.Camera.Core
3725     * @since 11
3726     */
3727    stop(): Promise<void>;
3728
3729    /**
3730     * Release capture session instance.
3731     *
3732     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3733     * @throws { BusinessError } 7400201 - Camera service fatal error.
3734     * @syscap SystemCapability.Multimedia.Camera.Core
3735     * @since 11
3736     */
3737    release(callback: AsyncCallback<void>): void;
3738
3739    /**
3740     * Release capture session instance.
3741     *
3742     * @returns { Promise<void> } Promise used to return the result.
3743     * @throws { BusinessError } 7400201 - Camera service fatal error.
3744     * @syscap SystemCapability.Multimedia.Camera.Core
3745     * @since 11
3746     */
3747    release(): Promise<void>;
3748
3749    /**
3750     * Set usage for the capture session.
3751     *
3752     * @param { UsageType } usage - The capture session usage.
3753     * @param { boolean } enabled - Enable usage for session if TRUE.
3754     * @throws { BusinessError } 202 - Not System Application.
3755     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3756     * @throws { BusinessError } 7400102 - Operation not allowed.
3757     * @throws { BusinessError } 7400103 - Session not config.
3758     * @throws { BusinessError } 7400201 - Camera service fatal error.
3759     * @syscap SystemCapability.Multimedia.Camera.Core
3760     * @systemapi
3761     * @since 12
3762     */
3763    setUsage(usage: UsageType, enabled: boolean): void;
3764
3765    /**
3766     * Get the supported camera output capability set.
3767     *
3768     * @param { CameraDevice } camera - Camera device.
3769     * @returns { Array<CameraOutputCapability> } The array of the output capability.
3770     * @throws { BusinessError } 202 - Not System Application.
3771     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3772     * @throws { BusinessError } 7400201 - Camera service fatal error.
3773     * @syscap SystemCapability.Multimedia.Camera.Core
3774     * @systemapi
3775     * @since 12
3776     */
3777    getCameraOutputCapabilities(camera: CameraDevice): Array<CameraOutputCapability>;
3778  }
3779
3780  /**
3781   * Capture session object.
3782   *
3783   * @interface CaptureSession
3784   * @syscap SystemCapability.Multimedia.Camera.Core
3785   * @since 10
3786   * @deprecated since 11
3787   * @useinstead ohos.multimedia.camera.VideoSession
3788   */
3789  interface CaptureSession {
3790    /**
3791     * Begin capture session config.
3792     *
3793     * @throws { BusinessError } 7400105 - Session config locked.
3794     * @syscap SystemCapability.Multimedia.Camera.Core
3795     * @since 10
3796     * @deprecated since 11
3797     * @useinstead ohos.multimedia.camera.Session#beginConfig
3798     */
3799    beginConfig(): void;
3800
3801    /**
3802     * Commit capture session config.
3803     *
3804     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3805     * @throws { BusinessError } 7400102 - Operation not allowed.
3806     * @throws { BusinessError } 7400201 - Camera service fatal error.
3807     * @syscap SystemCapability.Multimedia.Camera.Core
3808     * @since 10
3809     * @deprecated since 11
3810     * @useinstead ohos.multimedia.camera.Session#commitConfig
3811     */
3812    commitConfig(callback: AsyncCallback<void>): void;
3813
3814    /**
3815     * Commit capture session config.
3816     *
3817     * @returns { Promise<void> } Promise used to return the result.
3818     * @throws { BusinessError } 7400102 - Operation not allowed.
3819     * @throws { BusinessError } 7400201 - Camera service fatal error.
3820     * @syscap SystemCapability.Multimedia.Camera.Core
3821     * @since 10
3822     * @deprecated since 11
3823     * @useinstead ohos.multimedia.camera.Session#commitConfig
3824     */
3825    commitConfig(): Promise<void>;
3826
3827    /**
3828     * Adds a camera input.
3829     *
3830     * @param { CameraInput } cameraInput - Target camera input to add.
3831     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3832     * @throws { BusinessError } 7400102 - Operation not allowed.
3833     * @syscap SystemCapability.Multimedia.Camera.Core
3834     * @since 10
3835     * @deprecated since 11
3836     * @useinstead ohos.multimedia.camera.Session#addInput
3837     */
3838    addInput(cameraInput: CameraInput): void;
3839
3840    /**
3841     * Removes a camera input.
3842     *
3843     * @param { CameraInput } cameraInput - Target camera input to remove.
3844     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3845     * @throws { BusinessError } 7400102 - Operation not allowed.
3846     * @syscap SystemCapability.Multimedia.Camera.Core
3847     * @since 10
3848     * @deprecated since 11
3849     * @useinstead ohos.multimedia.camera.Session#removeInput
3850     */
3851    removeInput(cameraInput: CameraInput): void;
3852
3853    /**
3854     * Adds a camera output.
3855     *
3856     * @param { CameraOutput } cameraOutput - Target camera output to add.
3857     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3858     * @throws { BusinessError } 7400102 - Operation not allowed.
3859     * @syscap SystemCapability.Multimedia.Camera.Core
3860     * @since 10
3861     * @deprecated since 11
3862     * @useinstead ohos.multimedia.camera.Session#addOutput
3863     */
3864    addOutput(cameraOutput: CameraOutput): void;
3865
3866    /**
3867     * Removes a camera output.
3868     *
3869     * @param { CameraOutput } cameraOutput - Target camera output to remove.
3870     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3871     * @throws { BusinessError } 7400102 - Operation not allowed.
3872     * @syscap SystemCapability.Multimedia.Camera.Core
3873     * @since 10
3874     * @deprecated since 11
3875     * @useinstead ohos.multimedia.camera.Session#removeOutput
3876     */
3877    removeOutput(cameraOutput: CameraOutput): void;
3878
3879    /**
3880     * Starts capture session.
3881     *
3882     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3883     * @throws { BusinessError } 7400103 - Session not config.
3884     * @throws { BusinessError } 7400201 - Camera service fatal error.
3885     * @syscap SystemCapability.Multimedia.Camera.Core
3886     * @since 10
3887     * @deprecated since 11
3888     * @useinstead ohos.multimedia.camera.Session#start
3889     */
3890    start(callback: AsyncCallback<void>): void;
3891
3892    /**
3893     * Starts capture session.
3894     *
3895     * @returns { Promise<void> } Promise used to return the result.
3896     * @throws { BusinessError } 7400103 - Session not config.
3897     * @throws { BusinessError } 7400201 - Camera service fatal error.
3898     * @syscap SystemCapability.Multimedia.Camera.Core
3899     * @since 10
3900     * @deprecated since 11
3901     * @useinstead ohos.multimedia.camera.Session#start
3902     */
3903    start(): Promise<void>;
3904
3905    /**
3906     * Stops capture session.
3907     *
3908     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3909     * @throws { BusinessError } 7400201 - Camera service fatal error.
3910     * @syscap SystemCapability.Multimedia.Camera.Core
3911     * @since 10
3912     * @deprecated since 11
3913     * @useinstead ohos.multimedia.camera.Session#stop
3914     */
3915    stop(callback: AsyncCallback<void>): void;
3916
3917    /**
3918     * Stops capture session.
3919     *
3920     * @returns { Promise<void> } Promise used to return the result.
3921     * @throws { BusinessError } 7400201 - Camera service fatal error.
3922     * @syscap SystemCapability.Multimedia.Camera.Core
3923     * @since 10
3924     * @deprecated since 11
3925     * @useinstead ohos.multimedia.camera.Session#stop
3926     */
3927    stop(): Promise<void>;
3928
3929    /**
3930     * Release capture session instance.
3931     *
3932     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3933     * @throws { BusinessError } 7400201 - Camera service fatal error.
3934     * @syscap SystemCapability.Multimedia.Camera.Core
3935     * @since 10
3936     * @deprecated since 11
3937     * @useinstead ohos.multimedia.camera.Session#release
3938     */
3939    release(callback: AsyncCallback<void>): void;
3940
3941    /**
3942     * Release capture session instance.
3943     *
3944     * @returns { Promise<void> } Promise used to return the result.
3945     * @throws { BusinessError } 7400201 - Camera service fatal error.
3946     * @syscap SystemCapability.Multimedia.Camera.Core
3947     * @since 10
3948     * @deprecated since 11
3949     * @useinstead ohos.multimedia.camera.Session#release
3950     */
3951    release(): Promise<void>;
3952
3953    /**
3954     * Check if device has flash light.
3955     *
3956     * @returns { boolean } The flash light support status.
3957     * @throws { BusinessError } 7400103 - Session not config.
3958     * @syscap SystemCapability.Multimedia.Camera.Core
3959     * @since 10
3960     * @deprecated since 11
3961     * @useinstead ohos.multimedia.camera.Flash#hasFlash
3962     */
3963    hasFlash(): boolean;
3964
3965    /**
3966     * Checks whether a specified flash mode is supported.
3967     *
3968     * @param { FlashMode } flashMode - Flash mode
3969     * @returns { boolean } Is the flash mode supported.
3970     * @throws { BusinessError } 7400103 - Session not config.
3971     * @syscap SystemCapability.Multimedia.Camera.Core
3972     * @since 10
3973     * @deprecated since 11
3974     * @useinstead ohos.multimedia.camera.Flash#isFlashModeSupported
3975     */
3976    isFlashModeSupported(flashMode: FlashMode): boolean;
3977
3978    /**
3979     * Gets current flash mode.
3980     *
3981     * @returns { FlashMode } The current flash mode.
3982     * @throws { BusinessError } 7400103 - Session not config.
3983     * @syscap SystemCapability.Multimedia.Camera.Core
3984     * @since 10
3985     * @deprecated since 11
3986     * @useinstead ohos.multimedia.camera.Flash#getFlashMode
3987     */
3988    getFlashMode(): FlashMode;
3989
3990    /**
3991     * Sets flash mode.
3992     *
3993     * @param { FlashMode } flashMode - Target flash mode.
3994     * @throws { BusinessError } 7400103 - Session not config.
3995     * @syscap SystemCapability.Multimedia.Camera.Core
3996     * @since 10
3997     * @deprecated since 11
3998     * @useinstead ohos.multimedia.camera.Flash#setFlashMode
3999     */
4000    setFlashMode(flashMode: FlashMode): void;
4001
4002    /**
4003     * Checks whether a specified exposure mode is supported.
4004     *
4005     * @param { ExposureMode } aeMode - Exposure mode
4006     * @returns { boolean } Is the exposure mode supported.
4007     * @throws { BusinessError } 7400103 - Session not config.
4008     * @syscap SystemCapability.Multimedia.Camera.Core
4009     * @since 10
4010     * @deprecated since 11
4011     * @useinstead ohos.multimedia.camera.AutoExposure#isExposureModeSupported
4012     */
4013    isExposureModeSupported(aeMode: ExposureMode): boolean;
4014
4015    /**
4016     * Gets current exposure mode.
4017     *
4018     * @returns { ExposureMode } The current exposure mode.
4019     * @throws { BusinessError } 7400103 - Session not config.
4020     * @syscap SystemCapability.Multimedia.Camera.Core
4021     * @since 10
4022     * @deprecated since 11
4023     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureMode
4024     */
4025    getExposureMode(): ExposureMode;
4026
4027    /**
4028     * Sets Exposure mode.
4029     *
4030     * @param { ExposureMode } aeMode - Exposure mode
4031     * @throws { BusinessError } 7400103 - Session not config.
4032     * @syscap SystemCapability.Multimedia.Camera.Core
4033     * @since 10
4034     * @deprecated since 11
4035     * @useinstead ohos.multimedia.camera.AutoExposure#setExposureMode
4036     */
4037    setExposureMode(aeMode: ExposureMode): void;
4038
4039    /**
4040     * Gets current metering point.
4041     *
4042     * @returns { Point } The current metering point.
4043     * @throws { BusinessError } 7400103 - Session not config.
4044     * @syscap SystemCapability.Multimedia.Camera.Core
4045     * @since 10
4046     * @deprecated since 11
4047     * @useinstead ohos.multimedia.camera.AutoExposure#getMeteringPoint
4048     */
4049    getMeteringPoint(): Point;
4050
4051    /**
4052     * Set the center point of the metering area.
4053     *
4054     * @param { Point } point - metering point
4055     * @throws { BusinessError } 7400103 - Session not config.
4056     * @syscap SystemCapability.Multimedia.Camera.Core
4057     * @since 10
4058     * @deprecated since 11
4059     * @useinstead ohos.multimedia.camera.AutoExposure#setMeteringPoint
4060     */
4061    setMeteringPoint(point: Point): void;
4062
4063    /**
4064     * Query the exposure compensation range.
4065     *
4066     * @returns { Array<number> } The array of compensation range.
4067     * @throws { BusinessError } 7400103 - Session not config.
4068     * @syscap SystemCapability.Multimedia.Camera.Core
4069     * @since 10
4070     * @deprecated since 11
4071     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureBiasRange
4072     */
4073    getExposureBiasRange(): Array<number>;
4074
4075    /**
4076     * Set exposure compensation.
4077     *
4078     * @param { number } exposureBias - Exposure compensation
4079     * @throws { BusinessError } 7400103 - Session not config.
4080     * @syscap SystemCapability.Multimedia.Camera.Core
4081     * @since 10
4082     * @deprecated since 11
4083     * @useinstead ohos.multimedia.camera.AutoExposure#setExposureBias
4084     */
4085    setExposureBias(exposureBias: number): void;
4086
4087    /**
4088     * Query the exposure value.
4089     *
4090     * @returns { number } The exposure value.
4091     * @throws { BusinessError } 7400103 - Session not config.
4092     * @syscap SystemCapability.Multimedia.Camera.Core
4093     * @since 10
4094     * @deprecated since 11
4095     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureValue
4096     */
4097    getExposureValue(): number;
4098
4099    /**
4100     * Checks whether a specified focus mode is supported.
4101     *
4102     * @param { FocusMode } afMode - Focus mode.
4103     * @returns { boolean } Is the focus mode supported.
4104     * @throws { BusinessError } 7400103 - Session not config.
4105     * @syscap SystemCapability.Multimedia.Camera.Core
4106     * @since 10
4107     * @deprecated since 11
4108     * @useinstead ohos.multimedia.camera.Focus#isFocusModeSupported
4109     */
4110    isFocusModeSupported(afMode: FocusMode): boolean;
4111
4112    /**
4113     * Gets current focus mode.
4114     *
4115     * @returns { FocusMode } The current focus mode.
4116     * @throws { BusinessError } 7400103 - Session not config.
4117     * @syscap SystemCapability.Multimedia.Camera.Core
4118     * @since 10
4119     * @deprecated since 11
4120     * @useinstead ohos.multimedia.camera.Focus#getFocusMode
4121     */
4122    getFocusMode(): FocusMode;
4123
4124    /**
4125     * Sets focus mode.
4126     *
4127     * @param { FocusMode } afMode - Target focus mode.
4128     * @throws { BusinessError } 7400103 - Session not config.
4129     * @syscap SystemCapability.Multimedia.Camera.Core
4130     * @since 10
4131     * @deprecated since 11
4132     * @useinstead ohos.multimedia.camera.Focus#setFocusMode
4133     */
4134    setFocusMode(afMode: FocusMode): void;
4135
4136    /**
4137     * Sets focus point.
4138     *
4139     * @param { Point } point - Target focus point.
4140     * @throws { BusinessError } 7400103 - Session not config.
4141     * @syscap SystemCapability.Multimedia.Camera.Core
4142     * @since 10
4143     * @deprecated since 11
4144     * @useinstead ohos.multimedia.camera.Focus#setFocusPoint
4145     */
4146    setFocusPoint(point: Point): void;
4147
4148    /**
4149     * Gets current focus point.
4150     *
4151     * @returns { Point } The current focus point.
4152     * @throws { BusinessError } 7400103 - Session not config.
4153     * @syscap SystemCapability.Multimedia.Camera.Core
4154     * @since 10
4155     * @deprecated since 11
4156     * @useinstead ohos.multimedia.camera.Focus#getFocusPoint
4157     */
4158    getFocusPoint(): Point;
4159
4160    /**
4161     * Gets current focal length.
4162     *
4163     * @returns { number } The current focal point.
4164     * @throws { BusinessError } 7400103 - Session not config.
4165     * @syscap SystemCapability.Multimedia.Camera.Core
4166     * @since 10
4167     * @deprecated since 11
4168     * @useinstead ohos.multimedia.camera.Focus#getFocalLength
4169     */
4170    getFocalLength(): number;
4171
4172    /**
4173     * Gets all supported zoom ratio range.
4174     *
4175     * @returns { Array<number> } The zoom ratio range.
4176     * @throws { BusinessError } 7400103 - Session not config.
4177     * @syscap SystemCapability.Multimedia.Camera.Core
4178     * @since 10
4179     * @deprecated since 11
4180     * @useinstead ohos.multimedia.camera.Zoom#getZoomRatioRange
4181     */
4182    getZoomRatioRange(): Array<number>;
4183
4184    /**
4185     * Gets zoom ratio.
4186     *
4187     * @returns { number } The zoom ratio value.
4188     * @throws { BusinessError } 7400103 - Session not config.
4189     * @syscap SystemCapability.Multimedia.Camera.Core
4190     * @since 10
4191     * @deprecated since 11
4192     * @useinstead ohos.multimedia.camera.Zoom#getZoomRatio
4193     */
4194    getZoomRatio(): number;
4195
4196    /**
4197     * Sets zoom ratio.
4198     *
4199     * @param { number } zoomRatio - Target zoom ratio.
4200     * @throws { BusinessError } 7400103 - Session not config.
4201     * @syscap SystemCapability.Multimedia.Camera.Core
4202     * @since 10
4203     * @deprecated since 11
4204     * @useinstead ohos.multimedia.camera.Zoom#setZoomRatio
4205     */
4206    setZoomRatio(zoomRatio: number): void;
4207
4208    /**
4209     * Check whether the specified video stabilization mode is supported.
4210     *
4211     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
4212     * @returns { boolean } Is flash mode supported.
4213     * @throws { BusinessError } 7400103 - Session not config.
4214     * @syscap SystemCapability.Multimedia.Camera.Core
4215     * @since 10
4216     * @deprecated since 11
4217     * @useinstead ohos.multimedia.camera.Stabilization#isVideoStabilizationModeSupported
4218     */
4219    isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
4220
4221    /**
4222     * Query the video stabilization mode currently in use.
4223     *
4224     * @returns { VideoStabilizationMode } The current video stabilization mode.
4225     * @throws { BusinessError } 7400103 - Session not config.
4226     * @syscap SystemCapability.Multimedia.Camera.Core
4227     * @since 10
4228     * @deprecated since 11
4229     * @useinstead ohos.multimedia.camera.Stabilization#getActiveVideoStabilizationMode
4230     */
4231    getActiveVideoStabilizationMode(): VideoStabilizationMode;
4232
4233    /**
4234     * Set video stabilization mode.
4235     *
4236     * @param { VideoStabilizationMode } mode - video stabilization mode to set.
4237     * @throws { BusinessError } 7400103 - Session not config.
4238     * @syscap SystemCapability.Multimedia.Camera.Core
4239     * @since 10
4240     * @deprecated since 11
4241     * @useinstead ohos.multimedia.camera.Stabilization#setVideoStabilizationMode
4242     */
4243    setVideoStabilizationMode(mode: VideoStabilizationMode): void;
4244
4245    /**
4246     * Subscribes focus status change event callback.
4247     *
4248     * @param { 'focusStateChange' } type - Event type.
4249     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4250     * @syscap SystemCapability.Multimedia.Camera.Core
4251     * @since 10
4252     * @deprecated since 11
4253     * @useinstead ohos.multimedia.camera.VideoSession#on
4254     */
4255    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4256
4257    /**
4258     * Unsubscribes from focus status change event callback.
4259     *
4260     * @param { 'focusStateChange' } type - Event type.
4261     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4262     * @syscap SystemCapability.Multimedia.Camera.Core
4263     * @since 10
4264     * @deprecated since 11
4265     * @useinstead ohos.multimedia.camera.VideoSession#off
4266     */
4267    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4268
4269    /**
4270     * Subscribes to error events.
4271     *
4272     * @param { 'error' } type - Event type.
4273     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4274     * @syscap SystemCapability.Multimedia.Camera.Core
4275     * @since 10
4276     * @deprecated since 11
4277     * @useinstead ohos.multimedia.camera.VideoSession#on
4278     */
4279    on(type: 'error', callback: ErrorCallback): void;
4280
4281    /**
4282     * Unsubscribes from error events.
4283     *
4284     * @param { 'error' } type - Event type.
4285     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4286     * @syscap SystemCapability.Multimedia.Camera.Core
4287     * @since 10
4288     * @deprecated since 11
4289     * @useinstead ohos.multimedia.camera.VideoSession#off
4290     */
4291    off(type: 'error', callback?: ErrorCallback): void;
4292
4293    /**
4294     * Gets supported beauty effect types.
4295     *
4296     * @returns { Array<BeautyType> } List of beauty effect types.
4297     * @throws { BusinessError } 7400103 - Session not config.
4298     * @syscap SystemCapability.Multimedia.Camera.Core
4299     * @systemapi
4300     * @since 10
4301     * @deprecated since 11
4302     * @useinstead ohos.multimedia.camera.Beauty#getSupportedBeautyTypes
4303     */
4304    getSupportedBeautyTypes(): Array<BeautyType>;
4305
4306    /**
4307     * Gets the specific beauty effect type range.
4308     *
4309     * @param { BeautyType } type - The type of beauty effect.
4310     * @returns { Array<number> } The array of the specific beauty effect range.
4311     * @throws { BusinessError } 7400103 - Session not config.
4312     * @syscap SystemCapability.Multimedia.Camera.Core
4313     * @systemapi
4314     * @since 10
4315     * @deprecated since 11
4316     * @useinstead ohos.multimedia.camera.Beauty#getSupportedBeautyRange
4317     */
4318    getSupportedBeautyRange(type: BeautyType): Array<number>;
4319
4320    /**
4321     * Gets the beauty effect in use.
4322     *
4323     * @param { BeautyType } type - The type of beauty effect.
4324     * @returns { number } the beauty effect in use.
4325     * @throws { BusinessError } 7400103 - Session not config.
4326     * @syscap SystemCapability.Multimedia.Camera.Core
4327     * @systemapi
4328     * @since 10
4329     * @deprecated since 11
4330     * @useinstead ohos.multimedia.camera.Beauty#getBeauty
4331     */
4332    getBeauty(type: BeautyType): number;
4333
4334    /**
4335     * Sets a beauty effect for a camera device.
4336     *
4337     * @param { BeautyType } type - The type of beauty effect.
4338     * @param { number } value The number of beauty effect.
4339     * @throws { BusinessError } 7400103 - Session not config.
4340     * @syscap SystemCapability.Multimedia.Camera.Core
4341     * @systemapi
4342     * @since 10
4343     * @deprecated since 11
4344     * @useinstead ohos.multimedia.camera.Beauty#setBeauty
4345     */
4346    setBeauty(type: BeautyType, value: number): void;
4347  }
4348
4349  /**
4350   * Types of preconfig, which used to configure session conveniently.
4351   * Preconfig type contains common use cases of camera output.
4352   *
4353   * @enum { number }
4354   * @syscap SystemCapability.Multimedia.Camera.Core
4355   * @since 12
4356   */
4357  enum PreconfigType {
4358    /**
4359     * 720P output for preconfig.
4360     *
4361     * @syscap SystemCapability.Multimedia.Camera.Core
4362     * @since 12
4363     */
4364    PRECONFIG_720P = 0,
4365  
4366    /**
4367     * 1080P output for preconfig.
4368     *
4369     * @syscap SystemCapability.Multimedia.Camera.Core
4370     * @since 12
4371     */
4372    PRECONFIG_1080P = 1,
4373  
4374    /**
4375     * 4K output for preconfig.
4376     *
4377     * @syscap SystemCapability.Multimedia.Camera.Core
4378     * @since 12
4379     */
4380    PRECONFIG_4K = 2,
4381  
4382    /**
4383     * high quality output for preconfig.
4384     *
4385     * @syscap SystemCapability.Multimedia.Camera.Core
4386     * @since 12
4387     */
4388    PRECONFIG_HIGH_QUALITY = 3
4389  }
4390
4391  /**
4392   * The aspect ratios of preconfig, which used to configure session conveniently.
4393   *
4394   * @enum { number }
4395   * @syscap SystemCapability.Multimedia.Camera.Core
4396   * @since 12
4397   */
4398  enum PreconfigRatio {
4399    /**
4400     * Aspect ratio 1:1 for preconfig.
4401     *
4402     * @syscap SystemCapability.Multimedia.Camera.Core
4403     * @since 12
4404     */
4405    PRECONFIG_RATIO_1_1 = 0,
4406  
4407    /**
4408     * Aspect ratio 4:3 for preconfig.
4409     *
4410     * @syscap SystemCapability.Multimedia.Camera.Core
4411     * @since 12
4412     */
4413    PRECONFIG_RATIO_4_3 = 1,
4414  
4415    /**
4416     * Aspect ratio 16:9 for preconfig.
4417     *
4418     * @syscap SystemCapability.Multimedia.Camera.Core
4419     * @since 12
4420     */
4421    PRECONFIG_RATIO_16_9 = 2
4422  }
4423
4424  /**
4425   * Enum for feature type used in scene detection.
4426   *
4427   * @enum { number }
4428   * @syscap SystemCapability.Multimedia.Camera.Core
4429   * @systemapi
4430   * @since 12
4431   */
4432  enum SceneFeatureType {
4433    /**
4434     * Feature for boost moon capture.
4435     *
4436     * @syscap SystemCapability.Multimedia.Camera.Core
4437     * @systemapi
4438     * @since 12
4439     */
4440    MOON_CAPTURE_BOOST = 0
4441  }
4442
4443  /**
4444   * Feature Detection Result.
4445   *
4446   * @typedef SceneFeatureDetectionResult
4447   * @syscap SystemCapability.Multimedia.Camera.Core
4448   * @systemapi
4449   * @since 12
4450   */
4451  interface SceneFeatureDetectionResult {
4452    /**
4453     * Detected feature type.
4454     *
4455     * @type { SceneFeatureType }
4456     * @readonly
4457     * @syscap SystemCapability.Multimedia.Camera.Core
4458     * @systemapi
4459     * @since 12
4460     */
4461    readonly featureType: SceneFeatureType;
4462
4463    /**
4464     * Check whether feature is detected.
4465     *
4466     * @type { boolean }
4467     * @readonly
4468     * @syscap SystemCapability.Multimedia.Camera.Core
4469     * @systemapi
4470     * @since 12
4471     */
4472    readonly detected: boolean;
4473  }
4474
4475  /**
4476   * Scene detection query.
4477   *
4478   * @interface SceneDetectionQuery
4479   * @syscap SystemCapability.Multimedia.Camera.Core
4480   * @systemapi
4481   * @since 12
4482   */
4483  interface SceneDetectionQuery {
4484    /**
4485     * Check whether specified feature is supported.
4486     *
4487     * @param { SceneFeatureType } type - Specified feature type.
4488     * @returns { boolean } - Is specified feature supported.
4489     * @throws { BusinessError } 202 - Not System Application, only throw in session usage.
4490     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4491     * @syscap SystemCapability.Multimedia.Camera.Core
4492     * @systemapi
4493     * @since 12
4494     */
4495    isSceneFeatureSupported(type: SceneFeatureType): boolean;
4496  }
4497
4498  /**
4499   * Scene detection.
4500   *
4501   * @interface SceneDetection
4502   * @syscap SystemCapability.Multimedia.Camera.Core
4503   * @systemapi
4504   * @since 12
4505   */
4506  interface SceneDetection extends SceneDetectionQuery {
4507    /**
4508     * Enable specified feature.
4509     *
4510     * @param { SceneFeatureType } type - Specified feature type.
4511     * @param { boolean } enabled - Target feature status.
4512     * @throws { BusinessError } 202 - Not System Application.
4513     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4514     * @syscap SystemCapability.Multimedia.Camera.Core
4515     * @systemapi
4516     * @since 12
4517     */
4518    enableSceneFeature(type: SceneFeatureType, enabled: boolean): void;
4519  }
4520
4521  /**
4522   * Photo session object for system hap.
4523   *
4524   * @interface PhotoSessionForSys
4525   * @syscap SystemCapability.Multimedia.Camera.Core
4526   * @systemapi
4527   * @since 11
4528   */
4529  interface PhotoSessionForSys extends PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion {
4530  }
4531
4532  /**
4533   * Photo session object.
4534   *
4535   * @interface PhotoSession
4536   * @syscap SystemCapability.Multimedia.Camera.Core
4537   * @since 11
4538   */
4539  interface PhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement {
4540    /**
4541     * Gets whether the choosed preconfig type can be used to configure photo session.
4542     * Must choose preconfig type from {@link PreconfigType}.
4543     *
4544     * @param { PreconfigType } preconfigType - preconfig type.
4545     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig, 
4546     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_4_3}.
4547     * @returns { boolean } Whether the choosed preconfig type can be used.
4548     * @throws { BusinessError } 7400201 - Camera service fatal error.
4549     * @syscap SystemCapability.Multimedia.Camera.Core
4550     * @since 12
4551     */
4552    canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean;
4553
4554    /**
4555     * Configure photo session with the preconfig type.
4556     * Must choose preconfig type from {@link PreconfigType}.
4557     *
4558     * @param { PreconfigType } preconfigType - preconfig type.
4559     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4560     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_4_3}
4561     * @throws { BusinessError } 7400201 - Camera service fatal error.
4562     * @syscap SystemCapability.Multimedia.Camera.Core
4563     * @since 12
4564     */
4565    preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void;
4566
4567    /**
4568     * Subscribes to error events.
4569     *
4570     * @param { 'error' } type - Event type.
4571     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4572     * @syscap SystemCapability.Multimedia.Camera.Core
4573     * @since 11
4574     */
4575    on(type: 'error', callback: ErrorCallback): void;
4576
4577    /**
4578     * Unsubscribes from error events.
4579     *
4580     * @param { 'error' } type - Event type.
4581     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4582     * @syscap SystemCapability.Multimedia.Camera.Core
4583     * @since 11
4584     */
4585    off(type: 'error', callback?: ErrorCallback): void;
4586
4587    /**
4588     * Subscribes focus state change event callback.
4589     *
4590     * @param { 'focusStateChange' } type - Event type.
4591     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4592     * @syscap SystemCapability.Multimedia.Camera.Core
4593     * @since 11
4594     */
4595    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4596
4597    /**
4598     * Unsubscribes from focus state change event callback.
4599     *
4600     * @param { 'focusStateChange' } type - Event type.
4601     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4602     * @syscap SystemCapability.Multimedia.Camera.Core
4603     * @since 11
4604     */
4605    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4606
4607    /**
4608     * Subscribes zoom info event callback.
4609     *
4610     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4611     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4612     * @syscap SystemCapability.Multimedia.Camera.Core
4613     * @since 11
4614     */
4615    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
4616
4617    /**
4618     * Unsubscribes from zoom info event callback.
4619     *
4620     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4621     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4622     * @syscap SystemCapability.Multimedia.Camera.Core
4623     * @since 11
4624     */
4625    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
4626
4627    /**
4628     * Subscribes camera macro status event callback.
4629     *
4630     * @param { 'macroStatusChanged' } type - Event type.
4631     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4632     * @throws { BusinessError } 202 - Not System Application.
4633     * @syscap SystemCapability.Multimedia.Camera.Core
4634     * @systemapi
4635     * @since 11
4636     */
4637    on(type: 'macroStatusChanged', callback: AsyncCallback<boolean>): void;
4638
4639    /**
4640     * Unsubscribes camera macro status event callback.
4641     *
4642     * @param { 'macroStatusChanged' } type - Event type.
4643     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4644     * @throws { BusinessError } 202 - Not System Application.
4645     * @syscap SystemCapability.Multimedia.Camera.Core
4646     * @systemapi
4647     * @since 11
4648     */
4649    off(type: 'macroStatusChanged', callback?: AsyncCallback<boolean>): void;
4650
4651    /**
4652     * Subscribes to feature detection results.
4653     *
4654     * @param { 'featureDetection' } type - Event type.
4655     * @param { SceneFeatureType } featureType - Feature type.
4656     * @param { AsyncCallback<SceneFeatureDetectionResult> } callback - Callback used to get the detection result.
4657     * @throws { BusinessError } 202 - Not System Application.
4658     * @syscap SystemCapability.Multimedia.Camera.Core
4659     * @systemapi
4660     * @since 12
4661     */
4662    on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback<SceneFeatureDetectionResult>): void;
4663
4664    /**
4665     * Unsubscribes from feature detection result.
4666     *
4667     * @param { 'featureDetection' } type - Event type.
4668     * @param { SceneFeatureType } featureType - Feature type.
4669     * @param { AsyncCallback<SceneFeatureDetectionResult> } callback - Callback used to get the detection result.
4670     * @throws { BusinessError } 202 - Not System Application.
4671     * @syscap SystemCapability.Multimedia.Camera.Core
4672     * @systemapi
4673     * @since 12
4674     */
4675    off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback<SceneFeatureDetectionResult>): void;
4676
4677    /**
4678     * Subscribes to effect suggestion event callback.
4679     *
4680     * @param { 'effectSuggestionChange' } type - Event type.
4681     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
4682     * @syscap SystemCapability.Multimedia.Camera.Core
4683     * @systemapi
4684     * @since 12
4685     */
4686    on(type: 'effectSuggestionChange', callback: AsyncCallback<EffectSuggestionType>): void;
4687
4688    /**
4689     * Unsubscribes from effect suggestion event callback.
4690     *
4691     * @param { 'effectSuggestionChange' } type - Event type.
4692     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
4693     * @syscap SystemCapability.Multimedia.Camera.Core
4694     * @systemapi
4695     * @since 12
4696     */
4697    off(type: 'effectSuggestionChange', callback?: AsyncCallback<EffectSuggestionType>): void;
4698
4699    /**
4700     * Gets session functions.
4701     *
4702     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability.
4703     * @returns { Array<PhotoFunctions> } List of session functions.
4704     * @throws { BusinessError } 202 - Not System Application.
4705     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4706     * @syscap SystemCapability.Multimedia.Camera.Core
4707     * @systemapi
4708     * @since 12
4709     */
4710    getSessionFunctions(outputCapability: CameraOutputCapability): Array<PhotoFunctions>;
4711
4712    /**
4713     * Gets session conflict functions.
4714     *
4715     * @returns { Array<PhotoConflictFunctions> } List of session conflict functions.
4716     * @throws { BusinessError } 202 - Not System Application.
4717     * @syscap SystemCapability.Multimedia.Camera.Core
4718     * @systemapi
4719     * @since 12
4720     */
4721    getSessionConflictFunctions(): Array<PhotoConflictFunctions>;
4722  }
4723
4724  /**
4725   * Video session object for system hap.
4726   *
4727   * @interface VideoSessionForSys
4728   * @syscap SystemCapability.Multimedia.Camera.Core
4729   * @systemapi
4730   * @since 11
4731   */
4732  interface VideoSessionForSys extends VideoSession, Beauty, ColorEffect, ColorManagement, Macro {
4733  }
4734
4735  /**
4736   * Video session object.
4737   *
4738   * @interface VideoSession
4739   * @syscap SystemCapability.Multimedia.Camera.Core
4740   * @since 11
4741   */
4742  interface VideoSession extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement {
4743    /**
4744     * Gets whether the choosed preconfig type can be used to configure video session.
4745     * Must choose preconfig type from {@link PreconfigType}.
4746     *
4747     * @param { PreconfigType } preconfigType - preconfig type.
4748     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4749     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
4750     * @returns { boolean } Whether the choosed preconfig type can be used.
4751     * @throws { BusinessError } 7400201 - Camera service fatal error.
4752     * @syscap SystemCapability.Multimedia.Camera.Core
4753     * @since 12
4754     */
4755    canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean;
4756
4757    /**
4758     * Configure video session with the preconfig type.
4759     * Must choose preconfig type from {@link PreconfigType}.
4760     *
4761     * @param { PreconfigType } preconfigType - preconfig type.
4762     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4763     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
4764     * @throws { BusinessError } 7400201 - Camera service fatal error.
4765     * @syscap SystemCapability.Multimedia.Camera.Core
4766     * @since 12
4767     */
4768    preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void;
4769
4770    /**
4771     * Subscribes to error events.
4772     *
4773     * @param { 'error' } type - Event type.
4774     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4775     * @syscap SystemCapability.Multimedia.Camera.Core
4776     * @since 11
4777     */
4778    on(type: 'error', callback: ErrorCallback): void;
4779
4780    /**
4781     * Unsubscribes from error events.
4782     *
4783     * @param { 'error' } type - Event type.
4784     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4785     * @syscap SystemCapability.Multimedia.Camera.Core
4786     * @since 11
4787     */
4788    off(type: 'error', callback?: ErrorCallback): void;
4789
4790    /**
4791     * Subscribes focus state change event callback.
4792     *
4793     * @param { 'focusStateChange' } type - Event type.
4794     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4795     * @syscap SystemCapability.Multimedia.Camera.Core
4796     * @since 11
4797     */
4798    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4799
4800    /**
4801     * Unsubscribes from focus state change event callback.
4802     *
4803     * @param { 'focusStateChange' } type - Event type.
4804     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4805     * @syscap SystemCapability.Multimedia.Camera.Core
4806     * @since 11
4807     */
4808    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4809
4810    /**
4811     * Subscribes zoom info event callback.
4812     *
4813     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4814     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4815     * @syscap SystemCapability.Multimedia.Camera.Core
4816     * @since 11
4817     */
4818    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
4819
4820    /**
4821     * Unsubscribes from zoom info event callback.
4822     *
4823     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4824     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4825     * @syscap SystemCapability.Multimedia.Camera.Core
4826     * @since 11
4827     */
4828    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
4829
4830    /**
4831     * Subscribes camera macro status event callback.
4832     *
4833     * @param { 'macroStatusChanged' } type - Event type.
4834     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4835     * @throws { BusinessError } 202 - Not System Application.
4836     * @syscap SystemCapability.Multimedia.Camera.Core
4837     * @systemapi
4838     * @since 11
4839     */
4840    on(type: 'macroStatusChanged', callback: AsyncCallback<boolean>): void;
4841
4842    /**
4843     * Unsubscribes camera macro status event callback.
4844     *
4845     * @param { 'macroStatusChanged' } type - Event type.
4846     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4847     * @throws { BusinessError } 202 - Not System Application.
4848     * @syscap SystemCapability.Multimedia.Camera.Core
4849     * @systemapi
4850     * @since 11
4851     */
4852    off(type: 'macroStatusChanged', callback?: AsyncCallback<boolean>): void;
4853
4854    /**
4855     * Gets session functions.
4856     *
4857     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability.
4858     * @returns { Array<VideoFunctions> } List of session functions.
4859     * @throws { BusinessError } 202 - Not System Application.
4860     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4861     * @syscap SystemCapability.Multimedia.Camera.Core
4862     * @systemapi
4863     * @since 12
4864     */
4865    getSessionFunctions(outputCapability: CameraOutputCapability): Array<VideoFunctions>;
4866
4867    /**
4868     * Gets session conflict functions.
4869     *
4870     * @returns { Array<VideoConflictFunctions> } List of session conflict functions.
4871     * @throws { BusinessError } 202 - Not System Application.
4872     * @syscap SystemCapability.Multimedia.Camera.Core
4873     * @systemapi
4874     * @since 12
4875     */
4876    getSessionConflictFunctions(): Array<VideoConflictFunctions>;
4877  }
4878
4879  /**
4880   * Enumerates the camera portrait effects.
4881   *
4882   * @enum { number }
4883   * @syscap SystemCapability.Multimedia.Camera.Core
4884   * @systemapi
4885   * @since 10
4886   */
4887  enum PortraitEffect {
4888    /**
4889     * portrait effect off.
4890     *
4891     * @syscap SystemCapability.Multimedia.Camera.Core
4892     * @systemapi
4893     * @since 10
4894     */
4895    OFF = 0,
4896
4897    /**
4898     * circular blurring for portrait.
4899     *
4900     * @syscap SystemCapability.Multimedia.Camera.Core
4901     * @systemapi
4902     * @since 10
4903     */
4904    CIRCLES = 1,
4905
4906    /**
4907     * heart blurring for portrait.
4908     *
4909     * @syscap SystemCapability.Multimedia.Camera.Core
4910     * @systemapi
4911     * @since 11
4912     */
4913    HEART = 2,
4914
4915    /**
4916     * rotated blurring for portrait.
4917     *
4918     * @syscap SystemCapability.Multimedia.Camera.Core
4919     * @systemapi
4920     * @since 11
4921     */
4922    ROTATED = 3,
4923
4924    /**
4925     * studio blurring for portrait.
4926     *
4927     * @syscap SystemCapability.Multimedia.Camera.Core
4928     * @systemapi
4929     * @since 11
4930     */
4931    STUDIO = 4,
4932
4933    /**
4934     * theater blurring for portrait.
4935     *
4936     * @syscap SystemCapability.Multimedia.Camera.Core
4937     * @systemapi
4938     * @since 11
4939     */
4940    THEATER = 5
4941  }
4942
4943  /**
4944   * Portrait Query object.
4945   *
4946   * @interface PortraitQuery
4947   * @syscap SystemCapability.Multimedia.Camera.Core
4948   * @systemapi
4949   * @since 12
4950   */
4951  interface PortraitQuery {
4952    /**
4953     * Gets supported portrait effect.
4954     *
4955     * @returns { Array<PortraitEffect> } List of portrait effect.
4956     * @throws { BusinessError } 7400103 - Session not config.
4957     * @syscap SystemCapability.Multimedia.Camera.Core
4958     * @systemapi
4959     * @since 10
4960     */
4961    /**
4962     * Gets supported portrait effect.
4963     * Move to Portrait interface from PortraitPhotoSession interface since 11.
4964     *
4965     * @returns { Array<PortraitEffect> } List of portrait effect.
4966     * @throws { BusinessError } 202 - Not System Application.
4967     * @throws { BusinessError } 7400103 - Session not config.
4968     * @syscap SystemCapability.Multimedia.Camera.Core
4969     * @systemapi
4970     * @since 11
4971     */
4972    /**
4973     * Gets supported portrait effect.
4974     * Move to PortraitQuery interface from Portrait interface since 12.
4975     *
4976     * @returns { Array<PortraitEffect> } List of portrait effect.
4977     * @throws { BusinessError } 202 - Not System Application.
4978     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
4979     * @syscap SystemCapability.Multimedia.Camera.Core
4980     * @systemapi
4981     * @since 12
4982     */
4983    getSupportedPortraitEffects(): Array<PortraitEffect>;
4984  }
4985
4986  /**
4987   * Portrait object.
4988   *
4989   * @interface Portrait
4990   * @syscap SystemCapability.Multimedia.Camera.Core
4991   * @systemapi
4992   * @since 11
4993   */
4994  interface Portrait extends PortraitQuery {
4995    /**
4996     * Gets the portrait effect in use.
4997     *
4998     * @returns { PortraitEffect } The portrait effect in use.
4999     * @throws { BusinessError } 7400103 - Session not config.
5000     * @syscap SystemCapability.Multimedia.Camera.Core
5001     * @systemapi
5002     * @since 10
5003     */
5004    /**
5005     * Gets the portrait effect in use.
5006     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5007     *
5008     * @returns { PortraitEffect } The portrait effect in use.
5009     * @throws { BusinessError } 202 - Not System Application.
5010     * @throws { BusinessError } 7400103 - Session not config.
5011     * @syscap SystemCapability.Multimedia.Camera.Core
5012     * @systemapi
5013     * @since 11
5014     */
5015    getPortraitEffect(): PortraitEffect;
5016
5017    /**
5018     * Sets a portrait effect for a camera device.
5019     *
5020     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5021     * @throws { BusinessError } 7400103 - Session not config.
5022     * @syscap SystemCapability.Multimedia.Camera.Core
5023     * @systemapi
5024     * @since 10
5025     */
5026    /**
5027     * Sets a portrait effect for a camera device.
5028     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5029     *
5030     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5031     * @throws { BusinessError } 202 - Not System Application.
5032     * @throws { BusinessError } 7400103 - Session not config.
5033     * @syscap SystemCapability.Multimedia.Camera.Core
5034     * @systemapi
5035     * @since 11
5036     */
5037    setPortraitEffect(effect: PortraitEffect): void;
5038  }
5039
5040  /**
5041   * Zoom range.
5042   *
5043   * @typedef ZoomRange
5044   * @syscap SystemCapability.Multimedia.Camera.Core
5045   * @systemapi
5046   * @since 11
5047   */
5048  interface ZoomRange {
5049    /**
5050     * Min zoom value.
5051     *
5052     * @type { number }
5053     * @readonly
5054     * @syscap SystemCapability.Multimedia.Camera.Core
5055     * @systemapi
5056     * @since 11
5057     */
5058    readonly min: number;
5059
5060    /**
5061     * Max zoom value.
5062     *
5063     * @type { number }
5064     * @readonly
5065     * @syscap SystemCapability.Multimedia.Camera.Core
5066     * @systemapi
5067     * @since 11
5068     */
5069    readonly max: number;
5070  }
5071
5072  /**
5073   * Physical Aperture object
5074   *
5075   * @typedef PhysicalAperture
5076   * @syscap SystemCapability.Multimedia.Camera.Core
5077   * @systemapi
5078   * @since 11
5079   */
5080  interface PhysicalAperture {
5081    /**
5082     * Zoom Range of the specific physical aperture.
5083     *
5084     * @type { ZoomRange }
5085     * @syscap SystemCapability.Multimedia.Camera.Core
5086     * @systemapi
5087     * @since 11
5088     */
5089    zoomRange: ZoomRange;
5090
5091    /**
5092     * The supported physical apertures.
5093     *
5094     * @type { Array<number> }
5095     * @syscap SystemCapability.Multimedia.Camera.Core
5096     * @systemapi
5097     * @since 11
5098     */
5099    apertures: Array<number>;
5100  }
5101
5102  /**
5103   * Aperture Query object.
5104   *
5105   * @interface ApertureQuery
5106   * @syscap SystemCapability.Multimedia.Camera.Core
5107   * @systemapi
5108   * @since 12
5109   */
5110  interface ApertureQuery {
5111    /**
5112     * Gets the supported virtual apertures.
5113     *
5114     * @returns { Array<number> } The array of supported virtual apertures.
5115     * @throws { BusinessError } 202 - Not System Application.
5116     * @throws { BusinessError } 7400103 - Session not config.
5117     * @syscap SystemCapability.Multimedia.Camera.Core
5118     * @systemapi
5119     * @since 11
5120     */
5121    /**
5122     * Gets the supported virtual apertures.
5123     * Move to ApertureQuery interface from Aperture since 12.
5124     *
5125     * @returns { Array<number> } The array of supported virtual apertures.
5126     * @throws { BusinessError } 202 - Not System Application.
5127     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5128     * @syscap SystemCapability.Multimedia.Camera.Core
5129     * @systemapi
5130     * @since 12
5131     */
5132    getSupportedVirtualApertures(): Array<number>;
5133
5134    /**
5135     * Gets the supported physical apertures.
5136     *
5137     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5138     * @throws { BusinessError } 202 - Not System Application.
5139     * @throws { BusinessError } 7400103 - Session not config.
5140     * @syscap SystemCapability.Multimedia.Camera.Core
5141     * @systemapi
5142     * @since 11
5143     */
5144     /**
5145     * Gets the supported physical apertures.
5146     * Move to ApertureQuery interface from Aperture since 12.
5147     *
5148     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5149     * @throws { BusinessError } 202 - Not System Application.
5150     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5151     * @syscap SystemCapability.Multimedia.Camera.Core
5152     * @systemapi
5153     * @since 12
5154     */
5155    getSupportedPhysicalApertures(): Array<PhysicalAperture>;
5156  }
5157
5158  /**
5159   * Aperture object.
5160   *
5161   * @interface Aperture
5162   * @syscap SystemCapability.Multimedia.Camera.Core
5163   * @systemapi
5164   * @since 11
5165   */
5166  interface Aperture extends ApertureQuery {
5167    /**
5168     * Gets current virtual aperture value.
5169     *
5170     * @returns { number } The current virtual aperture value.
5171     * @throws { BusinessError } 202 - Not System Application.
5172     * @throws { BusinessError } 7400103 - Session not config.
5173     * @syscap SystemCapability.Multimedia.Camera.Core
5174     * @systemapi
5175     * @since 11
5176     */
5177    getVirtualAperture(): number;
5178
5179    /**
5180     * Sets virtual aperture value.
5181     *
5182     * @param { number } aperture - virtual aperture value
5183     * @throws { BusinessError } 202 - Not System Application.
5184     * @throws { BusinessError } 7400103 - Session not config.
5185     * @syscap SystemCapability.Multimedia.Camera.Core
5186     * @systemapi
5187     * @since 11
5188     */
5189    setVirtualAperture(aperture: number): void;
5190
5191    /**
5192     * Gets current physical aperture value.
5193     *
5194     * @returns { number } The current physical aperture value.
5195     * @throws { BusinessError } 202 - Not System Application.
5196     * @throws { BusinessError } 7400103 - Session not config.
5197     * @syscap SystemCapability.Multimedia.Camera.Core
5198     * @systemapi
5199     * @since 11
5200     */
5201    getPhysicalAperture(): number;
5202
5203    /**
5204     * Sets physical aperture value.
5205     *
5206     * @param { number } aperture - physical aperture value
5207     * @throws { BusinessError } 202 - Not System Application.
5208     * @throws { BusinessError } 7400103 - Session not config.
5209     * @syscap SystemCapability.Multimedia.Camera.Core
5210     * @systemapi
5211     * @since 11
5212     */
5213    setPhysicalAperture(aperture: number): void;
5214  }
5215
5216  /**
5217     * Portrait Photo session object.
5218     *
5219     * @interface PortraitPhotoSession
5220     * @syscap SystemCapability.Multimedia.Camera.Core
5221     * @systemapi
5222     * @since 11
5223     */
5224  interface PortraitPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, Beauty, ColorEffect, ColorManagement, Portrait, Aperture {
5225    /**
5226     * Subscribes to error events.
5227     *
5228     * @param { 'error' } type - Event type.
5229     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5230     * @syscap SystemCapability.Multimedia.Camera.Core
5231     * @systemapi
5232     * @since 11
5233     */
5234    on(type: 'error', callback: ErrorCallback): void;
5235
5236    /**
5237     * Unsubscribes from error events.
5238     *
5239     * @param { 'error' } type - Event type.
5240     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5241     * @syscap SystemCapability.Multimedia.Camera.Core
5242     * @systemapi
5243     * @since 11
5244     */
5245    off(type: 'error', callback?: ErrorCallback): void;
5246
5247    /**
5248     * Subscribes focus state change event callback.
5249     *
5250     * @param { 'focusStateChange' } type - Event type.
5251     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5252     * @syscap SystemCapability.Multimedia.Camera.Core
5253     * @systemapi
5254     * @since 11
5255     */
5256    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5257
5258    /**
5259     * Unsubscribes from focus state change event callback.
5260     *
5261     * @param { 'focusStateChange' } type - Event type.
5262     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5263     * @syscap SystemCapability.Multimedia.Camera.Core
5264     * @systemapi
5265     * @since 11
5266     */
5267    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5268
5269    /**
5270     * Subscribes zoom info event callback.
5271     *
5272     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5273     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5274     * @syscap SystemCapability.Multimedia.Camera.Core
5275     * @systemapi
5276     * @since 11
5277     */
5278    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5279
5280    /**
5281     * Unsubscribes from zoom info event callback.
5282     *
5283     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5284     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5285     * @syscap SystemCapability.Multimedia.Camera.Core
5286     * @systemapi
5287     * @since 11
5288     */
5289    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5290
5291    /**
5292     * Gets session functions.
5293     *
5294     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability.
5295     * @returns { Array<PortraitPhotoFunctions> } List of session functions.
5296     * @throws { BusinessError } 202 - Not System Application.
5297     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5298     * @syscap SystemCapability.Multimedia.Camera.Core
5299     * @systemapi
5300     * @since 12
5301     */
5302    getSessionFunctions(outputCapability: CameraOutputCapability): Array<PortraitPhotoFunctions>;
5303
5304    /**
5305     * Gets session conflict functions.
5306     *
5307     * @returns { Array<PortraitPhotoConflictFunctions> } List of session conflict functions.
5308     * @throws { BusinessError } 202 - Not System Application.
5309     * @syscap SystemCapability.Multimedia.Camera.Core
5310     * @systemapi
5311     * @since 12
5312     */
5313    getSessionConflictFunctions(): Array<PortraitPhotoConflictFunctions>;
5314  }
5315
5316  /**
5317     * Aperture video session object.
5318     *
5319     * @interface ApertureVideoSession
5320     * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture
5321     * @syscap SystemCapability.Multimedia.Camera.Core
5322     * @systemapi
5323     * @since 12
5324     */
5325  interface ApertureVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture {
5326    /**
5327     * Subscribes to error events.
5328     *
5329     * @param { 'error' } type - Event type.
5330     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5331     * @throws { BusinessError } 202 - Not System Application.
5332     * @syscap SystemCapability.Multimedia.Camera.Core
5333     * @systemapi
5334     * @since 12
5335     */
5336    on(type: 'error', callback: ErrorCallback): void;
5337
5338    /**
5339     * Unsubscribes from error events.
5340     *
5341     * @param { 'error' } type - Event type.
5342     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5343     * @throws { BusinessError } 202 - Not System Application.
5344     * @syscap SystemCapability.Multimedia.Camera.Core
5345     * @systemapi
5346     * @since 12
5347     */
5348    off(type: 'error', callback?: ErrorCallback): void;
5349
5350    /**
5351     * Subscribes focus state change event callback.
5352     *
5353     * @param { 'focusStateChange' } type - Event type.
5354     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5355     * @throws { BusinessError } 202 - Not System Application.
5356     * @syscap SystemCapability.Multimedia.Camera.Core
5357     * @systemapi
5358     * @since 12
5359     */
5360    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5361
5362    /**
5363     * Unsubscribes from focus state change event callback.
5364     *
5365     * @param { 'focusStateChange' } type - Event type.
5366     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5367     * @throws { BusinessError } 202 - Not System Application.
5368     * @syscap SystemCapability.Multimedia.Camera.Core
5369     * @systemapi
5370     * @since 12
5371     */
5372    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5373
5374    /**
5375     * Subscribes zoom info event callback.
5376     *
5377     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5378     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5379     * @throws { BusinessError } 202 - Not System Application.
5380     * @syscap SystemCapability.Multimedia.Camera.Core
5381     * @systemapi
5382     * @since 12
5383     */
5384    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5385
5386    /**
5387     * Unsubscribes from zoom info event callback.
5388     *
5389     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5390     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5391     * @throws { BusinessError } 202 - Not System Application.
5392     * @syscap SystemCapability.Multimedia.Camera.Core
5393     * @systemapi
5394     * @since 12
5395     */
5396    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5397  }
5398
5399  /**
5400   * ManualExposure Query object.
5401   *
5402   * @interface ManualExposureQuery
5403   * @syscap SystemCapability.Multimedia.Camera.Core
5404   * @systemapi
5405   * @since 12
5406   */
5407  interface ManualExposureQuery {
5408    /**
5409     * Gets the supported manual exposure range.
5410     *
5411     * @returns { Array<number> } The array of manual exposure range.
5412     * @throws { BusinessError } 202 - Not System Application.
5413     * @throws { BusinessError } 7400103 - Session not config.
5414     * @syscap SystemCapability.Multimedia.Camera.Core
5415     * @systemapi
5416     * @since 11
5417     */
5418    /**
5419     * Gets the supported manual exposure range.
5420     * Move to ManualExposureQuery from ManualExposure since 12.
5421     *
5422     * @returns { Array<number> } The array of manual exposure range.
5423     * @throws { BusinessError } 202 - Not System Application.
5424     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5425     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5426     * @syscap SystemCapability.Multimedia.Camera.Core
5427     * @systemapi
5428     * @since 12
5429     */
5430    getSupportedExposureRange(): Array<number>;
5431  }
5432
5433  /**
5434   * ManualExposure object.
5435   *
5436   * @interface ManualExposure
5437   * @syscap SystemCapability.Multimedia.Camera.Core
5438   * @systemapi
5439   * @since 11
5440   */
5441  interface ManualExposure extends ManualExposureQuery {
5442    /**
5443     * Gets current exposure value.
5444     *
5445     * @returns { number } The current exposure value.
5446     * @throws { BusinessError } 202 - Not System Application.
5447     * @throws { BusinessError } 7400103 - Session not config.
5448     * @syscap SystemCapability.Multimedia.Camera.Core
5449     * @systemapi
5450     * @since 11
5451     */
5452    /**
5453     * Gets current exposure value.
5454     *
5455     * @returns { number } The current exposure value.
5456     * @throws { BusinessError } 202 - Not System Application.
5457     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5458     * @throws { BusinessError } 7400103 - Session not config.
5459     * @syscap SystemCapability.Multimedia.Camera.Core
5460     * @systemapi
5461     * @since 12
5462     */
5463    getExposure(): number;
5464
5465    /**
5466     * Sets Exposure value.
5467     *
5468     * @param { number } exposure - Exposure value
5469     * @throws { BusinessError } 202 - Not System Application.
5470     * @throws { BusinessError } 7400103 - Session not config.
5471     * @syscap SystemCapability.Multimedia.Camera.Core
5472     * @systemapi
5473     * @since 11
5474     */
5475    /**
5476     * Sets Exposure value.
5477     *
5478     * @param { number } exposure - Exposure value
5479     * @throws { BusinessError } 202 - Not System Application.
5480     * @throws { BusinessError } 7400102 - Operation not allowed.
5481     * @throws { BusinessError } 7400103 - Session not config.
5482     * @syscap SystemCapability.Multimedia.Camera.Core
5483     * @systemapi
5484     * @since 12
5485     */
5486    setExposure(exposure: number): void;
5487  }
5488
5489  /**
5490   * Night photo session object.
5491   *
5492   * @interface NightPhotoSession
5493   * @syscap SystemCapability.Multimedia.Camera.Core
5494   * @systemapi
5495   * @since 11
5496   */
5497  interface NightPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Beauty, ColorManagement, ManualExposure {
5498    /**
5499     * Subscribes to error events.
5500     *
5501     * @param { 'error' } type - Event type.
5502     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5503     * @syscap SystemCapability.Multimedia.Camera.Core
5504     * @systemapi
5505     * @since 11
5506     */
5507    on(type: 'error', callback: ErrorCallback): void;
5508
5509    /**
5510     * Unsubscribes from error events.
5511     *
5512     * @param { 'error' } type - Event type.
5513     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5514     * @syscap SystemCapability.Multimedia.Camera.Core
5515     * @systemapi
5516     * @since 11
5517     */
5518    off(type: 'error', callback?: ErrorCallback): void;
5519
5520    /**
5521     * Subscribes focus state change event callback.
5522     *
5523     * @param { 'focusStateChange' } type - Event type.
5524     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5525     * @syscap SystemCapability.Multimedia.Camera.Core
5526     * @systemapi
5527     * @since 11
5528     */
5529    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5530
5531    /**
5532     * Unsubscribes from focus state change event callback.
5533     *
5534     * @param { 'focusStateChange' } type - Event type.
5535     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5536     * @syscap SystemCapability.Multimedia.Camera.Core
5537     * @systemapi
5538     * @since 11
5539     */
5540    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5541
5542    /**
5543     * Subscribes zoom info event callback.
5544     *
5545     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5546     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5547     * @syscap SystemCapability.Multimedia.Camera.Core
5548     * @systemapi
5549     * @since 11
5550     */
5551    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5552
5553    /**
5554     * Unsubscribes from zoom info event callback.
5555     *
5556     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5557     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5558     * @syscap SystemCapability.Multimedia.Camera.Core
5559     * @systemapi
5560     * @since 11
5561     */
5562    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5563
5564    /**
5565     * Subscribes to lcd flash status.
5566     *
5567     * @param { 'lcdFlashStatus' } type - Event type.
5568     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5569     * @throws { BusinessError } 202 - Not System Application.
5570     * @syscap SystemCapability.Multimedia.Camera.Core
5571     * @systemapi
5572     * @since 12
5573     */
5574    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
5575
5576    /**
5577     * Unsubscribes from lcd flash status.
5578     *
5579     * @param { 'lcdFlashStatus' } type - Event type.
5580     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5581     * @throws { BusinessError } 202 - Not System Application.
5582     * @syscap SystemCapability.Multimedia.Camera.Core
5583     * @systemapi
5584     * @since 12
5585     */
5586    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
5587  }
5588
5589  /**
5590   * ISO info object
5591   *
5592   * @typedef IsoInfo
5593   * @syscap SystemCapability.Multimedia.Camera.Core
5594   * @systemapi
5595   * @since 12
5596   */
5597  interface IsoInfo {
5598    /**
5599     * ISO value.
5600     *
5601     * @type { ?number }
5602     * @readonly
5603     * @syscap SystemCapability.Multimedia.Camera.Core
5604     * @systemapi
5605     * @since 12
5606     */
5607    readonly iso?: number;
5608  }
5609
5610  /**
5611   * Exposure info object
5612   *
5613   * @typedef ExposureInfo
5614   * @syscap SystemCapability.Multimedia.Camera.Core
5615   * @systemapi
5616   * @since 12
5617   */
5618  interface ExposureInfo {
5619    /**
5620     * Exposure time value.
5621     *
5622     * @type { ?number }
5623     * @readonly
5624     * @syscap SystemCapability.Multimedia.Camera.Core
5625     * @systemapi
5626     * @since 12
5627     */
5628    readonly exposureTime?: number;
5629  }
5630
5631  /**
5632   * Aperture info object
5633   *
5634   * @typedef ApertureInfo
5635   * @syscap SystemCapability.Multimedia.Camera.Core
5636   * @systemapi
5637   * @since 12
5638   */
5639  interface ApertureInfo {
5640    /**
5641     * Aperture value.
5642     *
5643     * @type { ?number }
5644     * @readonly
5645     * @syscap SystemCapability.Multimedia.Camera.Core
5646     * @systemapi
5647     * @since 12
5648     */
5649    readonly aperture?: number;
5650  }
5651
5652  /**
5653   * Lumination info object
5654   *
5655   * @typedef LuminationInfo
5656   * @syscap SystemCapability.Multimedia.Camera.Core
5657   * @systemapi
5658   * @since 12
5659   */
5660  interface LuminationInfo {
5661    /**
5662     * Lumination value.
5663     *
5664     * @type { ?number }
5665     * @readonly
5666     * @syscap SystemCapability.Multimedia.Camera.Core
5667     * @systemapi
5668     * @since 12
5669     */
5670    readonly lumination?: number;
5671  }
5672
5673  /**
5674   * Professional photo session object.
5675   *
5676   * @interface ProfessionalPhotoSession
5677   * @syscap SystemCapability.Multimedia.Camera.Core
5678   * @systemapi
5679   * @since 12
5680   */
5681  interface ProfessionalPhotoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
5682    /**
5683     * Subscribes to error events.
5684     *
5685     * @param { 'error' } type - Event type.
5686     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5687     * @throws { BusinessError } 202 - Not System Application.
5688     * @syscap SystemCapability.Multimedia.Camera.Core
5689     * @systemapi
5690     * @since 12
5691     */
5692    on(type: 'error', callback: ErrorCallback): void;
5693
5694    /**
5695     * Unsubscribes from error events.
5696     *
5697     * @param { 'error' } type - Event type.
5698     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5699     * @throws { BusinessError } 202 - Not System Application.
5700     * @syscap SystemCapability.Multimedia.Camera.Core
5701     * @systemapi
5702     * @since 12
5703     */
5704    off(type: 'error', callback?: ErrorCallback): void;
5705
5706    /**
5707     * Subscribes focus state change event callback.
5708     *
5709     * @param { 'focusStateChange' } type - Event type.
5710     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5711     * @throws { BusinessError } 202 - Not System Application.
5712     * @syscap SystemCapability.Multimedia.Camera.Core
5713     * @systemapi
5714     * @since 12
5715     */
5716    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5717
5718    /**
5719     * Unsubscribes from focus state change event callback.
5720     *
5721     * @param { 'focusStateChange' } type - Event type.
5722     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5723     * @throws { BusinessError } 202 - Not System Application.
5724     * @syscap SystemCapability.Multimedia.Camera.Core
5725     * @systemapi
5726     * @since 12
5727     */
5728    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5729
5730    /**
5731     * Subscribes zoom info event callback.
5732     *
5733     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5734     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5735     * @throws { BusinessError } 202 - Not System Application.
5736     * @syscap SystemCapability.Multimedia.Camera.Core
5737     * @systemapi
5738     * @since 12
5739     */
5740    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5741
5742    /**
5743     * Unsubscribes from zoom info event callback.
5744     *
5745     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5746     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5747     * @throws { BusinessError } 202 - Not System Application.
5748     * @syscap SystemCapability.Multimedia.Camera.Core
5749     * @systemapi
5750     * @since 12
5751     */
5752    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5753
5754    /**
5755     * Subscribes ISO info event callback.
5756     *
5757     * @param { 'isoInfo' } type - Event type.
5758     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5759     * @throws { BusinessError } 202 - Not System Application.
5760     * @syscap SystemCapability.Multimedia.Camera.Core
5761     * @systemapi
5762     * @since 12
5763     */
5764    on(type: 'isoInfo', callback: AsyncCallback<IsoInfo>): void;
5765
5766    /**
5767     * Unsubscribes from ISO info event callback.
5768     *
5769     * @param { 'isoInfo' } type - Event type.
5770     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5771     * @throws { BusinessError } 202 - Not System Application.
5772     * @syscap SystemCapability.Multimedia.Camera.Core
5773     * @systemapi
5774     * @since 12
5775     */
5776    off(type: 'isoInfo', callback?: AsyncCallback<IsoInfo>): void;
5777
5778    /**
5779     * Subscribes exposure info event callback.
5780     *
5781     * @param { 'exposureInfo' } type - Event type.
5782     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5783     * @throws { BusinessError } 202 - Not System Application.
5784     * @syscap SystemCapability.Multimedia.Camera.Core
5785     * @systemapi
5786     * @since 12
5787     */
5788    on(type: 'exposureInfo', callback: AsyncCallback<ExposureInfo>): void;
5789
5790    /**
5791     * Unsubscribes from exposure info event callback.
5792     *
5793     * @param { 'exposureInfo' } type - Event type.
5794     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5795     * @throws { BusinessError } 202 - Not System Application.
5796     * @syscap SystemCapability.Multimedia.Camera.Core
5797     * @systemapi
5798     * @since 12
5799     */
5800    off(type: 'exposureInfo', callback?: AsyncCallback<ExposureInfo>): void;
5801
5802    /**
5803     * Subscribes aperture info event callback.
5804     *
5805     * @param { 'apertureInfo' } type - Event type.
5806     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5807     * @throws { BusinessError } 202 - Not System Application.
5808     * @syscap SystemCapability.Multimedia.Camera.Core
5809     * @systemapi
5810     * @since 12
5811     */
5812    on(type: 'apertureInfo', callback: AsyncCallback<ApertureInfo>): void;
5813
5814    /**
5815     * Unsubscribes from aperture info event callback.
5816     *
5817     * @param { 'apertureInfo' } type - Event type.
5818     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5819     * @throws { BusinessError } 202 - Not System Application.
5820     * @syscap SystemCapability.Multimedia.Camera.Core
5821     * @systemapi
5822     * @since 12
5823     */
5824    off(type: 'apertureInfo', callback?: AsyncCallback<ApertureInfo>): void;
5825
5826    /**
5827     * Subscribes lumination info event callback.
5828     *
5829     * @param { 'luminationInfo' } type - Event type.
5830     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
5831     * @throws { BusinessError } 202 - Not System Application.
5832     * @syscap SystemCapability.Multimedia.Camera.Core
5833     * @systemapi
5834     * @since 12
5835     */
5836    on(type: 'luminationInfo', callback: AsyncCallback<LuminationInfo>): void;
5837
5838    /**
5839     * Unsubscribes from lumination info event callback.
5840     *
5841     * @param { 'luminationInfo' } type - Event type.
5842     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
5843     * @throws { BusinessError } 202 - Not System Application.
5844     * @syscap SystemCapability.Multimedia.Camera.Core
5845     * @systemapi
5846     * @since 12
5847     */
5848    off(type: 'luminationInfo', callback?: AsyncCallback<LuminationInfo>): void;
5849  }
5850
5851  /**
5852   * Professional video session object.
5853   *
5854   * @interface ProfessionalVideoSession
5855   * @syscap SystemCapability.Multimedia.Camera.Core
5856   * @systemapi
5857   * @since 12
5858   */
5859  interface ProfessionalVideoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
5860    /**
5861     * Subscribes to error events.
5862     *
5863     * @param { 'error' } type - Event type.
5864     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5865     * @throws { BusinessError } 202 - Not System Application.
5866     * @syscap SystemCapability.Multimedia.Camera.Core
5867     * @systemapi
5868     * @since 12
5869     */
5870    on(type: 'error', callback: ErrorCallback): void;
5871
5872    /**
5873     * Unsubscribes from error events.
5874     *
5875     * @param { 'error' } type - Event type.
5876     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5877     * @throws { BusinessError } 202 - Not System Application.
5878     * @syscap SystemCapability.Multimedia.Camera.Core
5879     * @systemapi
5880     * @since 12
5881     */
5882    off(type: 'error', callback?: ErrorCallback): void;
5883
5884    /**
5885     * Subscribes focus state change event callback.
5886     *
5887     * @param { 'focusStateChange' } type - Event type.
5888     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5889     * @throws { BusinessError } 202 - Not System Application.
5890     * @syscap SystemCapability.Multimedia.Camera.Core
5891     * @systemapi
5892     * @since 12
5893     */
5894    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5895
5896    /**
5897     * Unsubscribes from focus state change event callback.
5898     *
5899     * @param { 'focusStateChange' } type - Event type.
5900     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5901     * @throws { BusinessError } 202 - Not System Application.
5902     * @syscap SystemCapability.Multimedia.Camera.Core
5903     * @systemapi
5904     * @since 12
5905     */
5906    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5907
5908    /**
5909     * Subscribes zoom info event callback.
5910     *
5911     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5912     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5913     * @throws { BusinessError } 202 - Not System Application.
5914     * @syscap SystemCapability.Multimedia.Camera.Core
5915     * @systemapi
5916     * @since 12
5917     */
5918    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5919
5920    /**
5921     * Unsubscribes from zoom info event callback.
5922     *
5923     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5924     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5925     * @throws { BusinessError } 202 - Not System Application.
5926     * @syscap SystemCapability.Multimedia.Camera.Core
5927     * @systemapi
5928     * @since 12
5929     */
5930    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5931
5932    /**
5933     * Subscribes ISO info event callback.
5934     *
5935     * @param { 'isoInfo' } type - Event type.
5936     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5937     * @throws { BusinessError } 202 - Not System Application.
5938     * @syscap SystemCapability.Multimedia.Camera.Core
5939     * @systemapi
5940     * @since 12
5941     */
5942    on(type: 'isoInfo', callback: AsyncCallback<IsoInfo>): void;
5943
5944    /**
5945     * Unsubscribes from ISO info event callback.
5946     *
5947     * @param { 'isoInfo' } type - Event type.
5948     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5949     * @throws { BusinessError } 202 - Not System Application.
5950     * @syscap SystemCapability.Multimedia.Camera.Core
5951     * @systemapi
5952     * @since 12
5953     */
5954    off(type: 'isoInfo', callback?: AsyncCallback<IsoInfo>): void;
5955
5956    /**
5957     * Subscribes exposure info event callback.
5958     *
5959     * @param { 'exposureInfo' } type - Event type.
5960     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5961     * @throws { BusinessError } 202 - Not System Application.
5962     * @syscap SystemCapability.Multimedia.Camera.Core
5963     * @systemapi
5964     * @since 12
5965     */
5966    on(type: 'exposureInfo', callback: AsyncCallback<ExposureInfo>): void;
5967
5968    /**
5969     * Unsubscribes from exposure info event callback.
5970     *
5971     * @param { 'exposureInfo' } type - Event type.
5972     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5973     * @throws { BusinessError } 202 - Not System Application.
5974     * @syscap SystemCapability.Multimedia.Camera.Core
5975     * @systemapi
5976     * @since 12
5977     */
5978    off(type: 'exposureInfo', callback?: AsyncCallback<ExposureInfo>): void;
5979
5980    /**
5981     * Subscribes aperture info event callback.
5982     *
5983     * @param { 'apertureInfo' } type - Event type.
5984     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5985     * @throws { BusinessError } 202 - Not System Application.
5986     * @syscap SystemCapability.Multimedia.Camera.Core
5987     * @systemapi
5988     * @since 12
5989     */
5990    on(type: 'apertureInfo', callback: AsyncCallback<ApertureInfo>): void;
5991
5992    /**
5993     * Unsubscribes from aperture info event callback.
5994     *
5995     * @param { 'apertureInfo' } type - Event type.
5996     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5997     * @throws { BusinessError } 202 - Not System Application.
5998     * @syscap SystemCapability.Multimedia.Camera.Core
5999     * @systemapi
6000     * @since 12
6001     */
6002    off(type: 'apertureInfo', callback?: AsyncCallback<ApertureInfo>): void;
6003
6004    /**
6005     * Subscribes lumination info event callback.
6006     *
6007     * @param { 'luminationInfo' } type - Event type.
6008     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6009     * @throws { BusinessError } 202 - Not System Application.
6010     * @syscap SystemCapability.Multimedia.Camera.Core
6011     * @systemapi
6012     * @since 12
6013     */
6014    on(type: 'luminationInfo', callback: AsyncCallback<LuminationInfo>): void;
6015
6016    /**
6017     * Unsubscribes from lumination info event callback.
6018     *
6019     * @param { 'luminationInfo' } type - Event type.
6020     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6021     * @throws { BusinessError } 202 - Not System Application.
6022     * @syscap SystemCapability.Multimedia.Camera.Core
6023     * @systemapi
6024     * @since 12
6025     */
6026    off(type: 'luminationInfo', callback?: AsyncCallback<LuminationInfo>): void;
6027  }
6028
6029  /**
6030   * Enum for slow motion status.
6031   *
6032   * @enum { number }
6033   * @syscap SystemCapability.Multimedia.Camera.Core
6034   * @systemapi
6035   * @since 12
6036   */
6037  enum SlowMotionStatus {
6038    /**
6039     * Slow motion disabled.
6040     *
6041     * @syscap SystemCapability.Multimedia.Camera.Core
6042     * @systemapi
6043     * @since 12
6044     */
6045    DISABLED = 0,
6046
6047    /**
6048     * Slow motion ready.
6049     *
6050     * @syscap SystemCapability.Multimedia.Camera.Core
6051     * @systemapi
6052     * @since 12
6053     */
6054    READY = 1,
6055
6056    /**
6057     * Slow motion video start.
6058     *
6059     * @syscap SystemCapability.Multimedia.Camera.Core
6060     * @systemapi
6061     * @since 12
6062     */
6063    VIDEO_START = 2,
6064
6065    /**
6066     * Slow motion video done.
6067     *
6068     * @syscap SystemCapability.Multimedia.Camera.Core
6069     * @systemapi
6070     * @since 12
6071     */
6072    VIDEO_DONE = 3,
6073
6074    /**
6075     * Slow motion finished.
6076     *
6077     * @syscap SystemCapability.Multimedia.Camera.Core
6078     * @systemapi
6079     * @since 12
6080     */
6081    FINISHED = 4
6082  }
6083
6084  /**
6085   * Slow motion video session object.
6086   *
6087   * @interface SlowMotionVideoSession
6088   * @syscap SystemCapability.Multimedia.Camera.Core
6089   * @systemapi
6090   * @since 12
6091   */
6092  interface SlowMotionVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect {
6093    /**
6094     * Subscribes to error events.
6095     *
6096     * @param { 'error' } type - Event type.
6097     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6098     * @throws { BusinessError } 202 - Not System Application.
6099     * @syscap SystemCapability.Multimedia.Camera.Core
6100     * @systemapi
6101     * @since 12
6102     */
6103    on(type: 'error', callback: ErrorCallback): void;
6104
6105    /**
6106     * Unsubscribes from error events.
6107     *
6108     * @param { 'error' } type - Event type.
6109     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6110     * @throws { BusinessError } 202 - Not System Application.
6111     * @syscap SystemCapability.Multimedia.Camera.Core
6112     * @systemapi
6113     * @since 12
6114     */
6115    off(type: 'error', callback?: ErrorCallback): void;
6116
6117    /**
6118     * Subscribes focus state change event callback.
6119     *
6120     * @param { 'focusStateChange' } type - Event type.
6121     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6122     * @throws { BusinessError } 202 - Not System Application.
6123     * @syscap SystemCapability.Multimedia.Camera.Core
6124     * @systemapi
6125     * @since 12
6126     */
6127    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6128
6129    /**
6130     * Unsubscribes from focus state change event callback.
6131     *
6132     * @param { 'focusStateChange' } type - Event type.
6133     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6134     * @throws { BusinessError } 202 - Not System Application.
6135     * @syscap SystemCapability.Multimedia.Camera.Core
6136     * @systemapi
6137     * @since 12
6138     */
6139    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6140
6141    /**
6142     * Subscribes zoom info event callback.
6143     *
6144     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6145     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6146     * @throws { BusinessError } 202 - Not System Application.
6147     * @syscap SystemCapability.Multimedia.Camera.Core
6148     * @systemapi
6149     * @since 12
6150     */
6151    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6152
6153    /**
6154     * Unsubscribes from zoom info event callback.
6155     *
6156     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6157     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6158     * @throws { BusinessError } 202 - Not System Application.
6159     * @syscap SystemCapability.Multimedia.Camera.Core
6160     * @systemapi
6161     * @since 12
6162     */
6163    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6164
6165    /**
6166     * Determine whether camera slow motion detection is supported.
6167     *
6168     * @returns { boolean } Is camera slow motion detection supported.
6169     * @throws { BusinessError } 202 - Not System Application.
6170     * @throws { BusinessError } 7400103 - Session not config.
6171     * @syscap SystemCapability.Multimedia.Camera.Core
6172     * @systemapi
6173     * @since 12
6174     */
6175    isSlowMotionDetectionSupported(): boolean;
6176
6177    /**
6178     * Set slow motion detection area.
6179     *
6180     * @param { Rect } area - Detection area.
6181     * @throws { BusinessError } 202 - Not System Application.
6182     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6183     * @throws { BusinessError } 7400103 - Session not config.
6184     * @syscap SystemCapability.Multimedia.Camera.Core
6185     * @systemapi
6186     * @since 12
6187     */
6188    setSlowMotionDetectionArea(area: Rect): void;
6189
6190    /**
6191     * Subscribes slow motion status callback.
6192     *
6193     * @param { 'slowMotionStatus' } type - Event type.
6194     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6195     * @throws { BusinessError } 202 - Not System Application.
6196     * @syscap SystemCapability.Multimedia.Camera.Core
6197     * @systemapi
6198     * @since 12
6199     */
6200    on(type: 'slowMotionStatus', callback: AsyncCallback<SlowMotionStatus>): void;
6201
6202    /**
6203     * Unsubscribes slow motion status callback.
6204     *
6205     * @param { 'slowMotionStatus' } type - Event type.
6206     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6207     * @throws { BusinessError } 202 - Not System Application.
6208     * @syscap SystemCapability.Multimedia.Camera.Core
6209     * @systemapi
6210     * @since 12
6211     */
6212    off(type: 'slowMotionStatus', callback?: AsyncCallback<SlowMotionStatus>): void;
6213  }
6214
6215  /**
6216   * High resolution session object.
6217   *
6218   * @interface HighResolutionPhotoSession 
6219   * @syscap SystemCapability.Multimedia.Camera.Core
6220   * @systemapi
6221   * @since 12
6222   */
6223  interface HighResolutionPhotoSession extends Session, AutoExposure, Focus {
6224    /**
6225     * Subscribes to error events.
6226     *
6227     * @param { 'error' } type - Event type.
6228     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6229     * @throws { BusinessError } 202 - Not System Application.
6230     * @syscap SystemCapability.Multimedia.Camera.Core
6231     * @systemapi
6232     * @since 12
6233     */
6234    on(type: 'error', callback: ErrorCallback): void;
6235
6236    /**
6237     * Unsubscribes from error events.
6238     *
6239     * @param { 'error' } type - Event type.
6240     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6241     * @throws { BusinessError } 202 - Not System Application.
6242     * @syscap SystemCapability.Multimedia.Camera.Core
6243     * @systemapi
6244     * @since 12
6245     */
6246    off(type: 'error', callback?: ErrorCallback): void;
6247
6248    /**
6249     * Subscribes focus state change event callback.
6250     *
6251     * @param { 'focusStateChange' } type - Event type.
6252     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6253     * @throws { BusinessError } 202 - Not System Application.
6254     * @syscap SystemCapability.Multimedia.Camera.Core
6255     * @systemapi
6256     * @since 12
6257     */
6258    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6259
6260    /**
6261     * Unsubscribes from focus state change event callback.
6262     *
6263     * @param { 'focusStateChange' } type - Event type.
6264     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6265     * @throws { BusinessError } 202 - Not System Application.
6266     * @syscap SystemCapability.Multimedia.Camera.Core
6267     * @systemapi
6268     * @since 12
6269     */
6270    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6271  }
6272
6273  /**
6274   * Macro photo session object.
6275   *
6276   * @interface MacroPhotoSession
6277   * @syscap SystemCapability.Multimedia.Camera.Core
6278   * @systemapi
6279   * @since 12
6280   */
6281  interface MacroPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus {
6282    /**
6283     * Subscribes to error events.
6284     *
6285     * @param { 'error' } type - Event type.
6286     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6287     * @throws { BusinessError } 202 - Not System Application.
6288     * @syscap SystemCapability.Multimedia.Camera.Core
6289     * @systemapi
6290     * @since 12
6291     */
6292    on(type: 'error', callback: ErrorCallback): void;
6293
6294    /**
6295     * Unsubscribes from error events.
6296     *
6297     * @param { 'error' } type - Event type.
6298     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6299     * @throws { BusinessError } 202 - Not System Application.
6300     * @syscap SystemCapability.Multimedia.Camera.Core
6301     * @systemapi
6302     * @since 12
6303     */
6304    off(type: 'error', callback?: ErrorCallback): void;
6305
6306    /**
6307     * Subscribes focus state change event callback.
6308     *
6309     * @param { 'focusStateChange' } type - Event type.
6310     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6311     * @throws { BusinessError } 202 - Not System Application.
6312     * @syscap SystemCapability.Multimedia.Camera.Core
6313     * @systemapi
6314     * @since 12
6315     */
6316    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6317
6318    /**
6319     * Unsubscribes from focus state change event callback.
6320     *
6321     * @param { 'focusStateChange' } type - Event type.
6322     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6323     * @throws { BusinessError } 202 - Not System Application.
6324     * @syscap SystemCapability.Multimedia.Camera.Core
6325     * @systemapi
6326     * @since 12
6327     */
6328    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6329
6330    /**
6331     * Subscribes zoom info event callback.
6332     *
6333     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6334     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6335     * @throws { BusinessError } 202 - Not System Application.
6336     * @syscap SystemCapability.Multimedia.Camera.Core
6337     * @systemapi
6338     * @since 12
6339     */
6340    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6341
6342    /**
6343     * Unsubscribes from zoom info event callback.
6344     *
6345     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6346     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6347     * @throws { BusinessError } 202 - Not System Application.
6348     * @syscap SystemCapability.Multimedia.Camera.Core
6349     * @systemapi
6350     * @since 12
6351     */
6352    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6353  }
6354
6355  /**
6356   * Macro video session object.
6357   *
6358   * @interface MacroVideoSession
6359   * @syscap SystemCapability.Multimedia.Camera.Core
6360   * @systemapi
6361   * @since 12
6362   */
6363  interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus {
6364    /**
6365     * Subscribes to error events.
6366     *
6367     * @param { 'error' } type - Event type.
6368     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6369     * @throws { BusinessError } 202 - Not System Application.
6370     * @syscap SystemCapability.Multimedia.Camera.Core
6371     * @systemapi
6372     * @since 12
6373     */
6374    on(type: 'error', callback: ErrorCallback): void;
6375
6376    /**
6377     * Unsubscribes from error events.
6378     *
6379     * @param { 'error' } type - Event type.
6380     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6381     * @throws { BusinessError } 202 - Not System Application.
6382     * @syscap SystemCapability.Multimedia.Camera.Core
6383     * @systemapi
6384     * @since 12
6385     */
6386    off(type: 'error', callback?: ErrorCallback): void;
6387
6388    /**
6389     * Subscribes focus state change event callback.
6390     *
6391     * @param { 'focusStateChange' } type - Event type.
6392     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6393     * @throws { BusinessError } 202 - Not System Application.
6394     * @syscap SystemCapability.Multimedia.Camera.Core
6395     * @systemapi
6396     * @since 12
6397     */
6398    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6399
6400    /**
6401     * Unsubscribes from focus state change event callback.
6402     *
6403     * @param { 'focusStateChange' } type - Event type.
6404     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6405     * @throws { BusinessError } 202 - Not System Application.
6406     * @syscap SystemCapability.Multimedia.Camera.Core
6407     * @systemapi
6408     * @since 12
6409     */
6410    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6411
6412    /**
6413     * Subscribes zoom info event callback.
6414     *
6415     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6416     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6417     * @throws { BusinessError } 202 - Not System Application.
6418     * @syscap SystemCapability.Multimedia.Camera.Core
6419     * @systemapi
6420     * @since 12
6421     */
6422    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6423
6424    /**
6425     * Unsubscribes from zoom info event callback.
6426     *
6427     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6428     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6429     * @throws { BusinessError } 202 - Not System Application.
6430     * @syscap SystemCapability.Multimedia.Camera.Core
6431     * @systemapi
6432     * @since 12
6433     */
6434    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6435  }
6436
6437  /**
6438   * Secure camera session object.
6439   *
6440   * @interface SecureSession
6441   * @syscap SystemCapability.Multimedia.Camera.Core
6442   * @since 12
6443   */
6444  interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom {
6445    /**
6446     * Add Secure output for camera.
6447     *
6448     * @param { PreviewOutput } previewOutput - Specify the output as a secure flow.
6449     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6450     * @throws { BusinessError } 7400102 - Operation not allowed.
6451     * @throws { BusinessError } 7400103 - Session not config.
6452     * @syscap SystemCapability.Multimedia.Camera.Core
6453     * @since 12
6454     */
6455    addSecureOutput(previewOutput: PreviewOutput): void;
6456
6457    /**
6458     * Subscribes to error events.
6459     *
6460     * @param { 'error' } type - Event type.
6461     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6462     * @syscap SystemCapability.Multimedia.Camera.Core
6463     * @since 12
6464     */
6465    on(type: 'error', callback: ErrorCallback): void;
6466
6467    /**
6468     * Unsubscribes from error events.
6469     *
6470     * @param { 'error' } type - Event type.
6471     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6472     * @syscap SystemCapability.Multimedia.Camera.Core
6473     * @since 12
6474     */
6475    off(type: 'error', callback?: ErrorCallback): void;
6476
6477    /**
6478     * Subscribes focus status change event callback.
6479     *
6480     * @param { 'focusStateChange' } type - Event type.
6481     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6482     * @syscap SystemCapability.Multimedia.Camera.Core
6483     * @since 12
6484     */
6485    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6486
6487    /**
6488     * Unsubscribes from focus status change event callback.
6489     *
6490     * @param { 'focusStateChange' } type - Event type.
6491     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6492     * @syscap SystemCapability.Multimedia.Camera.Core
6493     * @since 12
6494     */
6495    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6496  }
6497
6498  /**
6499   * Light painting photo session object.
6500   *
6501   * @interface LightPaintingPhotoSession
6502   * @extends Session, Flash, Focus, Zoom, ColorEffect
6503   * @syscap SystemCapability.Multimedia.Camera.Core
6504   * @systemapi
6505   * @since 12
6506   */
6507  interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect {
6508    /**
6509     * Subscribes to error events.
6510     *
6511     * @param { 'error' } type - Event type.
6512     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6513     * @throws { BusinessError } 202 - Not System Application.
6514     * @syscap SystemCapability.Multimedia.Camera.Core
6515     * @systemapi
6516     * @since 12
6517     */
6518    on(type: 'error', callback: ErrorCallback): void;
6519
6520    /**
6521     * Unsubscribes from error events.
6522     *
6523     * @param { 'error' } type - Event type.
6524     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6525     * @throws { BusinessError } 202 - Not System Application.
6526     * @syscap SystemCapability.Multimedia.Camera.Core
6527     * @systemapi
6528     * @since 12
6529     */
6530    off(type: 'error', callback?: ErrorCallback): void;
6531
6532    /**
6533     * Subscribes focus state change event callback.
6534     *
6535     * @param { 'focusStateChange' } type - Event type.
6536     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6537     * @throws { BusinessError } 202 - Not System Application.
6538     * @syscap SystemCapability.Multimedia.Camera.Core
6539     * @systemapi
6540     * @since 12
6541     */
6542    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6543
6544    /**
6545     * Unsubscribes from focus state change event callback.
6546     *
6547     * @param { 'focusStateChange' } type - Event type.
6548     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6549     * @throws { BusinessError } 202 - Not System Application.
6550     * @syscap SystemCapability.Multimedia.Camera.Core
6551     * @systemapi
6552     * @since 12
6553     */
6554    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6555
6556    /**
6557     * Subscribes zoom info event callback.
6558     *
6559     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6560     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6561     * @throws { BusinessError } 202 - Not System Application.
6562     * @syscap SystemCapability.Multimedia.Camera.Core
6563     * @systemapi
6564     * @since 12
6565     */
6566    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6567
6568    /**
6569     * Unsubscribes from zoom info event callback.
6570     *
6571     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6572     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6573     * @throws { BusinessError } 202 - Not System Application.
6574     * @syscap SystemCapability.Multimedia.Camera.Core
6575     * @systemapi
6576     * @since 12
6577     */
6578    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6579
6580    /**
6581     * Gets the light painting type in use.
6582     *
6583     * @returns { LightPaintingType } The light painting type in use.
6584     * @throws { BusinessError } 202 - Not System Application.
6585     * @throws { BusinessError } 7400103 - Session not config.
6586     * @syscap SystemCapability.Multimedia.Camera.Core
6587     * @systemapi
6588     * @since 12
6589     */
6590    getLightPaintingType(): LightPaintingType;
6591
6592    /**
6593     * Sets a light painting type for a camera device.
6594     *
6595     * @param { LightPaintingType } type - Light painting type to set.
6596     * @throws { BusinessError } 202 - Not System Application.
6597     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. 
6598     * @throws { BusinessError } 7400103 - Session not config.
6599     * @syscap SystemCapability.Multimedia.Camera.Core
6600     * @systemapi
6601     * @since 12
6602     */
6603    setLightPaintingType(type: LightPaintingType): void;
6604
6605    /**
6606     * Gets supported light painting types.
6607     *
6608     * @returns { Array<LightPaintingType> } List of light painting types.
6609     * @throws { BusinessError } 202 - Not System Application.
6610     * @throws { BusinessError } 7400103 - Session not config.
6611     * @syscap SystemCapability.Multimedia.Camera.Core
6612     * @systemapi
6613     * @since 12
6614     */
6615    getSupportedLightPaintingTypes(): Array<LightPaintingType>;
6616  }
6617
6618  /**
6619   * Quick shot photo session object.
6620   *
6621   * @interface QuickShotPhotoSession
6622   * @extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom
6623   * @syscap SystemCapability.Multimedia.Camera.Core
6624   * @systemapi
6625   * @since 12
6626   */
6627  interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom {
6628    /**
6629     * Subscribes to error events.
6630     *
6631     * @param { 'error' } type - Event type.
6632     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6633     * @throws { BusinessError } 202 - Not System Application.
6634     * @syscap SystemCapability.Multimedia.Camera.Core
6635     * @systemapi
6636     * @since 12
6637     */
6638    on(type: 'error', callback: ErrorCallback): void;
6639
6640    /**
6641     * Unsubscribes from error events.
6642     *
6643     * @param { 'error' } type - Event type.
6644     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6645     * @throws { BusinessError } 202 - Not System Application.
6646     * @syscap SystemCapability.Multimedia.Camera.Core
6647     * @systemapi
6648     * @since 12
6649     */
6650    off(type: 'error', callback?: ErrorCallback): void;
6651
6652    /**
6653     * Subscribes to effect suggestion event callback.
6654     *
6655     * @param { 'effectSuggestionChange' } type - Event type.
6656     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
6657     * @throws { BusinessError } 202 - Not System Application.
6658     * @syscap SystemCapability.Multimedia.Camera.Core
6659     * @systemapi
6660     * @since 12
6661     */
6662    on(type: 'effectSuggestionChange', callback: AsyncCallback<EffectSuggestionType>): void;
6663
6664    /**
6665     * Unsubscribes from effect suggestion event callback.
6666     *
6667     * @param { 'effectSuggestionChange' } type - Event type.
6668     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
6669     * @throws { BusinessError } 202 - Not System Application.
6670     * @syscap SystemCapability.Multimedia.Camera.Core
6671     * @systemapi
6672     * @since 12
6673     */
6674    off(type: 'effectSuggestionChange', callback?: AsyncCallback<EffectSuggestionType>): void;
6675
6676    /**
6677     * Subscribes focus state change event callback.
6678     *
6679     * @param { 'focusStateChange' } type - Event type.
6680     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6681     * @throws { BusinessError } 202 - Not System Application.
6682     * @syscap SystemCapability.Multimedia.Camera.Core
6683     * @systemapi
6684     * @since 12
6685     */
6686    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6687
6688    /**
6689     * Unsubscribes from focus state change event callback.
6690     *
6691     * @param { 'focusStateChange' } type - Event type.
6692     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6693     * @throws { BusinessError } 202 - Not System Application.
6694     * @syscap SystemCapability.Multimedia.Camera.Core
6695     * @systemapi
6696     * @since 12
6697     */
6698    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6699
6700    /**
6701     * Subscribes zoom info event callback.
6702     *
6703     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6704     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6705     * @throws { BusinessError } 202 - Not System Application.
6706     * @syscap SystemCapability.Multimedia.Camera.Core
6707     * @systemapi
6708     * @since 12
6709     */
6710    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6711
6712    /**
6713     * Unsubscribes from zoom info event callback.
6714     *
6715     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6716     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6717     * @throws { BusinessError } 202 - Not System Application.
6718     * @syscap SystemCapability.Multimedia.Camera.Core
6719     * @systemapi
6720     * @since 12
6721     */
6722    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6723  }
6724
6725  /**
6726   * Panorama photo session object.
6727   *
6728   * @interface PanoramaPhotoSession
6729   * @extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect
6730   * @syscap SystemCapability.Multimedia.Camera.Core
6731   * @systemapi
6732   * @since 12
6733   */
6734  interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect {
6735    /**
6736     * Subscribes to error events.
6737     *
6738     * @param { 'error' } type - Event type.
6739     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6740     * @throws { BusinessError } 202 - Not System Application.
6741     * @syscap SystemCapability.Multimedia.Camera.Core
6742     * @systemapi
6743     * @since 12
6744     */
6745    on(type: 'error', callback: ErrorCallback): void;
6746
6747    /**
6748     * Unsubscribes from error events.
6749     *
6750     * @param { 'error' } type - Event type.
6751     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6752     * @throws { BusinessError } 202 - Not System Application.
6753     * @syscap SystemCapability.Multimedia.Camera.Core
6754     * @systemapi
6755     * @since 12
6756     */
6757    off(type: 'error', callback?: ErrorCallback): void;
6758
6759    /**
6760     * Subscribes focus state change event callback.
6761     *
6762     * @param { 'focusStateChange' } type - Event type.
6763     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6764     * @throws { BusinessError } 202 - Not System Application.
6765     * @syscap SystemCapability.Multimedia.Camera.Core
6766     * @systemapi
6767     * @since 12
6768     */
6769    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6770
6771    /**
6772     * Unsubscribes from focus state change event callback.
6773     *
6774     * @param { 'focusStateChange' } type - Event type.
6775     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6776     * @throws { BusinessError } 202 - Not System Application.
6777     * @syscap SystemCapability.Multimedia.Camera.Core
6778     * @systemapi
6779     * @since 12
6780     */
6781    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6782  }
6783
6784  /**
6785   * Fluorescence photo session object.
6786   *
6787   * @interface FluorescencePhotoSession
6788   * @syscap SystemCapability.Multimedia.Camera.Core
6789   * @systemapi
6790   * @since 12
6791   */
6792  interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom {
6793    /**
6794     * Subscribes to error events.
6795     *
6796     * @param { 'error' } type - Event type.
6797     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6798     * @throws { BusinessError } 202 - Not System Application.
6799     * @syscap SystemCapability.Multimedia.Camera.Core
6800     * @systemapi
6801     * @since 12
6802     */
6803    on(type: 'error', callback: ErrorCallback): void;
6804
6805    /**
6806     * Unsubscribes from error events.
6807     *
6808     * @param { 'error' } type - Event type.
6809     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6810     * @throws { BusinessError } 202 - Not System Application.
6811     * @syscap SystemCapability.Multimedia.Camera.Core
6812     * @systemapi
6813     * @since 12
6814     */
6815    off(type: 'error', callback?: ErrorCallback): void;
6816
6817    /**
6818     * Subscribes focus state change event callback.
6819     *
6820     * @param { 'focusStateChange' } type - Event type.
6821     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6822     * @throws { BusinessError } 202 - Not System Application.
6823     * @syscap SystemCapability.Multimedia.Camera.Core
6824     * @systemapi
6825     * @since 12
6826     */
6827    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6828
6829    /**
6830     * Unsubscribes from focus state change event callback.
6831     *
6832     * @param { 'focusStateChange' } type - Event type.
6833     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6834     * @throws { BusinessError } 202 - Not System Application.
6835     * @syscap SystemCapability.Multimedia.Camera.Core
6836     * @systemapi
6837     * @since 12
6838     */
6839    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6840  }
6841
6842  /**
6843   * Photo Functions object.
6844   *
6845   * @interface PhotoFunctions
6846   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
6847   * @syscap SystemCapability.Multimedia.Camera.Core
6848   * @systemapi
6849   * @since 12
6850   */
6851  interface PhotoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
6852  }
6853
6854  /**
6855   * Video Functions object.
6856   *
6857   * @interface VideoFunctions
6858   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
6859   * @syscap SystemCapability.Multimedia.Camera.Core
6860   * @systemapi
6861   * @since 12
6862   */
6863  interface VideoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
6864  }
6865
6866  /**
6867   * Portrait Photo Functions object.
6868   *
6869   * @interface PortraitPhotoFunctions
6870   * @extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery
6871   * @syscap SystemCapability.Multimedia.Camera.Core
6872   * @systemapi
6873   * @since 12
6874   */
6875  interface PortraitPhotoFunctions extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery {
6876  }
6877
6878  /**
6879   * Photo Conflict Functions object.
6880   *
6881   * @interface PhotoConflictFunctions
6882   * @extends ZoomQuery, MacroQuery
6883   * @syscap SystemCapability.Multimedia.Camera.Core
6884   * @systemapi
6885   * @since 12
6886   */
6887  interface PhotoConflictFunctions extends ZoomQuery, MacroQuery {
6888  }
6889
6890  /**
6891   * Video Conflict Functions object.
6892   *
6893   * @interface VideoConflictFunctions
6894   * @extends ZoomQuery, MacroQuery
6895   * @syscap SystemCapability.Multimedia.Camera.Core
6896   * @systemapi
6897   * @since 12
6898   */
6899  interface VideoConflictFunctions extends ZoomQuery, MacroQuery {
6900  }
6901
6902  /**
6903   * Portrait Photo Conflict Functions object.
6904   *
6905   * @interface PortraitPhotoFunctions
6906   * @extends ZoomQuery, PortraitQuery, ApertureQuery
6907   * @syscap SystemCapability.Multimedia.Camera.Core
6908   * @systemapi
6909   * @since 12
6910   */
6911  interface PortraitPhotoConflictFunctions extends ZoomQuery, PortraitQuery, ApertureQuery {
6912  }
6913
6914  /**
6915   * Camera output object.
6916   *
6917   * @interface CameraOutput
6918   * @syscap SystemCapability.Multimedia.Camera.Core
6919   * @since 10
6920   */
6921  interface CameraOutput {
6922    /**
6923     * Release output instance.
6924     *
6925     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6926     * @throws { BusinessError } 7400201 - Camera service fatal error.
6927     * @syscap SystemCapability.Multimedia.Camera.Core
6928     * @since 10
6929     */
6930    release(callback: AsyncCallback<void>): void;
6931
6932    /**
6933     * Release output instance.
6934     *
6935     * @returns { Promise<void> } Promise used to return the result.
6936     * @throws { BusinessError } 7400201 - Camera service fatal error.
6937     * @syscap SystemCapability.Multimedia.Camera.Core
6938     * @since 10
6939     */
6940    release(): Promise<void>;
6941  }
6942
6943  /**
6944   * SketchStatusData object
6945   *
6946   * @typedef SketchStatusData
6947   * @syscap SystemCapability.Multimedia.Camera.Core
6948   * @systemapi
6949   * @since 11
6950   */
6951  interface SketchStatusData {
6952    /**
6953     * Status of the sketch stream.
6954     * 0 is stop, and 1 is start.
6955     *
6956     * @type { number }
6957     * @syscap SystemCapability.Multimedia.Camera.Core
6958     * @systemapi
6959     * @since 11
6960     */
6961    status: number;
6962
6963    /**
6964     * The zoom ratio of the sketch stream.
6965     *
6966     * @type { number }
6967     * @syscap SystemCapability.Multimedia.Camera.Core
6968     * @systemapi
6969     * @since 11
6970     */
6971    sketchRatio: number;
6972  }
6973
6974  /**
6975   * Preview output object.
6976   *
6977   * @interface PreviewOutput
6978   * @syscap SystemCapability.Multimedia.Camera.Core
6979   * @since 10
6980   */
6981  interface PreviewOutput extends CameraOutput {
6982    /**
6983     * Start output instance.
6984     *
6985     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6986     * @throws { BusinessError } 7400103 - Session not config.
6987     * @syscap SystemCapability.Multimedia.Camera.Core
6988     * @since 10
6989     * @deprecated since 11
6990     * @useinstead ohos.multimedia.camera.Session#start
6991     */
6992    start(callback: AsyncCallback<void>): void;
6993
6994    /**
6995     * Start output instance.
6996     *
6997     * @returns { Promise<void> } Promise used to return the result.
6998     * @throws { BusinessError } 7400103 - Session not config.
6999     * @syscap SystemCapability.Multimedia.Camera.Core
7000     * @since 10
7001     * @deprecated since 11
7002     * @useinstead ohos.multimedia.camera.Session#start
7003     */
7004    start(): Promise<void>;
7005
7006    /**
7007     * Stop output instance.
7008     *
7009     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7010     * @syscap SystemCapability.Multimedia.Camera.Core
7011     * @since 10
7012     * @deprecated since 11
7013     * @useinstead ohos.multimedia.camera.Session#stop
7014     */
7015    stop(callback: AsyncCallback<void>): void;
7016
7017    /**
7018     * Stop output instance.
7019     *
7020     * @returns { Promise<void> } Promise used to return the result.
7021     * @syscap SystemCapability.Multimedia.Camera.Core
7022     * @since 10
7023     * @deprecated since 11
7024     * @useinstead ohos.multimedia.camera.Session#stop
7025     */
7026    stop(): Promise<void>;
7027
7028    /**
7029     * Subscribes frame start event callback.
7030     *
7031     * @param { 'frameStart' } type - Event type.
7032     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7033     * @syscap SystemCapability.Multimedia.Camera.Core
7034     * @since 10
7035     */
7036    on(type: 'frameStart', callback: AsyncCallback<void>): void;
7037
7038    /**
7039     * Unsubscribes from frame start event callback.
7040     *
7041     * @param { 'frameStart' } type - Event type.
7042     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7043     * @syscap SystemCapability.Multimedia.Camera.Core
7044     * @since 10
7045     */
7046    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
7047
7048    /**
7049     * Subscribes frame end event callback.
7050     *
7051     * @param { 'frameEnd' } type - Event type.
7052     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7053     * @syscap SystemCapability.Multimedia.Camera.Core
7054     * @since 10
7055     */
7056    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
7057
7058    /**
7059     * Unsubscribes from frame end event callback.
7060     *
7061     * @param { 'frameEnd' } type - Event type.
7062     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7063     * @syscap SystemCapability.Multimedia.Camera.Core
7064     * @since 10
7065     */
7066    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
7067
7068    /**
7069     * Subscribes to error events.
7070     *
7071     * @param { 'error' } type - Event type.
7072     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7073     * @syscap SystemCapability.Multimedia.Camera.Core
7074     * @since 10
7075     */
7076    on(type: 'error', callback: ErrorCallback): void;
7077
7078    /**
7079     * Unsubscribes from error events.
7080     *
7081     * @param { 'error' } type - Event type.
7082     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7083     * @syscap SystemCapability.Multimedia.Camera.Core
7084     * @since 10
7085     */
7086    off(type: 'error', callback?: ErrorCallback): void;
7087
7088    /**
7089     * Get supported frame rates which can be set during session running.
7090     *
7091     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
7092     * @syscap SystemCapability.Multimedia.Camera.Core
7093     * @since 12
7094     */
7095    getSupportedFrameRates(): Array<FrameRateRange>
7096
7097    /**
7098     * Set a frame rate range.
7099     *
7100     * @param { number } minFps - Minimum frame rate per second.
7101     * @param { number } maxFps - Maximum frame rate per second.
7102     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7103     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
7104     * @syscap SystemCapability.Multimedia.Camera.Core
7105     * @since 12
7106     */
7107    setFrameRate(minFps: number, maxFps: number): void
7108
7109    /**
7110     * Get active frame rate range which has been set before.
7111     *
7112     * @returns { FrameRateRange } The active frame rate range.
7113     * @syscap SystemCapability.Multimedia.Camera.Core
7114     * @since 12
7115     */
7116    getActiveFrameRate(): FrameRateRange;
7117
7118    /**
7119     * Gets the current preconfig type if you had already call preconfig interface.
7120     *
7121     * @returns { Profile } The current preconfig type.
7122     * @throws { BusinessError } 7400201 - Camera service fatal error.
7123     * @syscap SystemCapability.Multimedia.Camera.Core
7124     * @since 12
7125     */
7126    getActiveProfile(): Profile;
7127
7128    /**
7129     * Adds a deferred surface.
7130     *
7131     * @param { string } surfaceId - Surface object id used in camera photo output.
7132     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7133     * @syscap SystemCapability.Multimedia.Camera.Core
7134     * @systemapi
7135     * @since 10
7136     */
7137    /**
7138     * Adds a deferred surface.
7139     *
7140     * @param { string } surfaceId - Surface object id used in camera photo output.
7141     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7142     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7143     * @syscap SystemCapability.Multimedia.Camera.Core
7144     * @systemapi
7145     * @since 12
7146     */
7147    addDeferredSurface(surfaceId: string): void;
7148
7149    /**
7150     * Determine whether camera sketch is supported.
7151     *
7152     * @returns { boolean } Is camera sketch supported.
7153     * @throws { BusinessError } 202 - Not System Application.
7154     * @syscap SystemCapability.Multimedia.Camera.Core
7155     * @systemapi
7156     * @since 11
7157     */
7158    isSketchSupported(): boolean;
7159
7160    /**
7161     * Gets the specific zoom ratio when sketch stream open.
7162     *
7163     * @returns { number } The specific zoom ratio of sketch.
7164     * @throws { BusinessError } 202 - Not System Application.
7165     * @throws { BusinessError } 7400103 - Session not config.
7166     * @syscap SystemCapability.Multimedia.Camera.Core
7167     * @systemapi
7168     * @since 11
7169     */
7170    getSketchRatio(): number;
7171
7172    /**
7173     * Enable sketch for camera.
7174     *
7175     * @param { boolean } enabled - enable sketch for camera if TRUE.
7176     * @throws { BusinessError } 202 - Not System Application.
7177     * @throws { BusinessError } 7400103 - Session not config.
7178     * @syscap SystemCapability.Multimedia.Camera.Core
7179     * @systemapi
7180     * @since 11
7181     */
7182    /**
7183     * Enable sketch for camera.
7184     *
7185     * @param { boolean } enabled - enable sketch for camera if TRUE.
7186     * @throws { BusinessError } 202 - Not System Application.
7187     * @throws { BusinessError } 7400102 - Operation not allowed.
7188     * @throws { BusinessError } 7400103 - Session not config.
7189     * @throws { BusinessError } 7400201 - Camera service fatal error.
7190     * @syscap SystemCapability.Multimedia.Camera.Core
7191     * @systemapi
7192     * @since 12
7193     */
7194    enableSketch(enabled: boolean): void;
7195
7196    /**
7197     * Attach surface to the sketch stream.
7198     *
7199     * @param { string } surfaceId - Surface object id used in sketch stream.
7200     * @throws { BusinessError } 202 - Not System Application.
7201     * @throws { BusinessError } 7400103 - Session not config.
7202     * @syscap SystemCapability.Multimedia.Camera.Core
7203     * @systemapi
7204     * @since 11
7205     */
7206    /**
7207     * Attach surface to the sketch stream.
7208     *
7209     * @param { string } surfaceId - Surface object id used in sketch stream.
7210     * @throws { BusinessError } 202 - Not System Application.
7211     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7212     * @throws { BusinessError } 7400103 - Session not config.
7213     * @throws { BusinessError } 7400201 - Camera service fatal error.
7214     * @syscap SystemCapability.Multimedia.Camera.Core
7215     * @systemapi
7216     * @since 12
7217     */
7218    attachSketchSurface(surfaceId: string): void;
7219
7220    /**
7221     * Subscribes sketch status changed event callback.
7222     *
7223     * @param { 'sketchStatusChanged' } type - Event type.
7224     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to sketch status data.
7225     * @throws { BusinessError } 202 - Not System Application.
7226     * @syscap SystemCapability.Multimedia.Camera.Core
7227     * @systemapi
7228     * @since 11
7229     */
7230    on(type: 'sketchStatusChanged', callback: AsyncCallback<SketchStatusData>): void;
7231
7232    /**
7233     * Unsubscribes sketch status changed event callback.
7234     *
7235     * @param { 'sketchStatusChanged' } type - Event type.
7236     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to get sketch status data.
7237     * @throws { BusinessError } 202 - Not System Application.
7238     * @syscap SystemCapability.Multimedia.Camera.Core
7239     * @systemapi
7240     * @since 11
7241     */
7242    off(type: 'sketchStatusChanged', callback?: AsyncCallback<SketchStatusData>): void;
7243  }
7244
7245  /**
7246   * Enum for effect suggestion.
7247   *
7248   * @enum { number }
7249   * @syscap SystemCapability.Multimedia.Camera.Core
7250   * @systemapi
7251   * @since 12
7252   */
7253  enum EffectSuggestionType {
7254    /**
7255     * None.
7256     *
7257     * @syscap SystemCapability.Multimedia.Camera.Core
7258     * @systemapi
7259     * @since 12
7260     */
7261    EFFECT_SUGGESTION_NONE = 0,
7262    /**
7263     * Portrait.
7264     *
7265     * @syscap SystemCapability.Multimedia.Camera.Core
7266     * @systemapi
7267     * @since 12
7268     */
7269    EFFECT_SUGGESTION_PORTRAIT = 1,
7270    /**
7271     * Food.
7272     *
7273     * @syscap SystemCapability.Multimedia.Camera.Core
7274     * @systemapi
7275     * @since 12
7276     */
7277    EFFECT_SUGGESTION_FOOD = 2,
7278  
7279    /**
7280     * Sky.
7281     *
7282     * @syscap SystemCapability.Multimedia.Camera.Core
7283     * @systemapi
7284     * @since 12
7285     */
7286    EFFECT_SUGGESTION_SKY = 3,
7287
7288    /**
7289     * Sunrise and sunset.
7290     *
7291     * @syscap SystemCapability.Multimedia.Camera.Core
7292     * @systemapi
7293     * @since 12
7294     */
7295    EFFECT_SUGGESTION_SUNRISE_SUNSET = 4
7296  }
7297
7298  /**
7299   * Effect suggestion status
7300   *
7301   * @syscap SystemCapability.Multimedia.Camera.Core
7302   * @systemapi
7303   * @since 12
7304   */
7305  class EffectSuggestionStatus {
7306    /**
7307     * Effect Suggestion type.
7308     *
7309     * @type { EffectSuggestionType }
7310     * @syscap SystemCapability.Multimedia.Camera.Core
7311     * @systemapi
7312     * @since 12
7313     */
7314    type: EffectSuggestionType;
7315    /**
7316     * Effect Suggestion type status.
7317     *
7318     * @type { boolean }
7319     * @syscap SystemCapability.Multimedia.Camera.Core
7320     * @systemapi
7321     * @since 12
7322     */
7323    status: boolean;
7324  }
7325
7326  /**
7327   * Enumerates the image rotation angles.
7328   *
7329   * @enum { number }
7330   * @syscap SystemCapability.Multimedia.Camera.Core
7331   * @since 10
7332   */
7333  enum ImageRotation {
7334    /**
7335     * The capture image rotates 0 degrees.
7336     *
7337     * @syscap SystemCapability.Multimedia.Camera.Core
7338     * @since 10
7339     */
7340    ROTATION_0 = 0,
7341
7342    /**
7343     * The capture image rotates 90 degrees.
7344     *
7345     * @syscap SystemCapability.Multimedia.Camera.Core
7346     * @since 10
7347     */
7348    ROTATION_90 = 90,
7349
7350    /**
7351     * The capture image rotates 180 degrees.
7352     *
7353     * @syscap SystemCapability.Multimedia.Camera.Core
7354     * @since 10
7355     */
7356    ROTATION_180 = 180,
7357
7358    /**
7359     * The capture image rotates 270 degrees.
7360     *
7361     * @syscap SystemCapability.Multimedia.Camera.Core
7362     * @since 10
7363     */
7364    ROTATION_270 = 270
7365  }
7366
7367  /**
7368   * Photo capture location
7369   *
7370   * @typedef Location
7371   * @syscap SystemCapability.Multimedia.Camera.Core
7372   * @since 10
7373   */
7374  interface Location {
7375    /**
7376     * Latitude.
7377     *
7378     * @type { number }
7379     * @syscap SystemCapability.Multimedia.Camera.Core
7380     * @since 10
7381     */
7382    latitude: number;
7383
7384    /**
7385     * Longitude.
7386     *
7387     * @type { number }
7388     * @syscap SystemCapability.Multimedia.Camera.Core
7389     * @since 10
7390     */
7391    longitude: number;
7392
7393    /**
7394     * Altitude.
7395     *
7396     * @type { number }
7397     * @syscap SystemCapability.Multimedia.Camera.Core
7398     * @since 10
7399     */
7400    altitude: number;
7401  }
7402
7403  /**
7404   * Enumerates the image quality levels.
7405   *
7406   * @enum { number }
7407   * @syscap SystemCapability.Multimedia.Camera.Core
7408   * @since 10
7409   */
7410  enum QualityLevel {
7411    /**
7412     * High image quality.
7413     *
7414     * @syscap SystemCapability.Multimedia.Camera.Core
7415     * @since 10
7416     */
7417    QUALITY_LEVEL_HIGH = 0,
7418
7419    /**
7420     * Medium image quality.
7421     *
7422     * @syscap SystemCapability.Multimedia.Camera.Core
7423     * @since 10
7424     */
7425    QUALITY_LEVEL_MEDIUM = 1,
7426
7427    /**
7428     * Low image quality.
7429     *
7430     * @syscap SystemCapability.Multimedia.Camera.Core
7431     * @since 10
7432     */
7433    QUALITY_LEVEL_LOW = 2
7434  }
7435
7436  /**
7437   * Photo capture options to set.
7438   *
7439   * @typedef PhotoCaptureSetting
7440   * @syscap SystemCapability.Multimedia.Camera.Core
7441   * @since 10
7442   */
7443  interface PhotoCaptureSetting {
7444    /**
7445     * Photo image quality.
7446     *
7447     * @type { ?QualityLevel }
7448     * @syscap SystemCapability.Multimedia.Camera.Core
7449     * @since 10
7450     */
7451    quality?: QualityLevel;
7452
7453    /**
7454     * Photo rotation.
7455     *
7456     * @type { ?ImageRotation }
7457     * @syscap SystemCapability.Multimedia.Camera.Core
7458     * @since 10
7459     */
7460    rotation?: ImageRotation;
7461
7462    /**
7463     * Photo location.
7464     *
7465     * @type { ?Location }
7466     * @syscap SystemCapability.Multimedia.Camera.Core
7467     * @since 10
7468     */
7469    location?: Location;
7470
7471    /**
7472     * Set the mirror photo function switch, default to false.
7473     *
7474     * @type { ?boolean }
7475     * @syscap SystemCapability.Multimedia.Camera.Core
7476     * @since 10
7477     */
7478    mirror?: boolean;
7479  }
7480
7481  /**
7482   * Enumerates the delivery image types.
7483   *
7484   * @enum { number }
7485   * @syscap SystemCapability.Multimedia.Camera.Core
7486   * @systemapi
7487   * @since 11
7488   */
7489  enum DeferredDeliveryImageType {
7490    /**
7491     * Undefer image delivery.
7492     *
7493     * @syscap SystemCapability.Multimedia.Camera.Core
7494     * @systemapi
7495     * @since 11
7496     */
7497    NONE = 0,
7498
7499    /**
7500     * Defer photo delivery when capturing photos.
7501     *
7502     * @syscap SystemCapability.Multimedia.Camera.Core
7503     * @systemapi
7504     * @since 11
7505     */
7506    PHOTO = 1,
7507
7508    /**
7509     * Defer video delivery when capturing videos.
7510     *
7511     * @syscap SystemCapability.Multimedia.Camera.Core
7512     * @systemapi
7513     * @since 11
7514     */
7515    VIDEO = 2
7516  }
7517
7518  /**
7519   * Photo object
7520   *
7521   * @typedef Photo
7522   * @syscap SystemCapability.Multimedia.Camera.Core
7523   * @since 11
7524   */
7525  interface Photo {
7526    /**
7527     * Main image.
7528     *
7529     * @type { image.Image }
7530     * @syscap SystemCapability.Multimedia.Camera.Core
7531     * @since 11
7532     */
7533    main: image.Image;
7534
7535    /**
7536     * Raw image.
7537     *
7538     * @type { ?image.Image }
7539     * @syscap SystemCapability.Multimedia.Camera.Core
7540     * @systemapi
7541     * @since 12
7542     */
7543    raw?: image.Image;
7544
7545    /**
7546     * Release Photo object.
7547     *
7548     * @returns { Promise<void> } Promise used to return the result.
7549     * @syscap SystemCapability.Multimedia.Camera.Core
7550     * @since 11
7551     */
7552    release(): Promise<void>;
7553  }
7554
7555  /**
7556   * DeferredPhotoProxy object
7557   *
7558   * @typedef DeferredPhotoProxy
7559   * @syscap SystemCapability.Multimedia.Camera.Core
7560   * @systemapi
7561   * @since 11
7562   */
7563  interface DeferredPhotoProxy {
7564    /**
7565     * Thumbnail image.
7566     *
7567     * @returns { Promise<image.PixelMap> } Promise used to return the result.
7568     * @throws { BusinessError } 202 - Not System Application.
7569     * @syscap SystemCapability.Multimedia.Camera.Core
7570     * @systemapi
7571     * @since 11
7572     */
7573    getThumbnail(): Promise<image.PixelMap>;
7574
7575    /**
7576     * Release DeferredPhotoProxy object.
7577     *
7578     * @returns { Promise<void> } Promise used to return the result.
7579     * @throws { BusinessError } 202 - Not System Application.
7580     * @syscap SystemCapability.Multimedia.Camera.Core
7581     * @systemapi
7582     * @since 11
7583     */
7584    release(): Promise<void>;
7585  }
7586
7587
7588  /**
7589   * Photo output object.
7590   *
7591   * @interface PhotoOutput
7592   * @syscap SystemCapability.Multimedia.Camera.Core
7593   * @since 10
7594   */
7595  interface PhotoOutput extends CameraOutput {
7596    /**
7597     * Start capture output.
7598     *
7599     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7600     * @throws { BusinessError } 7400104 - Session not running.
7601     * @throws { BusinessError } 7400201 - Camera service fatal error.
7602     * @syscap SystemCapability.Multimedia.Camera.Core
7603     * @since 10
7604     */
7605    capture(callback: AsyncCallback<void>): void;
7606
7607    /**
7608     * Start capture output.
7609     *
7610     * @returns { Promise<void> } Promise used to return the result.
7611     * @throws { BusinessError } 7400104 - Session not running.
7612     * @throws { BusinessError } 7400201 - Camera service fatal error.
7613     * @syscap SystemCapability.Multimedia.Camera.Core
7614     * @since 10
7615     */
7616    capture(): Promise<void>;
7617
7618    /**
7619     * Start capture output.
7620     *
7621     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7622     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7623     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7624     * @throws { BusinessError } 7400104 - Session not running.
7625     * @throws { BusinessError } 7400201 - Camera service fatal error.
7626     * @syscap SystemCapability.Multimedia.Camera.Core
7627     * @since 10
7628     */
7629    capture(setting: PhotoCaptureSetting, callback: AsyncCallback<void>): void;
7630
7631    /**
7632     * Start capture output.
7633     *
7634     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7635     * @returns { Promise<void> } Promise used to return the result.
7636     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7637     * @throws { BusinessError } 7400104 - Session not running.
7638     * @throws { BusinessError } 7400201 - Camera service fatal error.
7639     * @syscap SystemCapability.Multimedia.Camera.Core
7640     * @since 10
7641     */
7642    /**
7643     * Start capture output.
7644     * Remove optional param.
7645     *
7646     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7647     * @returns { Promise<void> } Promise used to return the result.
7648     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7649     * @throws { BusinessError } 7400104 - Session not running.
7650     * @throws { BusinessError } 7400201 - Camera service fatal error.
7651     * @syscap SystemCapability.Multimedia.Camera.Core
7652     * @since 11
7653     */
7654    capture(setting: PhotoCaptureSetting): Promise<void>;
7655
7656    /**
7657     * Start burst capture.
7658     *
7659     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7660     * @returns { Promise<void> } Promise used to return the result.
7661     * @throws { BusinessError } 202 - Not System Application.
7662     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7663     * @throws { BusinessError } 7400104 - Session not running.
7664     * @throws { BusinessError } 7400201 - Camera service fatal error.
7665     * @syscap SystemCapability.Multimedia.Camera.Core
7666     * @systemapi
7667     * @since 12
7668     */
7669    burstCapture(setting: PhotoCaptureSetting): Promise<void>;
7670
7671    /**
7672     * Confirm capture in Night mode or end burst capture.
7673     *
7674     * @throws { BusinessError } 202 - Not System Application.
7675     * @throws { BusinessError } 7400104 - Session not running.
7676     * @throws { BusinessError } 7400201 - Camera service fatal error.
7677     * @syscap SystemCapability.Multimedia.Camera.Core
7678     * @systemapi
7679     * @since 11
7680     */
7681    confirmCapture();
7682
7683    /**
7684     * Confirm if the deferred image delivery supported in the specific device.
7685     *
7686     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7687     * @returns { boolean } TRUE if the type of delivery image is support.
7688     * @throws { BusinessError } 202 - Not System Application.
7689     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7690     * @throws { BusinessError } 7400104 - Session not running.
7691     * @throws { BusinessError } 7400201 - Camera service fatal error.
7692     * @syscap SystemCapability.Multimedia.Camera.Core
7693     * @systemapi
7694     * @since 11
7695     */
7696    isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean;
7697
7698    /**
7699     * Confirm if the deferred image delivery enabled.
7700     *
7701     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7702     * @returns { boolean } TRUE if the type of delivery image is enable.
7703     * @throws { BusinessError } 202 - Not System Application.
7704     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7705     * @throws { BusinessError } 7400104 - Session not running.
7706     * @throws { BusinessError } 7400201 - Camera service fatal error.
7707     * @syscap SystemCapability.Multimedia.Camera.Core
7708     * @systemapi
7709     * @since 11
7710     */
7711    isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean;
7712
7713    /**
7714     * Sets the image type for deferred image delivery.
7715     *
7716     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7717     * @throws { BusinessError } 202 - Not System Application.
7718     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7719     * @throws { BusinessError } 7400104 - Session not running.
7720     * @throws { BusinessError } 7400201 - Camera service fatal error.
7721     * @syscap SystemCapability.Multimedia.Camera.Core
7722     * @systemapi
7723     * @since 11
7724     */
7725    deferImageDelivery(type: DeferredDeliveryImageType): void;
7726
7727    /**
7728     * Subscribes photo available event callback.
7729     *
7730     * @param { 'photoAvailable' } type - Event type.
7731     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
7732     * @syscap SystemCapability.Multimedia.Camera.Core
7733     * @since 11
7734     */
7735    on(type: 'photoAvailable', callback: AsyncCallback<Photo>): void;
7736
7737    /**
7738     * Unsubscribes photo available event callback.
7739     *
7740     * @param { 'photoAvailable' } type - Event type.
7741     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
7742     * @syscap SystemCapability.Multimedia.Camera.Core
7743     * @since 11
7744     */
7745    off(type: 'photoAvailable', callback?: AsyncCallback<Photo>): void;
7746
7747    /**
7748     * Subscribes deferred photo proxy available event callback.
7749     *
7750     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
7751     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
7752     * @throws { BusinessError } 202 - Not System Application.
7753     * @syscap SystemCapability.Multimedia.Camera.Core
7754     * @systemapi
7755     * @since 11
7756     */
7757    on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback<DeferredPhotoProxy>): void;
7758
7759    /**
7760     * Unsubscribes deferred photo proxy available event callback.
7761     *
7762     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
7763     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
7764     * @throws { BusinessError } 202 - Not System Application.
7765     * @syscap SystemCapability.Multimedia.Camera.Core
7766     * @systemapi
7767     * @since 11
7768     */
7769    off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback<DeferredPhotoProxy>): void;
7770
7771    /**
7772     * Subscribes photo asset event callback.
7773     *
7774     * @param { 'photoAssetAvailable' } type - Event type.
7775     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
7776     * @syscap SystemCapability.Multimedia.Camera.Core
7777     * @since 12
7778     */
7779    on(type: 'photoAssetAvailable', callback: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
7780
7781    /**
7782     * Unsubscribes photo asset event callback.
7783     *
7784     * @param { 'photoAssetAvailable' } type - Event type.
7785     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
7786     * @syscap SystemCapability.Multimedia.Camera.Core
7787     * @since 12
7788     */
7789     off(type: 'photoAssetAvailable', callback?: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
7790
7791    /**
7792     * Check whether to support mirror photo.
7793     *
7794     * @returns { boolean } Is the mirror supported.
7795     * @syscap SystemCapability.Multimedia.Camera.Core
7796     * @since 10
7797     */
7798    isMirrorSupported(): boolean;
7799
7800    /**
7801     * Subscribes capture start event callback.
7802     *
7803     * @param { 'captureStart' } type - Event type.
7804     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
7805     * @syscap SystemCapability.Multimedia.Camera.Core
7806     * @since 10
7807     * @deprecated since 11
7808     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
7809     */
7810    on(type: 'captureStart', callback: AsyncCallback<number>): void;
7811
7812    /**
7813     * Unsubscribes from capture start event callback.
7814     *
7815     * @param { 'captureStart' } type - Event type.
7816     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
7817     * @syscap SystemCapability.Multimedia.Camera.Core
7818     * @since 10
7819     * @deprecated since 11
7820     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
7821     */
7822    off(type: 'captureStart', callback?: AsyncCallback<number>): void;
7823
7824    /**
7825     * Subscribes capture start event callback.
7826     *
7827     * @param { 'captureStartWithInfo' } type - Event type.
7828     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
7829     * @syscap SystemCapability.Multimedia.Camera.Core
7830     * @since 11
7831     */
7832    on(type: 'captureStartWithInfo', callback: AsyncCallback<CaptureStartInfo>): void;
7833
7834    /**
7835     * Unsubscribes from capture start event callback.
7836     *
7837     * @param { 'captureStartWithInfo' } type - Event type.
7838     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
7839     * @syscap SystemCapability.Multimedia.Camera.Core
7840     * @since 11
7841     */
7842    off(type: 'captureStartWithInfo', callback?: AsyncCallback<CaptureStartInfo>): void;
7843
7844    /**
7845     * Subscribes frame shutter event callback.
7846     *
7847     * @param { 'frameShutter' } type - Event type.
7848     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
7849     * @syscap SystemCapability.Multimedia.Camera.Core
7850     * @since 10
7851     */
7852    on(type: 'frameShutter', callback: AsyncCallback<FrameShutterInfo>): void;
7853
7854    /**
7855     * Unsubscribes from frame shutter event callback.
7856     *
7857     * @param { 'frameShutter' } type - Event type.
7858     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
7859     * @syscap SystemCapability.Multimedia.Camera.Core
7860     * @since 10
7861     */
7862    off(type: 'frameShutter', callback?: AsyncCallback<FrameShutterInfo>): void;
7863
7864    /**
7865     * Subscribes frame shutter end event callback.
7866     *
7867     * @param { 'frameShutterEnd' } type - Event type.
7868     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
7869     * @syscap SystemCapability.Multimedia.Camera.Core
7870     * @since 12
7871     */
7872    on(type: 'frameShutterEnd', callback: AsyncCallback<FrameShutterEndInfo>): void;
7873
7874    /**
7875     * Unsubscribes from frame shutter end event callback.
7876     *
7877     * @param { 'frameShutterEnd' } type - Event type.
7878     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
7879     * @syscap SystemCapability.Multimedia.Camera.Core
7880     * @since 12
7881     */
7882    off(type: 'frameShutterEnd', callback?: AsyncCallback<FrameShutterEndInfo>): void;
7883
7884    /**
7885     * Subscribes capture end event callback.
7886     *
7887     * @param { 'captureEnd' } type - Event type.
7888     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
7889     * @syscap SystemCapability.Multimedia.Camera.Core
7890     * @since 10
7891     */
7892    on(type: 'captureEnd', callback: AsyncCallback<CaptureEndInfo>): void;
7893
7894    /**
7895     * Unsubscribes from capture end event callback.
7896     *
7897     * @param { 'captureEnd' } type - Event type.
7898     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
7899     * @syscap SystemCapability.Multimedia.Camera.Core
7900     * @since 10
7901     */
7902    off(type: 'captureEnd', callback?: AsyncCallback<CaptureEndInfo>): void;
7903
7904    /**
7905     * Subscribes capture ready event callback. After receiving the callback, can proceed to the next capture
7906     *
7907     * @param { 'captureReady' } type - Event type.
7908     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
7909     * @syscap SystemCapability.Multimedia.Camera.Core
7910     * @since 12
7911     */
7912    on(type: 'captureReady', callback: AsyncCallback<void>): void;
7913
7914    /**
7915     * Unsubscribes from capture ready event callback.
7916     *
7917     * @param { 'captureReady' } type - Event type.
7918     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
7919     * @syscap SystemCapability.Multimedia.Camera.Core
7920     * @since 12
7921     */
7922    off(type: 'captureReady', callback?: AsyncCallback<void>): void;
7923
7924    /**
7925     * Subscribes estimated capture duration event callback.
7926     *
7927     * @param { 'estimatedCaptureDuration' } type - Event type.
7928     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
7929     * @syscap SystemCapability.Multimedia.Camera.Core
7930     * @since 12
7931     */
7932    on(type: 'estimatedCaptureDuration', callback: AsyncCallback<number>): void;
7933
7934    /**
7935     * Unsubscribes from estimated capture duration event callback.
7936     *
7937     * @param { 'estimatedCaptureDuration' } type - Event type.
7938     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
7939     * @syscap SystemCapability.Multimedia.Camera.Core
7940     * @since 12
7941     */
7942    off(type: 'estimatedCaptureDuration', callback?: AsyncCallback<number>): void;
7943
7944    /**
7945     * Subscribes to error events.
7946     *
7947     * @param { 'error' } type - Event type.
7948     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
7949     * @syscap SystemCapability.Multimedia.Camera.Core
7950     * @since 10
7951     */
7952    on(type: 'error', callback: ErrorCallback): void;
7953
7954    /**
7955     * Unsubscribes from error events.
7956     *
7957     * @param { 'error' } type - Event type.
7958     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
7959     * @syscap SystemCapability.Multimedia.Camera.Core
7960     * @since 10
7961     */
7962    off(type: 'error', callback?: ErrorCallback): void;
7963
7964    /**
7965     * Gets the current preconfig type if you had already call preconfig interface.
7966     *
7967     * @returns { Profile } The current preconfig type.
7968     * @throws { BusinessError } 7400201 - Camera service fatal error.
7969     * @syscap SystemCapability.Multimedia.Camera.Core
7970     * @since 12
7971     */
7972    getActiveProfile(): Profile;
7973
7974    /**
7975     * Checks whether PhotoOutput supports quick thumbnail.
7976     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
7977     *
7978     * @returns { boolean } Whether quick thumbnail is supported.
7979     * @throws { BusinessError } 7400104 - session is not running.
7980     * @syscap SystemCapability.Multimedia.Camera.Core
7981     * @systemapi
7982     * @since 10
7983     */
7984    /**
7985     * Checks whether PhotoOutput supports quick thumbnail.
7986     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
7987     *
7988     * @returns { boolean } Whether quick thumbnail is supported.
7989     * @throws { BusinessError } 202 - Not System Application.
7990     * @throws { BusinessError } 7400104 - session is not running.
7991     * @syscap SystemCapability.Multimedia.Camera.Core
7992     * @systemapi
7993     * @since 12
7994     */
7995    isQuickThumbnailSupported(): boolean;
7996
7997    /**
7998     * Enables or disables quick thumbnail.
7999     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8000     * To avoid stream reconfiguration and performance loss,
8001     * you are advised to call the method before Session.commitConfig().
8002     * 
8003     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8004     * @throws { BusinessError } 7400104 - session is not running.
8005     * @syscap SystemCapability.Multimedia.Camera.Core
8006     * @systemapi
8007     * @since 10
8008     */
8009    /**
8010     * Enables or disables quick thumbnail.
8011     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8012     * To avoid stream reconfiguration and performance loss,
8013     * you are advised to call the method before Session.commitConfig().
8014     * 
8015     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8016     * @throws { BusinessError } 202 - Not System Application.
8017     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8018     * @throws { BusinessError } 7400104 - session is not running.
8019     * @throws { BusinessError } 7400201 - Camera service fatal error.
8020     * @syscap SystemCapability.Multimedia.Camera.Core
8021     * @systemapi
8022     * @since 12
8023     */
8024    enableQuickThumbnail(enabled: boolean): void;
8025
8026    /**
8027     * Subscribes to camera thumbnail events.
8028     * This method is valid only after enableQuickThumbnail(true) is called.
8029     *
8030     * @param { 'quickThumbnail' } type - Event type.
8031     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8032     * @syscap SystemCapability.Multimedia.Camera.Core
8033     * @systemapi
8034     * @since 10
8035     */
8036    on(type: 'quickThumbnail', callback: AsyncCallback<image.PixelMap>): void;
8037
8038    /**
8039     * Unsubscribes from camera thumbnail events.
8040     * This method is valid only after enableQuickThumbnail(true) is called.
8041     *
8042     * @param { 'quickThumbnail' } type - Event type.
8043     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8044     * @syscap SystemCapability.Multimedia.Camera.Core
8045     * @systemapi
8046     * @since 10
8047     */
8048    off(type: 'quickThumbnail', callback?: AsyncCallback<image.PixelMap>): void;
8049
8050    /**
8051     * Confirm if the auto high quality photo supported.
8052     *
8053     * @returns { boolean } TRUE if the auto high quality photo is supported.
8054     * @throws { BusinessError } 202 - Not System Application.
8055     * @throws { BusinessError } 7400104 - session is not running.
8056     * @throws { BusinessError } 7400201 - Camera service fatal error.
8057     * @syscap SystemCapability.Multimedia.Camera.Core
8058     * @systemapi
8059     * @since 12
8060     */
8061    isAutoHighQualityPhotoSupported(): boolean;
8062
8063    /**
8064     * Enable auto high quality photo.
8065     *
8066     * @param { boolean } enabled - Target state for auto high quality photo.
8067     * @throws { BusinessError } 202 - Not System Application.
8068     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8069     * @throws { BusinessError } 7400104 - session is not running.
8070     * @throws { BusinessError } 7400201 - Camera service fatal error.
8071     * @syscap SystemCapability.Multimedia.Camera.Core
8072     * @systemapi
8073     * @since 12
8074     */
8075    enableAutoHighQualityPhoto(enabled: boolean): void;
8076
8077    /**
8078     * Confirm if the auto cloud image enhancement is supported.
8079     *
8080     * @returns { boolean } TRUE if the auto cloud image enhancement is supported.
8081     * @throws { BusinessError } 202 - Not System Application.
8082     * @throws { BusinessError } 7400201 - Camera service fatal error.
8083     * @syscap SystemCapability.Multimedia.Camera.Core
8084     * @systemapi
8085     * @since 12
8086     */
8087     isAutoCloudImageEnhancementSupported(): boolean;
8088
8089    /**
8090     * Enable auto cloud image enhancement
8091     *
8092     * @param { boolean } enabled - Target state for auto cloud image enhancement.
8093     * @throws { BusinessError } 202 - Not System Application.
8094     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8095     * @throws { BusinessError } 7400201 - Camera service fatal error.
8096     * @syscap SystemCapability.Multimedia.Camera.Core
8097     * @systemapi
8098     * @since 12
8099     */
8100     enableAutoCloudImageEnhancement(enabled: boolean): void;
8101
8102    /**
8103     * Confirm if moving photo supported.
8104     *
8105     * @returns { boolean } TRUE if the moving photo is supported.
8106     * @throws { BusinessError } 7400201 - Camera service fatal error.
8107     * @syscap SystemCapability.Multimedia.Camera.Core
8108     * @since 12
8109     */
8110    isMovingPhotoSupported(): boolean;
8111
8112    /**
8113     * Enable moving photo.
8114     *
8115     * @permission ohos.permission.MICROPHONE
8116     * @param { boolean } enabled - Target state for moving photo.
8117     * @throws { BusinessError } 201 - permission denied.
8118     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8119     * @throws { BusinessError } 7400201 - Camera service fatal error.
8120     * @syscap SystemCapability.Multimedia.Camera.Core
8121     * @since 12
8122     */
8123    enableMovingPhoto(enabled: boolean): void;
8124  }
8125
8126  /**
8127   * Frame shutter callback info.
8128   *
8129   * @typedef FrameShutterInfo
8130   * @syscap SystemCapability.Multimedia.Camera.Core
8131   * @since 10
8132   */
8133  interface FrameShutterInfo {
8134    /**
8135     * Capture id.
8136     *
8137     * @type { number }
8138     * @syscap SystemCapability.Multimedia.Camera.Core
8139     * @since 10
8140     */
8141    captureId: number;
8142    /**
8143     * Timestamp for frame.
8144     *
8145     * @type { number }
8146     * @syscap SystemCapability.Multimedia.Camera.Core
8147     * @since 10
8148     */
8149    timestamp: number;
8150  }
8151
8152  /**
8153   * Frame shutter end callback info.
8154   *
8155   * @typedef FrameShutterEndInfo
8156   * @syscap SystemCapability.Multimedia.Camera.Core
8157   * @since 12
8158   */
8159  interface FrameShutterEndInfo {
8160    /**
8161     * Capture id.
8162     *
8163     * @type { number }
8164     * @syscap SystemCapability.Multimedia.Camera.Core
8165     * @since 12
8166     */
8167    captureId: number;
8168  }
8169
8170  /**
8171   * Capture start info.
8172   *
8173   * @typedef CaptureStartInfo
8174   * @syscap SystemCapability.Multimedia.Camera.Core
8175   * @since 11
8176   */
8177  interface CaptureStartInfo {
8178    /**
8179     * Capture id.
8180     *
8181     * @type { number }
8182     * @syscap SystemCapability.Multimedia.Camera.Core
8183     * @since 11
8184     */
8185    captureId: number;
8186    /**
8187     * Time(in milliseconds) is the shutter time for the photo.
8188     *
8189     * @type { number }
8190     * @syscap SystemCapability.Multimedia.Camera.Core
8191     * @since 11
8192     */
8193    time: number;
8194  }
8195
8196  /**
8197   * Capture end info.
8198   *
8199   * @typedef CaptureEndInfo
8200   * @syscap SystemCapability.Multimedia.Camera.Core
8201   * @since 10
8202   */
8203  interface CaptureEndInfo {
8204    /**
8205     * Capture id.
8206     *
8207     * @type { number }
8208     * @syscap SystemCapability.Multimedia.Camera.Core
8209     * @since 10
8210     */
8211    captureId: number;
8212    /**
8213     * Frame count.
8214     *
8215     * @type { number }
8216     * @syscap SystemCapability.Multimedia.Camera.Core
8217     * @since 10
8218     */
8219    frameCount: number;
8220  }
8221
8222  /**
8223   * Video output object.
8224   *
8225   * @interface VideoOutput
8226   * @syscap SystemCapability.Multimedia.Camera.Core
8227   * @since 10
8228   */
8229  interface VideoOutput extends CameraOutput {
8230    /**
8231     * Start video output.
8232     *
8233     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8234     * @throws { BusinessError } 7400103 - Session not config.
8235     * @throws { BusinessError } 7400201 - Camera service fatal error.
8236     * @syscap SystemCapability.Multimedia.Camera.Core
8237     * @since 10
8238     */
8239    start(callback: AsyncCallback<void>): void;
8240
8241    /**
8242     * Start video output.
8243     *
8244     * @returns { Promise<void> } Promise used to return the result.
8245     * @throws { BusinessError } 7400103 - Session not config.
8246     * @throws { BusinessError } 7400201 - Camera service fatal error.
8247     * @syscap SystemCapability.Multimedia.Camera.Core
8248     * @since 10
8249     */
8250    start(): Promise<void>;
8251
8252    /**
8253     * Stop video output.
8254     *
8255     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8256     * @syscap SystemCapability.Multimedia.Camera.Core
8257     * @since 10
8258     */
8259    stop(callback: AsyncCallback<void>): void;
8260
8261    /**
8262     * Stop video output.
8263     *
8264     * @returns { Promise<void> } Promise used to return the result.
8265     * @syscap SystemCapability.Multimedia.Camera.Core
8266     * @since 10
8267     */
8268    stop(): Promise<void>;
8269
8270    /**
8271     * Determine whether video mirror is supported.
8272     *
8273     * @returns { boolean } Is video mirror supported.
8274     * @throws { BusinessError } 202 - Not System Application.
8275     * @syscap SystemCapability.Multimedia.Camera.Core
8276     * @systemapi
8277     * @since 12
8278     */
8279    isMirrorSupported(): boolean;
8280
8281    /**
8282     * Enable mirror for video capture.
8283     *
8284     * @param { boolean } enabled - enable video mirror if TRUE.
8285     * @throws { BusinessError } 202 - Not System Application.
8286     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8287     * @throws { BusinessError } 7400103 - Session not config.
8288     * @syscap SystemCapability.Multimedia.Camera.Core
8289     * @systemapi
8290     * @since 12
8291     */
8292    enableMirror(enabled: boolean): void;
8293
8294    /**
8295     * Get supported frame rates which can be set during session running.
8296     *
8297     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
8298     * @syscap SystemCapability.Multimedia.Camera.Core
8299     * @since 12
8300     */
8301    getSupportedFrameRates(): Array<FrameRateRange>
8302
8303    /**
8304     * Set a frame rate range.
8305     *
8306     * @param { number } minFps - Minimum frame rate per second.
8307     * @param { number } maxFps - Maximum frame rate per second.
8308     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8309     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
8310     * @syscap SystemCapability.Multimedia.Camera.Core
8311     * @since 12
8312     */
8313    setFrameRate(minFps: number, maxFps: number): void
8314
8315    /**
8316     * Get active frame rate range which has been set before.
8317     *
8318     * @returns { FrameRateRange } The active frame rate range.
8319     * @syscap SystemCapability.Multimedia.Camera.Core
8320     * @since 12
8321     */
8322    getActiveFrameRate(): FrameRateRange;
8323
8324    /**
8325     * Subscribes frame start event callback.
8326     *
8327     * @param { 'frameStart' } type - Event type.
8328     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8329     * @syscap SystemCapability.Multimedia.Camera.Core
8330     * @since 10
8331     */
8332    on(type: 'frameStart', callback: AsyncCallback<void>): void;
8333
8334    /**
8335     * Unsubscribes from frame start event callback.
8336     *
8337     * @param { 'frameStart' } type - Event type.
8338     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8339     * @syscap SystemCapability.Multimedia.Camera.Core
8340     * @since 10
8341     */
8342    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
8343
8344    /**
8345     * Subscribes frame end event callback.
8346     *
8347     * @param { 'frameEnd' } type - Event type.
8348     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8349     * @syscap SystemCapability.Multimedia.Camera.Core
8350     * @since 10
8351     */
8352    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
8353
8354    /**
8355     * Unsubscribes from frame end event callback.
8356     *
8357     * @param { 'frameEnd' } type - Event type.
8358     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8359     * @syscap SystemCapability.Multimedia.Camera.Core
8360     * @since 10
8361     */
8362    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
8363
8364    /**
8365     * Subscribes to error events.
8366     *
8367     * @param { 'error' } type - Event type.
8368     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8369     * @syscap SystemCapability.Multimedia.Camera.Core
8370     * @since 10
8371     */
8372    on(type: 'error', callback: ErrorCallback): void;
8373
8374    /**
8375     * Unsubscribes from error events.
8376     *
8377     * @param { 'error' } type - Event type.
8378     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8379     * @syscap SystemCapability.Multimedia.Camera.Core
8380     * @since 10
8381     */
8382    off(type: 'error', callback?: ErrorCallback): void;
8383
8384    /**
8385     * Gets the current preconfig type if you had already call preconfig interface.
8386     *
8387     * @returns { VideoProfile } The current preconfig type.
8388     * @throws { BusinessError } 7400201 - Camera service fatal error.
8389     * @syscap SystemCapability.Multimedia.Camera.Core
8390     * @since 12
8391     */
8392    getActiveProfile(): VideoProfile;
8393
8394    /**
8395     * Get supported video meta types.
8396     * @returns { Array<VideoMetaType> } The array of supported video meta type.
8397     * @throws { BusinessError } 202 - Not System Application.
8398     * @throws { BusinessError } 7400201 - Camera service fatal error.
8399     * @syscap SystemCapability.Multimedia.Camera.Core
8400     * @systemapi
8401     * @since 12
8402     */
8403    getSupportedVideoMetaTypes(): Array<VideoMetaType>;
8404
8405    /**
8406     * Attach a meta surface to VideoOutput.
8407     * @param { string } surfaceId - Surface object id used for receiving meta infos.
8408     * @param { VideoMetaType } type - Video meta type.
8409     * @throws { BusinessError } 202 - Not System Application.
8410     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8411     * @throws { BusinessError } 7400201 - Camera service fatal error.
8412     * @syscap SystemCapability.Multimedia.Camera.Core
8413     * @systemapi
8414     * @since 12
8415     */
8416    attachMetaSurface(surfaceId: string, type: VideoMetaType): void;
8417  }
8418
8419  /**
8420   * Video meta type.
8421   *
8422   * @enum { number }
8423   * @syscap SystemCapability.Multimedia.Camera.Core
8424   * @systemapi
8425   * @since 12
8426   */
8427  enum VideoMetaType {
8428    /**
8429     * Video meta type for storing maker info.
8430     * @syscap SystemCapability.Multimedia.Camera.Core
8431     * @systemapi
8432     * @since 12
8433     */
8434    VIDEO_META_MAKER_INFO = 0,
8435  }
8436
8437  /**
8438   * Metadata object type.
8439   *
8440   * @enum { number }
8441   * @syscap SystemCapability.Multimedia.Camera.Core
8442   * @since 10
8443   */
8444  enum MetadataObjectType {
8445    /**
8446     * Face detection type.
8447     *
8448     * @syscap SystemCapability.Multimedia.Camera.Core
8449     * @since 10
8450     */
8451    FACE_DETECTION = 0
8452  }
8453
8454  /**
8455   * Enum for light painting tabletype.
8456   *
8457   * @enum { number }
8458   * @syscap SystemCapability.Multimedia.Camera.Core
8459   * @systemapi
8460   * @since 12
8461   */
8462  enum LightPaintingType {
8463    /**
8464     * Traffic trails effect.
8465     *
8466     * @syscap SystemCapability.Multimedia.Camera.Core
8467     * @systemapi
8468     * @since 12
8469     */
8470    TRAFFIC_TRAILS = 0,
8471
8472    /**
8473     * Star trails effect.
8474     *
8475     * @syscap SystemCapability.Multimedia.Camera.Core
8476     * @systemapi
8477     * @since 12
8478     */
8479    STAR_TRAILS = 1,
8480
8481    /**
8482     * Silky water effect.
8483     *
8484     * @syscap SystemCapability.Multimedia.Camera.Core
8485     * @systemapi
8486     * @since 12
8487     */
8488    SILKY_WATER = 2,
8489
8490    /**
8491     * Light graffiti effect.
8492     *
8493     * @syscap SystemCapability.Multimedia.Camera.Core
8494     * @systemapi
8495     * @since 12
8496     */
8497    LIGHT_GRAFFITI = 3
8498  }
8499
8500  /**
8501   * Rectangle definition.
8502   *
8503   * @typedef Rect
8504   * @syscap SystemCapability.Multimedia.Camera.Core
8505   * @since 10
8506   */
8507  interface Rect {
8508    /**
8509     * X coordinator of top left point.
8510     *
8511     * @type { number }
8512     * @syscap SystemCapability.Multimedia.Camera.Core
8513     * @since 10
8514     */
8515    topLeftX: number;
8516    /**
8517     * Y coordinator of top left point.
8518     *
8519     * @type { number }
8520     * @syscap SystemCapability.Multimedia.Camera.Core
8521     * @since 10
8522     */
8523    topLeftY: number;
8524    /**
8525     * Width of this rectangle.
8526     *
8527     * @type { number }
8528     * @syscap SystemCapability.Multimedia.Camera.Core
8529     * @since 10
8530     */
8531    width: number;
8532    /**
8533     * Height of this rectangle.
8534     *
8535     * @type { number }
8536     * @syscap SystemCapability.Multimedia.Camera.Core
8537     * @since 10
8538     */
8539    height: number;
8540  }
8541
8542  /**
8543   * Metadata object basis.
8544   *
8545   * @typedef MetadataObject
8546   * @syscap SystemCapability.Multimedia.Camera.Core
8547   * @since 10
8548   */
8549  interface MetadataObject {
8550    /**
8551     * Metadata object type.
8552     *
8553     * @type { MetadataObjectType }
8554     * @readonly
8555     * @syscap SystemCapability.Multimedia.Camera.Core
8556     * @since 10
8557     */
8558    readonly type: MetadataObjectType;
8559    /**
8560     * Metadata object timestamp in milliseconds.
8561     *
8562     * @type { number }
8563     * @readonly
8564     * @syscap SystemCapability.Multimedia.Camera.Core
8565     * @since 10
8566     */
8567    readonly timestamp: number;
8568    /**
8569     * The axis-aligned bounding box of detected metadata object.
8570     *
8571     * @type { Rect }
8572     * @readonly
8573     * @syscap SystemCapability.Multimedia.Camera.Core
8574     * @since 10
8575     */
8576    readonly boundingBox: Rect;
8577  }
8578
8579  /**
8580   * Camera Occlusion Detection Result.
8581   *
8582   * @typedef CameraOcclusionDetectionResult
8583   * @syscap SystemCapability.Multimedia.Camera.Core
8584   * @systemapi
8585   * @since 12
8586   */
8587  interface CameraOcclusionDetectionResult {
8588    /**
8589     * Check whether camera is occluded.
8590     *
8591     * @type { boolean }
8592     * @syscap SystemCapability.Multimedia.Camera.Core
8593     * @systemapi
8594     * @since 12
8595     */
8596    readonly isCameraOccluded: boolean;
8597  }
8598
8599  /**
8600   * Metadata Output object
8601   *
8602   * @interface MetadataOutput
8603   * @syscap SystemCapability.Multimedia.Camera.Core
8604   * @since 10
8605   */
8606  interface MetadataOutput extends CameraOutput {
8607    /**
8608     * Start output metadata
8609     *
8610     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8611     * @throws { BusinessError } 7400103 - Session not config.
8612     * @throws { BusinessError } 7400201 - Camera service fatal error.
8613     * @syscap SystemCapability.Multimedia.Camera.Core
8614     * @since 10
8615     */
8616    start(callback: AsyncCallback<void>): void;
8617
8618    /**
8619     * Start output metadata
8620     *
8621     * @returns { Promise<void> } Promise used to return the result.
8622     * @throws { BusinessError } 7400103 - Session not config.
8623     * @throws { BusinessError } 7400201 - Camera service fatal error.
8624     * @syscap SystemCapability.Multimedia.Camera.Core
8625     * @since 10
8626     */
8627    start(): Promise<void>;
8628
8629    /**
8630     * Stop output metadata
8631     *
8632     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8633     * @syscap SystemCapability.Multimedia.Camera.Core
8634     * @since 10
8635     */
8636    stop(callback: AsyncCallback<void>): void;
8637
8638    /**
8639     * Stop output metadata
8640     *
8641     * @returns { Promise<void> } Promise used to return the result.
8642     * @syscap SystemCapability.Multimedia.Camera.Core
8643     * @since 10
8644     */
8645    stop(): Promise<void>;
8646
8647    /**
8648     * Subscribes to metadata objects available event callback.
8649     *
8650     * @param { 'metadataObjectsAvailable' } type - Event type.
8651     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
8652     * @syscap SystemCapability.Multimedia.Camera.Core
8653     * @since 10
8654     */
8655    on(type: 'metadataObjectsAvailable', callback: AsyncCallback<Array<MetadataObject>>): void;
8656
8657    /**
8658     * Unsubscribes from metadata objects available event callback.
8659     *
8660     * @param { 'metadataObjectsAvailable' } type - Event type.
8661     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
8662     * @syscap SystemCapability.Multimedia.Camera.Core
8663     * @since 10
8664     */
8665    off(type: 'metadataObjectsAvailable', callback?: AsyncCallback<Array<MetadataObject>>): void;
8666
8667    /**
8668     * Subscribes to error events.
8669     *
8670     * @param { 'error' } type - Event type.
8671     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8672     * @syscap SystemCapability.Multimedia.Camera.Core
8673     * @since 10
8674     */
8675    on(type: 'error', callback: ErrorCallback): void;
8676
8677    /**
8678     * Unsubscribes from error events.
8679     *
8680     * @param { 'error' } type - Event type.
8681     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8682     * @syscap SystemCapability.Multimedia.Camera.Core
8683     * @since 10
8684     */
8685    off(type: 'error', callback?: ErrorCallback): void;
8686  }
8687}
8688
8689export default camera;
8690