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   * Enum for quality prioritization.
4737   *
4738   * @enum { number }
4739   * @syscap SystemCapability.Multimedia.Camera.Core
4740   * @since 14
4741   */
4742  enum QualityPrioritization {
4743    /**
4744     * High quality priority.
4745     *
4746     * @syscap SystemCapability.Multimedia.Camera.Core
4747     * @since 14
4748     */
4749    HIGH_QUALITY = 0,
4750
4751    /**
4752     * Power balance priority.
4753     *
4754     * @syscap SystemCapability.Multimedia.Camera.Core
4755     * @since 14
4756     */
4757    POWER_BALANCE = 1
4758  }
4759
4760  /**
4761   * Video session object.
4762   *
4763   * @interface VideoSession
4764   * @syscap SystemCapability.Multimedia.Camera.Core
4765   * @since 11
4766   */
4767  interface VideoSession extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement {
4768    /**
4769     * Gets whether the choosed preconfig type can be used to configure video session.
4770     * Must choose preconfig type from {@link PreconfigType}.
4771     *
4772     * @param { PreconfigType } preconfigType - preconfig type.
4773     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4774     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
4775     * @returns { boolean } Whether the choosed preconfig type can be used.
4776     * @throws { BusinessError } 7400201 - Camera service fatal error.
4777     * @syscap SystemCapability.Multimedia.Camera.Core
4778     * @since 12
4779     */
4780    canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean;
4781
4782    /**
4783     * Configure video session with the preconfig type.
4784     * Must choose preconfig type from {@link PreconfigType}.
4785     *
4786     * @param { PreconfigType } preconfigType - preconfig type.
4787     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4788     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
4789     * @throws { BusinessError } 7400201 - Camera service fatal error.
4790     * @syscap SystemCapability.Multimedia.Camera.Core
4791     * @since 12
4792     */
4793    preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void;
4794
4795    /**
4796     * Subscribes to error events.
4797     *
4798     * @param { 'error' } type - Event type.
4799     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4800     * @syscap SystemCapability.Multimedia.Camera.Core
4801     * @since 11
4802     */
4803    on(type: 'error', callback: ErrorCallback): void;
4804
4805    /**
4806     * Unsubscribes from error events.
4807     *
4808     * @param { 'error' } type - Event type.
4809     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4810     * @syscap SystemCapability.Multimedia.Camera.Core
4811     * @since 11
4812     */
4813    off(type: 'error', callback?: ErrorCallback): void;
4814
4815    /**
4816     * Subscribes focus state change event callback.
4817     *
4818     * @param { 'focusStateChange' } type - Event type.
4819     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4820     * @syscap SystemCapability.Multimedia.Camera.Core
4821     * @since 11
4822     */
4823    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4824
4825    /**
4826     * Unsubscribes from focus state change event callback.
4827     *
4828     * @param { 'focusStateChange' } type - Event type.
4829     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4830     * @syscap SystemCapability.Multimedia.Camera.Core
4831     * @since 11
4832     */
4833    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4834
4835    /**
4836     * Subscribes zoom info event callback.
4837     *
4838     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4839     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4840     * @syscap SystemCapability.Multimedia.Camera.Core
4841     * @since 11
4842     */
4843    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
4844
4845    /**
4846     * Unsubscribes from zoom info event callback.
4847     *
4848     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4849     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4850     * @syscap SystemCapability.Multimedia.Camera.Core
4851     * @since 11
4852     */
4853    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
4854
4855    /**
4856     * Subscribes camera macro status event callback.
4857     *
4858     * @param { 'macroStatusChanged' } type - Event type.
4859     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4860     * @throws { BusinessError } 202 - Not System Application.
4861     * @syscap SystemCapability.Multimedia.Camera.Core
4862     * @systemapi
4863     * @since 11
4864     */
4865    on(type: 'macroStatusChanged', callback: AsyncCallback<boolean>): void;
4866
4867    /**
4868     * Unsubscribes camera macro status event callback.
4869     *
4870     * @param { 'macroStatusChanged' } type - Event type.
4871     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4872     * @throws { BusinessError } 202 - Not System Application.
4873     * @syscap SystemCapability.Multimedia.Camera.Core
4874     * @systemapi
4875     * @since 11
4876     */
4877    off(type: 'macroStatusChanged', callback?: AsyncCallback<boolean>): void;
4878
4879    /**
4880     * Gets session functions.
4881     *
4882     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability.
4883     * @returns { Array<VideoFunctions> } List of session functions.
4884     * @throws { BusinessError } 202 - Not System Application.
4885     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4886     * @syscap SystemCapability.Multimedia.Camera.Core
4887     * @systemapi
4888     * @since 12
4889     */
4890    getSessionFunctions(outputCapability: CameraOutputCapability): Array<VideoFunctions>;
4891
4892    /**
4893     * Gets session conflict functions.
4894     *
4895     * @returns { Array<VideoConflictFunctions> } List of session conflict functions.
4896     * @throws { BusinessError } 202 - Not System Application.
4897     * @syscap SystemCapability.Multimedia.Camera.Core
4898     * @systemapi
4899     * @since 12
4900     */
4901    getSessionConflictFunctions(): Array<VideoConflictFunctions>;
4902
4903    /**
4904     * Sets quality prioritization.
4905     *
4906     * @param { QualityPrioritization } quality - Target quality prioritization.
4907     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4908     * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types;
4909     * 3. Parameter verification failed.
4910     * @throws { BusinessError } 7400103 - Session not config.
4911
4912
4913     * @syscap SystemCapability.Multimedia.Camera.Core
4914     * @since 14
4915     */
4916    setQualityPrioritization(quality: QualityPrioritization): void;
4917  }
4918
4919  /**
4920   * Enumerates the camera portrait effects.
4921   *
4922   * @enum { number }
4923   * @syscap SystemCapability.Multimedia.Camera.Core
4924   * @systemapi
4925   * @since 10
4926   */
4927  enum PortraitEffect {
4928    /**
4929     * portrait effect off.
4930     *
4931     * @syscap SystemCapability.Multimedia.Camera.Core
4932     * @systemapi
4933     * @since 10
4934     */
4935    OFF = 0,
4936
4937    /**
4938     * circular blurring for portrait.
4939     *
4940     * @syscap SystemCapability.Multimedia.Camera.Core
4941     * @systemapi
4942     * @since 10
4943     */
4944    CIRCLES = 1,
4945
4946    /**
4947     * heart blurring for portrait.
4948     *
4949     * @syscap SystemCapability.Multimedia.Camera.Core
4950     * @systemapi
4951     * @since 11
4952     */
4953    HEART = 2,
4954
4955    /**
4956     * rotated blurring for portrait.
4957     *
4958     * @syscap SystemCapability.Multimedia.Camera.Core
4959     * @systemapi
4960     * @since 11
4961     */
4962    ROTATED = 3,
4963
4964    /**
4965     * studio blurring for portrait.
4966     *
4967     * @syscap SystemCapability.Multimedia.Camera.Core
4968     * @systemapi
4969     * @since 11
4970     */
4971    STUDIO = 4,
4972
4973    /**
4974     * theater blurring for portrait.
4975     *
4976     * @syscap SystemCapability.Multimedia.Camera.Core
4977     * @systemapi
4978     * @since 11
4979     */
4980    THEATER = 5
4981  }
4982
4983  /**
4984   * Portrait Query object.
4985   *
4986   * @interface PortraitQuery
4987   * @syscap SystemCapability.Multimedia.Camera.Core
4988   * @systemapi
4989   * @since 12
4990   */
4991  interface PortraitQuery {
4992    /**
4993     * Gets supported portrait effect.
4994     *
4995     * @returns { Array<PortraitEffect> } List of portrait effect.
4996     * @throws { BusinessError } 7400103 - Session not config.
4997     * @syscap SystemCapability.Multimedia.Camera.Core
4998     * @systemapi
4999     * @since 10
5000     */
5001    /**
5002     * Gets supported portrait effect.
5003     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5004     *
5005     * @returns { Array<PortraitEffect> } List of portrait effect.
5006     * @throws { BusinessError } 202 - Not System Application.
5007     * @throws { BusinessError } 7400103 - Session not config.
5008     * @syscap SystemCapability.Multimedia.Camera.Core
5009     * @systemapi
5010     * @since 11
5011     */
5012    /**
5013     * Gets supported portrait effect.
5014     * Move to PortraitQuery interface from Portrait interface since 12.
5015     *
5016     * @returns { Array<PortraitEffect> } List of portrait effect.
5017     * @throws { BusinessError } 202 - Not System Application.
5018     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5019     * @syscap SystemCapability.Multimedia.Camera.Core
5020     * @systemapi
5021     * @since 12
5022     */
5023    getSupportedPortraitEffects(): Array<PortraitEffect>;
5024  }
5025
5026  /**
5027   * Portrait object.
5028   *
5029   * @interface Portrait
5030   * @syscap SystemCapability.Multimedia.Camera.Core
5031   * @systemapi
5032   * @since 11
5033   */
5034  interface Portrait extends PortraitQuery {
5035    /**
5036     * Gets the portrait effect in use.
5037     *
5038     * @returns { PortraitEffect } The portrait effect in use.
5039     * @throws { BusinessError } 7400103 - Session not config.
5040     * @syscap SystemCapability.Multimedia.Camera.Core
5041     * @systemapi
5042     * @since 10
5043     */
5044    /**
5045     * Gets the portrait effect in use.
5046     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5047     *
5048     * @returns { PortraitEffect } The portrait effect in use.
5049     * @throws { BusinessError } 202 - Not System Application.
5050     * @throws { BusinessError } 7400103 - Session not config.
5051     * @syscap SystemCapability.Multimedia.Camera.Core
5052     * @systemapi
5053     * @since 11
5054     */
5055    getPortraitEffect(): PortraitEffect;
5056
5057    /**
5058     * Sets a portrait effect for a camera device.
5059     *
5060     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5061     * @throws { BusinessError } 7400103 - Session not config.
5062     * @syscap SystemCapability.Multimedia.Camera.Core
5063     * @systemapi
5064     * @since 10
5065     */
5066    /**
5067     * Sets a portrait effect for a camera device.
5068     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5069     *
5070     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5071     * @throws { BusinessError } 202 - Not System Application.
5072     * @throws { BusinessError } 7400103 - Session not config.
5073     * @syscap SystemCapability.Multimedia.Camera.Core
5074     * @systemapi
5075     * @since 11
5076     */
5077    setPortraitEffect(effect: PortraitEffect): void;
5078  }
5079
5080  /**
5081   * Zoom range.
5082   *
5083   * @typedef ZoomRange
5084   * @syscap SystemCapability.Multimedia.Camera.Core
5085   * @systemapi
5086   * @since 11
5087   */
5088  interface ZoomRange {
5089    /**
5090     * Min zoom value.
5091     *
5092     * @type { number }
5093     * @readonly
5094     * @syscap SystemCapability.Multimedia.Camera.Core
5095     * @systemapi
5096     * @since 11
5097     */
5098    readonly min: number;
5099
5100    /**
5101     * Max zoom value.
5102     *
5103     * @type { number }
5104     * @readonly
5105     * @syscap SystemCapability.Multimedia.Camera.Core
5106     * @systemapi
5107     * @since 11
5108     */
5109    readonly max: number;
5110  }
5111
5112  /**
5113   * Physical Aperture object
5114   *
5115   * @typedef PhysicalAperture
5116   * @syscap SystemCapability.Multimedia.Camera.Core
5117   * @systemapi
5118   * @since 11
5119   */
5120  interface PhysicalAperture {
5121    /**
5122     * Zoom Range of the specific physical aperture.
5123     *
5124     * @type { ZoomRange }
5125     * @syscap SystemCapability.Multimedia.Camera.Core
5126     * @systemapi
5127     * @since 11
5128     */
5129    zoomRange: ZoomRange;
5130
5131    /**
5132     * The supported physical apertures.
5133     *
5134     * @type { Array<number> }
5135     * @syscap SystemCapability.Multimedia.Camera.Core
5136     * @systemapi
5137     * @since 11
5138     */
5139    apertures: Array<number>;
5140  }
5141
5142  /**
5143   * Aperture Query object.
5144   *
5145   * @interface ApertureQuery
5146   * @syscap SystemCapability.Multimedia.Camera.Core
5147   * @systemapi
5148   * @since 12
5149   */
5150  interface ApertureQuery {
5151    /**
5152     * Gets the supported virtual apertures.
5153     *
5154     * @returns { Array<number> } The array of supported virtual apertures.
5155     * @throws { BusinessError } 202 - Not System Application.
5156     * @throws { BusinessError } 7400103 - Session not config.
5157     * @syscap SystemCapability.Multimedia.Camera.Core
5158     * @systemapi
5159     * @since 11
5160     */
5161    /**
5162     * Gets the supported virtual apertures.
5163     * Move to ApertureQuery interface from Aperture since 12.
5164     *
5165     * @returns { Array<number> } The array of supported virtual apertures.
5166     * @throws { BusinessError } 202 - Not System Application.
5167     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5168     * @syscap SystemCapability.Multimedia.Camera.Core
5169     * @systemapi
5170     * @since 12
5171     */
5172    getSupportedVirtualApertures(): Array<number>;
5173
5174    /**
5175     * Gets the supported physical apertures.
5176     *
5177     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5178     * @throws { BusinessError } 202 - Not System Application.
5179     * @throws { BusinessError } 7400103 - Session not config.
5180     * @syscap SystemCapability.Multimedia.Camera.Core
5181     * @systemapi
5182     * @since 11
5183     */
5184     /**
5185     * Gets the supported physical apertures.
5186     * Move to ApertureQuery interface from Aperture since 12.
5187     *
5188     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5189     * @throws { BusinessError } 202 - Not System Application.
5190     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5191     * @syscap SystemCapability.Multimedia.Camera.Core
5192     * @systemapi
5193     * @since 12
5194     */
5195    getSupportedPhysicalApertures(): Array<PhysicalAperture>;
5196  }
5197
5198  /**
5199   * Aperture object.
5200   *
5201   * @interface Aperture
5202   * @syscap SystemCapability.Multimedia.Camera.Core
5203   * @systemapi
5204   * @since 11
5205   */
5206  interface Aperture extends ApertureQuery {
5207    /**
5208     * Gets current virtual aperture value.
5209     *
5210     * @returns { number } The current virtual aperture value.
5211     * @throws { BusinessError } 202 - Not System Application.
5212     * @throws { BusinessError } 7400103 - Session not config.
5213     * @syscap SystemCapability.Multimedia.Camera.Core
5214     * @systemapi
5215     * @since 11
5216     */
5217    getVirtualAperture(): number;
5218
5219    /**
5220     * Sets virtual aperture value.
5221     *
5222     * @param { number } aperture - virtual aperture value
5223     * @throws { BusinessError } 202 - Not System Application.
5224     * @throws { BusinessError } 7400103 - Session not config.
5225     * @syscap SystemCapability.Multimedia.Camera.Core
5226     * @systemapi
5227     * @since 11
5228     */
5229    setVirtualAperture(aperture: number): void;
5230
5231    /**
5232     * Gets current physical aperture value.
5233     *
5234     * @returns { number } The current physical aperture value.
5235     * @throws { BusinessError } 202 - Not System Application.
5236     * @throws { BusinessError } 7400103 - Session not config.
5237     * @syscap SystemCapability.Multimedia.Camera.Core
5238     * @systemapi
5239     * @since 11
5240     */
5241    getPhysicalAperture(): number;
5242
5243    /**
5244     * Sets physical aperture value.
5245     *
5246     * @param { number } aperture - physical aperture value
5247     * @throws { BusinessError } 202 - Not System Application.
5248     * @throws { BusinessError } 7400103 - Session not config.
5249     * @syscap SystemCapability.Multimedia.Camera.Core
5250     * @systemapi
5251     * @since 11
5252     */
5253    setPhysicalAperture(aperture: number): void;
5254  }
5255
5256  /**
5257     * Portrait Photo session object.
5258     *
5259     * @interface PortraitPhotoSession
5260     * @syscap SystemCapability.Multimedia.Camera.Core
5261     * @systemapi
5262     * @since 11
5263     */
5264  interface PortraitPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, Beauty, ColorEffect, ColorManagement, Portrait, Aperture {
5265    /**
5266     * Subscribes to error events.
5267     *
5268     * @param { 'error' } type - Event type.
5269     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5270     * @syscap SystemCapability.Multimedia.Camera.Core
5271     * @systemapi
5272     * @since 11
5273     */
5274    on(type: 'error', callback: ErrorCallback): void;
5275
5276    /**
5277     * Unsubscribes from error events.
5278     *
5279     * @param { 'error' } type - Event type.
5280     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5281     * @syscap SystemCapability.Multimedia.Camera.Core
5282     * @systemapi
5283     * @since 11
5284     */
5285    off(type: 'error', callback?: ErrorCallback): void;
5286
5287    /**
5288     * Subscribes focus state change event callback.
5289     *
5290     * @param { 'focusStateChange' } type - Event type.
5291     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5292     * @syscap SystemCapability.Multimedia.Camera.Core
5293     * @systemapi
5294     * @since 11
5295     */
5296    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5297
5298    /**
5299     * Unsubscribes from focus state change event callback.
5300     *
5301     * @param { 'focusStateChange' } type - Event type.
5302     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5303     * @syscap SystemCapability.Multimedia.Camera.Core
5304     * @systemapi
5305     * @since 11
5306     */
5307    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5308
5309    /**
5310     * Subscribes zoom info event callback.
5311     *
5312     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5313     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5314     * @syscap SystemCapability.Multimedia.Camera.Core
5315     * @systemapi
5316     * @since 11
5317     */
5318    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5319
5320    /**
5321     * Unsubscribes from zoom info event callback.
5322     *
5323     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5324     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5325     * @syscap SystemCapability.Multimedia.Camera.Core
5326     * @systemapi
5327     * @since 11
5328     */
5329    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5330
5331    /**
5332     * Gets session functions.
5333     *
5334     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability.
5335     * @returns { Array<PortraitPhotoFunctions> } List of session functions.
5336     * @throws { BusinessError } 202 - Not System Application.
5337     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5338     * @syscap SystemCapability.Multimedia.Camera.Core
5339     * @systemapi
5340     * @since 12
5341     */
5342    getSessionFunctions(outputCapability: CameraOutputCapability): Array<PortraitPhotoFunctions>;
5343
5344    /**
5345     * Gets session conflict functions.
5346     *
5347     * @returns { Array<PortraitPhotoConflictFunctions> } List of session conflict functions.
5348     * @throws { BusinessError } 202 - Not System Application.
5349     * @syscap SystemCapability.Multimedia.Camera.Core
5350     * @systemapi
5351     * @since 12
5352     */
5353    getSessionConflictFunctions(): Array<PortraitPhotoConflictFunctions>;
5354  }
5355
5356  /**
5357     * Aperture video session object.
5358     *
5359     * @interface ApertureVideoSession
5360     * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture
5361     * @syscap SystemCapability.Multimedia.Camera.Core
5362     * @systemapi
5363     * @since 12
5364     */
5365  interface ApertureVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture {
5366    /**
5367     * Subscribes to error events.
5368     *
5369     * @param { 'error' } type - Event type.
5370     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5371     * @throws { BusinessError } 202 - Not System Application.
5372     * @syscap SystemCapability.Multimedia.Camera.Core
5373     * @systemapi
5374     * @since 12
5375     */
5376    on(type: 'error', callback: ErrorCallback): void;
5377
5378    /**
5379     * Unsubscribes from error events.
5380     *
5381     * @param { 'error' } type - Event type.
5382     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5383     * @throws { BusinessError } 202 - Not System Application.
5384     * @syscap SystemCapability.Multimedia.Camera.Core
5385     * @systemapi
5386     * @since 12
5387     */
5388    off(type: 'error', callback?: ErrorCallback): void;
5389
5390    /**
5391     * Subscribes focus state change event callback.
5392     *
5393     * @param { 'focusStateChange' } type - Event type.
5394     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5395     * @throws { BusinessError } 202 - Not System Application.
5396     * @syscap SystemCapability.Multimedia.Camera.Core
5397     * @systemapi
5398     * @since 12
5399     */
5400    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5401
5402    /**
5403     * Unsubscribes from focus state change event callback.
5404     *
5405     * @param { 'focusStateChange' } type - Event type.
5406     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5407     * @throws { BusinessError } 202 - Not System Application.
5408     * @syscap SystemCapability.Multimedia.Camera.Core
5409     * @systemapi
5410     * @since 12
5411     */
5412    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5413
5414    /**
5415     * Subscribes zoom info event callback.
5416     *
5417     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5418     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5419     * @throws { BusinessError } 202 - Not System Application.
5420     * @syscap SystemCapability.Multimedia.Camera.Core
5421     * @systemapi
5422     * @since 12
5423     */
5424    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5425
5426    /**
5427     * Unsubscribes from zoom info event callback.
5428     *
5429     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5430     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5431     * @throws { BusinessError } 202 - Not System Application.
5432     * @syscap SystemCapability.Multimedia.Camera.Core
5433     * @systemapi
5434     * @since 12
5435     */
5436    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5437  }
5438
5439  /**
5440   * ManualExposure Query object.
5441   *
5442   * @interface ManualExposureQuery
5443   * @syscap SystemCapability.Multimedia.Camera.Core
5444   * @systemapi
5445   * @since 12
5446   */
5447  interface ManualExposureQuery {
5448    /**
5449     * Gets the supported manual exposure range.
5450     *
5451     * @returns { Array<number> } The array of manual exposure range.
5452     * @throws { BusinessError } 202 - Not System Application.
5453     * @throws { BusinessError } 7400103 - Session not config.
5454     * @syscap SystemCapability.Multimedia.Camera.Core
5455     * @systemapi
5456     * @since 11
5457     */
5458    /**
5459     * Gets the supported manual exposure range.
5460     * Move to ManualExposureQuery from ManualExposure since 12.
5461     *
5462     * @returns { Array<number> } The array of manual exposure range.
5463     * @throws { BusinessError } 202 - Not System Application.
5464     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5465     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5466     * @syscap SystemCapability.Multimedia.Camera.Core
5467     * @systemapi
5468     * @since 12
5469     */
5470    getSupportedExposureRange(): Array<number>;
5471  }
5472
5473  /**
5474   * ManualExposure object.
5475   *
5476   * @interface ManualExposure
5477   * @syscap SystemCapability.Multimedia.Camera.Core
5478   * @systemapi
5479   * @since 11
5480   */
5481  interface ManualExposure extends ManualExposureQuery {
5482    /**
5483     * Gets current exposure value.
5484     *
5485     * @returns { number } The current exposure value.
5486     * @throws { BusinessError } 202 - Not System Application.
5487     * @throws { BusinessError } 7400103 - Session not config.
5488     * @syscap SystemCapability.Multimedia.Camera.Core
5489     * @systemapi
5490     * @since 11
5491     */
5492    /**
5493     * Gets current exposure value.
5494     *
5495     * @returns { number } The current exposure value.
5496     * @throws { BusinessError } 202 - Not System Application.
5497     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5498     * @throws { BusinessError } 7400103 - Session not config.
5499     * @syscap SystemCapability.Multimedia.Camera.Core
5500     * @systemapi
5501     * @since 12
5502     */
5503    getExposure(): number;
5504
5505    /**
5506     * Sets Exposure value.
5507     *
5508     * @param { number } exposure - Exposure value
5509     * @throws { BusinessError } 202 - Not System Application.
5510     * @throws { BusinessError } 7400103 - Session not config.
5511     * @syscap SystemCapability.Multimedia.Camera.Core
5512     * @systemapi
5513     * @since 11
5514     */
5515    /**
5516     * Sets Exposure value.
5517     *
5518     * @param { number } exposure - Exposure value
5519     * @throws { BusinessError } 202 - Not System Application.
5520     * @throws { BusinessError } 7400102 - Operation not allowed.
5521     * @throws { BusinessError } 7400103 - Session not config.
5522     * @syscap SystemCapability.Multimedia.Camera.Core
5523     * @systemapi
5524     * @since 12
5525     */
5526    setExposure(exposure: number): void;
5527  }
5528
5529  /**
5530   * Night photo session object.
5531   *
5532   * @interface NightPhotoSession
5533   * @syscap SystemCapability.Multimedia.Camera.Core
5534   * @systemapi
5535   * @since 11
5536   */
5537  interface NightPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Beauty, ColorManagement, ManualExposure {
5538    /**
5539     * Subscribes to error events.
5540     *
5541     * @param { 'error' } type - Event type.
5542     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5543     * @syscap SystemCapability.Multimedia.Camera.Core
5544     * @systemapi
5545     * @since 11
5546     */
5547    on(type: 'error', callback: ErrorCallback): void;
5548
5549    /**
5550     * Unsubscribes from error events.
5551     *
5552     * @param { 'error' } type - Event type.
5553     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5554     * @syscap SystemCapability.Multimedia.Camera.Core
5555     * @systemapi
5556     * @since 11
5557     */
5558    off(type: 'error', callback?: ErrorCallback): void;
5559
5560    /**
5561     * Subscribes focus state change event callback.
5562     *
5563     * @param { 'focusStateChange' } type - Event type.
5564     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5565     * @syscap SystemCapability.Multimedia.Camera.Core
5566     * @systemapi
5567     * @since 11
5568     */
5569    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5570
5571    /**
5572     * Unsubscribes from focus state change event callback.
5573     *
5574     * @param { 'focusStateChange' } type - Event type.
5575     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5576     * @syscap SystemCapability.Multimedia.Camera.Core
5577     * @systemapi
5578     * @since 11
5579     */
5580    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5581
5582    /**
5583     * Subscribes zoom info event callback.
5584     *
5585     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5586     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5587     * @syscap SystemCapability.Multimedia.Camera.Core
5588     * @systemapi
5589     * @since 11
5590     */
5591    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5592
5593    /**
5594     * Unsubscribes from zoom info event callback.
5595     *
5596     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5597     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5598     * @syscap SystemCapability.Multimedia.Camera.Core
5599     * @systemapi
5600     * @since 11
5601     */
5602    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5603
5604    /**
5605     * Subscribes to lcd flash status.
5606     *
5607     * @param { 'lcdFlashStatus' } type - Event type.
5608     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5609     * @throws { BusinessError } 202 - Not System Application.
5610     * @syscap SystemCapability.Multimedia.Camera.Core
5611     * @systemapi
5612     * @since 12
5613     */
5614    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
5615
5616    /**
5617     * Unsubscribes from lcd flash status.
5618     *
5619     * @param { 'lcdFlashStatus' } type - Event type.
5620     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5621     * @throws { BusinessError } 202 - Not System Application.
5622     * @syscap SystemCapability.Multimedia.Camera.Core
5623     * @systemapi
5624     * @since 12
5625     */
5626    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
5627  }
5628
5629  /**
5630   * ISO info object
5631   *
5632   * @typedef IsoInfo
5633   * @syscap SystemCapability.Multimedia.Camera.Core
5634   * @systemapi
5635   * @since 12
5636   */
5637  interface IsoInfo {
5638    /**
5639     * ISO value.
5640     *
5641     * @type { ?number }
5642     * @readonly
5643     * @syscap SystemCapability.Multimedia.Camera.Core
5644     * @systemapi
5645     * @since 12
5646     */
5647    readonly iso?: number;
5648  }
5649
5650  /**
5651   * Exposure info object
5652   *
5653   * @typedef ExposureInfo
5654   * @syscap SystemCapability.Multimedia.Camera.Core
5655   * @systemapi
5656   * @since 12
5657   */
5658  interface ExposureInfo {
5659    /**
5660     * Exposure time value.
5661     *
5662     * @type { ?number }
5663     * @readonly
5664     * @syscap SystemCapability.Multimedia.Camera.Core
5665     * @systemapi
5666     * @since 12
5667     */
5668    readonly exposureTime?: number;
5669  }
5670
5671  /**
5672   * Aperture info object
5673   *
5674   * @typedef ApertureInfo
5675   * @syscap SystemCapability.Multimedia.Camera.Core
5676   * @systemapi
5677   * @since 12
5678   */
5679  interface ApertureInfo {
5680    /**
5681     * Aperture value.
5682     *
5683     * @type { ?number }
5684     * @readonly
5685     * @syscap SystemCapability.Multimedia.Camera.Core
5686     * @systemapi
5687     * @since 12
5688     */
5689    readonly aperture?: number;
5690  }
5691
5692  /**
5693   * Lumination info object
5694   *
5695   * @typedef LuminationInfo
5696   * @syscap SystemCapability.Multimedia.Camera.Core
5697   * @systemapi
5698   * @since 12
5699   */
5700  interface LuminationInfo {
5701    /**
5702     * Lumination value.
5703     *
5704     * @type { ?number }
5705     * @readonly
5706     * @syscap SystemCapability.Multimedia.Camera.Core
5707     * @systemapi
5708     * @since 12
5709     */
5710    readonly lumination?: number;
5711  }
5712
5713  /**
5714   * Professional photo session object.
5715   *
5716   * @interface ProfessionalPhotoSession
5717   * @syscap SystemCapability.Multimedia.Camera.Core
5718   * @systemapi
5719   * @since 12
5720   */
5721  interface ProfessionalPhotoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
5722    /**
5723     * Subscribes to error events.
5724     *
5725     * @param { 'error' } type - Event type.
5726     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5727     * @throws { BusinessError } 202 - Not System Application.
5728     * @syscap SystemCapability.Multimedia.Camera.Core
5729     * @systemapi
5730     * @since 12
5731     */
5732    on(type: 'error', callback: ErrorCallback): void;
5733
5734    /**
5735     * Unsubscribes from error events.
5736     *
5737     * @param { 'error' } type - Event type.
5738     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5739     * @throws { BusinessError } 202 - Not System Application.
5740     * @syscap SystemCapability.Multimedia.Camera.Core
5741     * @systemapi
5742     * @since 12
5743     */
5744    off(type: 'error', callback?: ErrorCallback): void;
5745
5746    /**
5747     * Subscribes focus state change event callback.
5748     *
5749     * @param { 'focusStateChange' } type - Event type.
5750     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5751     * @throws { BusinessError } 202 - Not System Application.
5752     * @syscap SystemCapability.Multimedia.Camera.Core
5753     * @systemapi
5754     * @since 12
5755     */
5756    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5757
5758    /**
5759     * Unsubscribes from focus state change event callback.
5760     *
5761     * @param { 'focusStateChange' } type - Event type.
5762     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5763     * @throws { BusinessError } 202 - Not System Application.
5764     * @syscap SystemCapability.Multimedia.Camera.Core
5765     * @systemapi
5766     * @since 12
5767     */
5768    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5769
5770    /**
5771     * Subscribes zoom info event callback.
5772     *
5773     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5774     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5775     * @throws { BusinessError } 202 - Not System Application.
5776     * @syscap SystemCapability.Multimedia.Camera.Core
5777     * @systemapi
5778     * @since 12
5779     */
5780    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5781
5782    /**
5783     * Unsubscribes from zoom info event callback.
5784     *
5785     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5786     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5787     * @throws { BusinessError } 202 - Not System Application.
5788     * @syscap SystemCapability.Multimedia.Camera.Core
5789     * @systemapi
5790     * @since 12
5791     */
5792    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5793
5794    /**
5795     * Subscribes ISO info event callback.
5796     *
5797     * @param { 'isoInfo' } type - Event type.
5798     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5799     * @throws { BusinessError } 202 - Not System Application.
5800     * @syscap SystemCapability.Multimedia.Camera.Core
5801     * @systemapi
5802     * @since 12
5803     */
5804    on(type: 'isoInfo', callback: AsyncCallback<IsoInfo>): void;
5805
5806    /**
5807     * Unsubscribes from ISO info event callback.
5808     *
5809     * @param { 'isoInfo' } type - Event type.
5810     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5811     * @throws { BusinessError } 202 - Not System Application.
5812     * @syscap SystemCapability.Multimedia.Camera.Core
5813     * @systemapi
5814     * @since 12
5815     */
5816    off(type: 'isoInfo', callback?: AsyncCallback<IsoInfo>): void;
5817
5818    /**
5819     * Subscribes exposure info event callback.
5820     *
5821     * @param { 'exposureInfo' } type - Event type.
5822     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5823     * @throws { BusinessError } 202 - Not System Application.
5824     * @syscap SystemCapability.Multimedia.Camera.Core
5825     * @systemapi
5826     * @since 12
5827     */
5828    on(type: 'exposureInfo', callback: AsyncCallback<ExposureInfo>): void;
5829
5830    /**
5831     * Unsubscribes from exposure info event callback.
5832     *
5833     * @param { 'exposureInfo' } type - Event type.
5834     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
5835     * @throws { BusinessError } 202 - Not System Application.
5836     * @syscap SystemCapability.Multimedia.Camera.Core
5837     * @systemapi
5838     * @since 12
5839     */
5840    off(type: 'exposureInfo', callback?: AsyncCallback<ExposureInfo>): void;
5841
5842    /**
5843     * Subscribes aperture info event callback.
5844     *
5845     * @param { 'apertureInfo' } type - Event type.
5846     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5847     * @throws { BusinessError } 202 - Not System Application.
5848     * @syscap SystemCapability.Multimedia.Camera.Core
5849     * @systemapi
5850     * @since 12
5851     */
5852    on(type: 'apertureInfo', callback: AsyncCallback<ApertureInfo>): void;
5853
5854    /**
5855     * Unsubscribes from aperture info event callback.
5856     *
5857     * @param { 'apertureInfo' } type - Event type.
5858     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
5859     * @throws { BusinessError } 202 - Not System Application.
5860     * @syscap SystemCapability.Multimedia.Camera.Core
5861     * @systemapi
5862     * @since 12
5863     */
5864    off(type: 'apertureInfo', callback?: AsyncCallback<ApertureInfo>): void;
5865
5866    /**
5867     * Subscribes lumination info event callback.
5868     *
5869     * @param { 'luminationInfo' } type - Event type.
5870     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
5871     * @throws { BusinessError } 202 - Not System Application.
5872     * @syscap SystemCapability.Multimedia.Camera.Core
5873     * @systemapi
5874     * @since 12
5875     */
5876    on(type: 'luminationInfo', callback: AsyncCallback<LuminationInfo>): void;
5877
5878    /**
5879     * Unsubscribes from lumination info event callback.
5880     *
5881     * @param { 'luminationInfo' } type - Event type.
5882     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
5883     * @throws { BusinessError } 202 - Not System Application.
5884     * @syscap SystemCapability.Multimedia.Camera.Core
5885     * @systemapi
5886     * @since 12
5887     */
5888    off(type: 'luminationInfo', callback?: AsyncCallback<LuminationInfo>): void;
5889  }
5890
5891  /**
5892   * Professional video session object.
5893   *
5894   * @interface ProfessionalVideoSession
5895   * @syscap SystemCapability.Multimedia.Camera.Core
5896   * @systemapi
5897   * @since 12
5898   */
5899  interface ProfessionalVideoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
5900    /**
5901     * Subscribes to error events.
5902     *
5903     * @param { 'error' } type - Event type.
5904     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5905     * @throws { BusinessError } 202 - Not System Application.
5906     * @syscap SystemCapability.Multimedia.Camera.Core
5907     * @systemapi
5908     * @since 12
5909     */
5910    on(type: 'error', callback: ErrorCallback): void;
5911
5912    /**
5913     * Unsubscribes from error events.
5914     *
5915     * @param { 'error' } type - Event type.
5916     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5917     * @throws { BusinessError } 202 - Not System Application.
5918     * @syscap SystemCapability.Multimedia.Camera.Core
5919     * @systemapi
5920     * @since 12
5921     */
5922    off(type: 'error', callback?: ErrorCallback): void;
5923
5924    /**
5925     * Subscribes focus state change event callback.
5926     *
5927     * @param { 'focusStateChange' } type - Event type.
5928     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5929     * @throws { BusinessError } 202 - Not System Application.
5930     * @syscap SystemCapability.Multimedia.Camera.Core
5931     * @systemapi
5932     * @since 12
5933     */
5934    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5935
5936    /**
5937     * Unsubscribes from focus state change event callback.
5938     *
5939     * @param { 'focusStateChange' } type - Event type.
5940     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5941     * @throws { BusinessError } 202 - Not System Application.
5942     * @syscap SystemCapability.Multimedia.Camera.Core
5943     * @systemapi
5944     * @since 12
5945     */
5946    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5947
5948    /**
5949     * Subscribes zoom info event callback.
5950     *
5951     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5952     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5953     * @throws { BusinessError } 202 - Not System Application.
5954     * @syscap SystemCapability.Multimedia.Camera.Core
5955     * @systemapi
5956     * @since 12
5957     */
5958    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5959
5960    /**
5961     * Unsubscribes from zoom info event callback.
5962     *
5963     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5964     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5965     * @throws { BusinessError } 202 - Not System Application.
5966     * @syscap SystemCapability.Multimedia.Camera.Core
5967     * @systemapi
5968     * @since 12
5969     */
5970    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5971
5972    /**
5973     * Subscribes ISO info event callback.
5974     *
5975     * @param { 'isoInfo' } type - Event type.
5976     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5977     * @throws { BusinessError } 202 - Not System Application.
5978     * @syscap SystemCapability.Multimedia.Camera.Core
5979     * @systemapi
5980     * @since 12
5981     */
5982    on(type: 'isoInfo', callback: AsyncCallback<IsoInfo>): void;
5983
5984    /**
5985     * Unsubscribes from ISO info event callback.
5986     *
5987     * @param { 'isoInfo' } type - Event type.
5988     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
5989     * @throws { BusinessError } 202 - Not System Application.
5990     * @syscap SystemCapability.Multimedia.Camera.Core
5991     * @systemapi
5992     * @since 12
5993     */
5994    off(type: 'isoInfo', callback?: AsyncCallback<IsoInfo>): void;
5995
5996    /**
5997     * Subscribes exposure info event callback.
5998     *
5999     * @param { 'exposureInfo' } type - Event type.
6000     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6001     * @throws { BusinessError } 202 - Not System Application.
6002     * @syscap SystemCapability.Multimedia.Camera.Core
6003     * @systemapi
6004     * @since 12
6005     */
6006    on(type: 'exposureInfo', callback: AsyncCallback<ExposureInfo>): void;
6007
6008    /**
6009     * Unsubscribes from exposure info event callback.
6010     *
6011     * @param { 'exposureInfo' } type - Event type.
6012     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6013     * @throws { BusinessError } 202 - Not System Application.
6014     * @syscap SystemCapability.Multimedia.Camera.Core
6015     * @systemapi
6016     * @since 12
6017     */
6018    off(type: 'exposureInfo', callback?: AsyncCallback<ExposureInfo>): void;
6019
6020    /**
6021     * Subscribes aperture info event callback.
6022     *
6023     * @param { 'apertureInfo' } type - Event type.
6024     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6025     * @throws { BusinessError } 202 - Not System Application.
6026     * @syscap SystemCapability.Multimedia.Camera.Core
6027     * @systemapi
6028     * @since 12
6029     */
6030    on(type: 'apertureInfo', callback: AsyncCallback<ApertureInfo>): void;
6031
6032    /**
6033     * Unsubscribes from aperture info event callback.
6034     *
6035     * @param { 'apertureInfo' } type - Event type.
6036     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6037     * @throws { BusinessError } 202 - Not System Application.
6038     * @syscap SystemCapability.Multimedia.Camera.Core
6039     * @systemapi
6040     * @since 12
6041     */
6042    off(type: 'apertureInfo', callback?: AsyncCallback<ApertureInfo>): void;
6043
6044    /**
6045     * Subscribes lumination info event callback.
6046     *
6047     * @param { 'luminationInfo' } type - Event type.
6048     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6049     * @throws { BusinessError } 202 - Not System Application.
6050     * @syscap SystemCapability.Multimedia.Camera.Core
6051     * @systemapi
6052     * @since 12
6053     */
6054    on(type: 'luminationInfo', callback: AsyncCallback<LuminationInfo>): void;
6055
6056    /**
6057     * Unsubscribes from lumination info event callback.
6058     *
6059     * @param { 'luminationInfo' } type - Event type.
6060     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6061     * @throws { BusinessError } 202 - Not System Application.
6062     * @syscap SystemCapability.Multimedia.Camera.Core
6063     * @systemapi
6064     * @since 12
6065     */
6066    off(type: 'luminationInfo', callback?: AsyncCallback<LuminationInfo>): void;
6067  }
6068
6069  /**
6070   * Enum for slow motion status.
6071   *
6072   * @enum { number }
6073   * @syscap SystemCapability.Multimedia.Camera.Core
6074   * @systemapi
6075   * @since 12
6076   */
6077  enum SlowMotionStatus {
6078    /**
6079     * Slow motion disabled.
6080     *
6081     * @syscap SystemCapability.Multimedia.Camera.Core
6082     * @systemapi
6083     * @since 12
6084     */
6085    DISABLED = 0,
6086
6087    /**
6088     * Slow motion ready.
6089     *
6090     * @syscap SystemCapability.Multimedia.Camera.Core
6091     * @systemapi
6092     * @since 12
6093     */
6094    READY = 1,
6095
6096    /**
6097     * Slow motion video start.
6098     *
6099     * @syscap SystemCapability.Multimedia.Camera.Core
6100     * @systemapi
6101     * @since 12
6102     */
6103    VIDEO_START = 2,
6104
6105    /**
6106     * Slow motion video done.
6107     *
6108     * @syscap SystemCapability.Multimedia.Camera.Core
6109     * @systemapi
6110     * @since 12
6111     */
6112    VIDEO_DONE = 3,
6113
6114    /**
6115     * Slow motion finished.
6116     *
6117     * @syscap SystemCapability.Multimedia.Camera.Core
6118     * @systemapi
6119     * @since 12
6120     */
6121    FINISHED = 4
6122  }
6123
6124  /**
6125   * Slow motion video session object.
6126   *
6127   * @interface SlowMotionVideoSession
6128   * @syscap SystemCapability.Multimedia.Camera.Core
6129   * @systemapi
6130   * @since 12
6131   */
6132  interface SlowMotionVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect {
6133    /**
6134     * Subscribes to error events.
6135     *
6136     * @param { 'error' } type - Event type.
6137     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6138     * @throws { BusinessError } 202 - Not System Application.
6139     * @syscap SystemCapability.Multimedia.Camera.Core
6140     * @systemapi
6141     * @since 12
6142     */
6143    on(type: 'error', callback: ErrorCallback): void;
6144
6145    /**
6146     * Unsubscribes from error events.
6147     *
6148     * @param { 'error' } type - Event type.
6149     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6150     * @throws { BusinessError } 202 - Not System Application.
6151     * @syscap SystemCapability.Multimedia.Camera.Core
6152     * @systemapi
6153     * @since 12
6154     */
6155    off(type: 'error', callback?: ErrorCallback): void;
6156
6157    /**
6158     * Subscribes focus state change event callback.
6159     *
6160     * @param { 'focusStateChange' } type - Event type.
6161     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6162     * @throws { BusinessError } 202 - Not System Application.
6163     * @syscap SystemCapability.Multimedia.Camera.Core
6164     * @systemapi
6165     * @since 12
6166     */
6167    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6168
6169    /**
6170     * Unsubscribes from focus state change event callback.
6171     *
6172     * @param { 'focusStateChange' } type - Event type.
6173     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6174     * @throws { BusinessError } 202 - Not System Application.
6175     * @syscap SystemCapability.Multimedia.Camera.Core
6176     * @systemapi
6177     * @since 12
6178     */
6179    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6180
6181    /**
6182     * Subscribes zoom info event callback.
6183     *
6184     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6185     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6186     * @throws { BusinessError } 202 - Not System Application.
6187     * @syscap SystemCapability.Multimedia.Camera.Core
6188     * @systemapi
6189     * @since 12
6190     */
6191    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6192
6193    /**
6194     * Unsubscribes from zoom info event callback.
6195     *
6196     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6197     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6198     * @throws { BusinessError } 202 - Not System Application.
6199     * @syscap SystemCapability.Multimedia.Camera.Core
6200     * @systemapi
6201     * @since 12
6202     */
6203    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6204
6205    /**
6206     * Determine whether camera slow motion detection is supported.
6207     *
6208     * @returns { boolean } Is camera slow motion detection supported.
6209     * @throws { BusinessError } 202 - Not System Application.
6210     * @throws { BusinessError } 7400103 - Session not config.
6211     * @syscap SystemCapability.Multimedia.Camera.Core
6212     * @systemapi
6213     * @since 12
6214     */
6215    isSlowMotionDetectionSupported(): boolean;
6216
6217    /**
6218     * Set slow motion detection area.
6219     *
6220     * @param { Rect } area - Detection area.
6221     * @throws { BusinessError } 202 - Not System Application.
6222     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6223     * @throws { BusinessError } 7400103 - Session not config.
6224     * @syscap SystemCapability.Multimedia.Camera.Core
6225     * @systemapi
6226     * @since 12
6227     */
6228    setSlowMotionDetectionArea(area: Rect): void;
6229
6230    /**
6231     * Subscribes slow motion status callback.
6232     *
6233     * @param { 'slowMotionStatus' } type - Event type.
6234     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6235     * @throws { BusinessError } 202 - Not System Application.
6236     * @syscap SystemCapability.Multimedia.Camera.Core
6237     * @systemapi
6238     * @since 12
6239     */
6240    on(type: 'slowMotionStatus', callback: AsyncCallback<SlowMotionStatus>): void;
6241
6242    /**
6243     * Unsubscribes slow motion status callback.
6244     *
6245     * @param { 'slowMotionStatus' } type - Event type.
6246     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6247     * @throws { BusinessError } 202 - Not System Application.
6248     * @syscap SystemCapability.Multimedia.Camera.Core
6249     * @systemapi
6250     * @since 12
6251     */
6252    off(type: 'slowMotionStatus', callback?: AsyncCallback<SlowMotionStatus>): void;
6253  }
6254
6255  /**
6256   * High resolution session object.
6257   *
6258   * @interface HighResolutionPhotoSession
6259   * @syscap SystemCapability.Multimedia.Camera.Core
6260   * @systemapi
6261   * @since 12
6262   */
6263  interface HighResolutionPhotoSession extends Session, AutoExposure, Focus {
6264    /**
6265     * Subscribes to error events.
6266     *
6267     * @param { 'error' } type - Event type.
6268     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6269     * @throws { BusinessError } 202 - Not System Application.
6270     * @syscap SystemCapability.Multimedia.Camera.Core
6271     * @systemapi
6272     * @since 12
6273     */
6274    on(type: 'error', callback: ErrorCallback): void;
6275
6276    /**
6277     * Unsubscribes from error events.
6278     *
6279     * @param { 'error' } type - Event type.
6280     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6281     * @throws { BusinessError } 202 - Not System Application.
6282     * @syscap SystemCapability.Multimedia.Camera.Core
6283     * @systemapi
6284     * @since 12
6285     */
6286    off(type: 'error', callback?: ErrorCallback): void;
6287
6288    /**
6289     * Subscribes focus state change event callback.
6290     *
6291     * @param { 'focusStateChange' } type - Event type.
6292     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6293     * @throws { BusinessError } 202 - Not System Application.
6294     * @syscap SystemCapability.Multimedia.Camera.Core
6295     * @systemapi
6296     * @since 12
6297     */
6298    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6299
6300    /**
6301     * Unsubscribes from focus state change event callback.
6302     *
6303     * @param { 'focusStateChange' } type - Event type.
6304     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6305     * @throws { BusinessError } 202 - Not System Application.
6306     * @syscap SystemCapability.Multimedia.Camera.Core
6307     * @systemapi
6308     * @since 12
6309     */
6310    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6311  }
6312
6313  /**
6314   * Macro photo session object.
6315   *
6316   * @interface MacroPhotoSession
6317   * @syscap SystemCapability.Multimedia.Camera.Core
6318   * @systemapi
6319   * @since 12
6320   */
6321  interface MacroPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus {
6322    /**
6323     * Subscribes to error events.
6324     *
6325     * @param { 'error' } type - Event type.
6326     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6327     * @throws { BusinessError } 202 - Not System Application.
6328     * @syscap SystemCapability.Multimedia.Camera.Core
6329     * @systemapi
6330     * @since 12
6331     */
6332    on(type: 'error', callback: ErrorCallback): void;
6333
6334    /**
6335     * Unsubscribes from error events.
6336     *
6337     * @param { 'error' } type - Event type.
6338     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6339     * @throws { BusinessError } 202 - Not System Application.
6340     * @syscap SystemCapability.Multimedia.Camera.Core
6341     * @systemapi
6342     * @since 12
6343     */
6344    off(type: 'error', callback?: ErrorCallback): void;
6345
6346    /**
6347     * Subscribes focus state change event callback.
6348     *
6349     * @param { 'focusStateChange' } type - Event type.
6350     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6351     * @throws { BusinessError } 202 - Not System Application.
6352     * @syscap SystemCapability.Multimedia.Camera.Core
6353     * @systemapi
6354     * @since 12
6355     */
6356    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6357
6358    /**
6359     * Unsubscribes from focus state change event callback.
6360     *
6361     * @param { 'focusStateChange' } type - Event type.
6362     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6363     * @throws { BusinessError } 202 - Not System Application.
6364     * @syscap SystemCapability.Multimedia.Camera.Core
6365     * @systemapi
6366     * @since 12
6367     */
6368    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6369
6370    /**
6371     * Subscribes zoom info event callback.
6372     *
6373     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6374     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6375     * @throws { BusinessError } 202 - Not System Application.
6376     * @syscap SystemCapability.Multimedia.Camera.Core
6377     * @systemapi
6378     * @since 12
6379     */
6380    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6381
6382    /**
6383     * Unsubscribes from zoom info event callback.
6384     *
6385     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6386     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6387     * @throws { BusinessError } 202 - Not System Application.
6388     * @syscap SystemCapability.Multimedia.Camera.Core
6389     * @systemapi
6390     * @since 12
6391     */
6392    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6393  }
6394
6395  /**
6396   * Macro video session object.
6397   *
6398   * @interface MacroVideoSession
6399   * @syscap SystemCapability.Multimedia.Camera.Core
6400   * @systemapi
6401   * @since 12
6402   */
6403  interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus {
6404    /**
6405     * Subscribes to error events.
6406     *
6407     * @param { 'error' } type - Event type.
6408     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6409     * @throws { BusinessError } 202 - Not System Application.
6410     * @syscap SystemCapability.Multimedia.Camera.Core
6411     * @systemapi
6412     * @since 12
6413     */
6414    on(type: 'error', callback: ErrorCallback): void;
6415
6416    /**
6417     * Unsubscribes from error events.
6418     *
6419     * @param { 'error' } type - Event type.
6420     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6421     * @throws { BusinessError } 202 - Not System Application.
6422     * @syscap SystemCapability.Multimedia.Camera.Core
6423     * @systemapi
6424     * @since 12
6425     */
6426    off(type: 'error', callback?: ErrorCallback): void;
6427
6428    /**
6429     * Subscribes focus state change event callback.
6430     *
6431     * @param { 'focusStateChange' } type - Event type.
6432     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6433     * @throws { BusinessError } 202 - Not System Application.
6434     * @syscap SystemCapability.Multimedia.Camera.Core
6435     * @systemapi
6436     * @since 12
6437     */
6438    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6439
6440    /**
6441     * Unsubscribes from focus state change event callback.
6442     *
6443     * @param { 'focusStateChange' } type - Event type.
6444     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6445     * @throws { BusinessError } 202 - Not System Application.
6446     * @syscap SystemCapability.Multimedia.Camera.Core
6447     * @systemapi
6448     * @since 12
6449     */
6450    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6451
6452    /**
6453     * Subscribes zoom info event callback.
6454     *
6455     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6456     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6457     * @throws { BusinessError } 202 - Not System Application.
6458     * @syscap SystemCapability.Multimedia.Camera.Core
6459     * @systemapi
6460     * @since 12
6461     */
6462    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6463
6464    /**
6465     * Unsubscribes from zoom info event callback.
6466     *
6467     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6468     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6469     * @throws { BusinessError } 202 - Not System Application.
6470     * @syscap SystemCapability.Multimedia.Camera.Core
6471     * @systemapi
6472     * @since 12
6473     */
6474    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6475  }
6476
6477  /**
6478   * Secure camera session object.
6479   *
6480   * @interface SecureSession
6481   * @syscap SystemCapability.Multimedia.Camera.Core
6482   * @since 12
6483   */
6484  interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom {
6485    /**
6486     * Add Secure output for camera.
6487     *
6488     * @param { PreviewOutput } previewOutput - Specify the output as a secure flow.
6489     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6490     * @throws { BusinessError } 7400102 - Operation not allowed.
6491     * @throws { BusinessError } 7400103 - Session not config.
6492     * @syscap SystemCapability.Multimedia.Camera.Core
6493     * @since 12
6494     */
6495    addSecureOutput(previewOutput: PreviewOutput): void;
6496
6497    /**
6498     * Subscribes to error events.
6499     *
6500     * @param { 'error' } type - Event type.
6501     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6502     * @syscap SystemCapability.Multimedia.Camera.Core
6503     * @since 12
6504     */
6505    on(type: 'error', callback: ErrorCallback): void;
6506
6507    /**
6508     * Unsubscribes from error events.
6509     *
6510     * @param { 'error' } type - Event type.
6511     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6512     * @syscap SystemCapability.Multimedia.Camera.Core
6513     * @since 12
6514     */
6515    off(type: 'error', callback?: ErrorCallback): void;
6516
6517    /**
6518     * Subscribes focus status change event callback.
6519     *
6520     * @param { 'focusStateChange' } type - Event type.
6521     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6522     * @syscap SystemCapability.Multimedia.Camera.Core
6523     * @since 12
6524     */
6525    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6526
6527    /**
6528     * Unsubscribes from focus status change event callback.
6529     *
6530     * @param { 'focusStateChange' } type - Event type.
6531     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6532     * @syscap SystemCapability.Multimedia.Camera.Core
6533     * @since 12
6534     */
6535    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6536  }
6537
6538  /**
6539   * Light painting photo session object.
6540   *
6541   * @interface LightPaintingPhotoSession
6542   * @extends Session, Flash, Focus, Zoom, ColorEffect
6543   * @syscap SystemCapability.Multimedia.Camera.Core
6544   * @systemapi
6545   * @since 12
6546   */
6547  interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect {
6548    /**
6549     * Subscribes to error events.
6550     *
6551     * @param { 'error' } type - Event type.
6552     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6553     * @throws { BusinessError } 202 - Not System Application.
6554     * @syscap SystemCapability.Multimedia.Camera.Core
6555     * @systemapi
6556     * @since 12
6557     */
6558    on(type: 'error', callback: ErrorCallback): void;
6559
6560    /**
6561     * Unsubscribes from error events.
6562     *
6563     * @param { 'error' } type - Event type.
6564     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6565     * @throws { BusinessError } 202 - Not System Application.
6566     * @syscap SystemCapability.Multimedia.Camera.Core
6567     * @systemapi
6568     * @since 12
6569     */
6570    off(type: 'error', callback?: ErrorCallback): void;
6571
6572    /**
6573     * Subscribes focus state change event callback.
6574     *
6575     * @param { 'focusStateChange' } type - Event type.
6576     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6577     * @throws { BusinessError } 202 - Not System Application.
6578     * @syscap SystemCapability.Multimedia.Camera.Core
6579     * @systemapi
6580     * @since 12
6581     */
6582    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6583
6584    /**
6585     * Unsubscribes from focus state change event callback.
6586     *
6587     * @param { 'focusStateChange' } type - Event type.
6588     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6589     * @throws { BusinessError } 202 - Not System Application.
6590     * @syscap SystemCapability.Multimedia.Camera.Core
6591     * @systemapi
6592     * @since 12
6593     */
6594    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6595
6596    /**
6597     * Subscribes zoom info event callback.
6598     *
6599     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6600     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6601     * @throws { BusinessError } 202 - Not System Application.
6602     * @syscap SystemCapability.Multimedia.Camera.Core
6603     * @systemapi
6604     * @since 12
6605     */
6606    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6607
6608    /**
6609     * Unsubscribes from zoom info event callback.
6610     *
6611     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6612     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6613     * @throws { BusinessError } 202 - Not System Application.
6614     * @syscap SystemCapability.Multimedia.Camera.Core
6615     * @systemapi
6616     * @since 12
6617     */
6618    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6619
6620    /**
6621     * Gets the light painting type in use.
6622     *
6623     * @returns { LightPaintingType } The light painting type in use.
6624     * @throws { BusinessError } 202 - Not System Application.
6625     * @throws { BusinessError } 7400103 - Session not config.
6626     * @syscap SystemCapability.Multimedia.Camera.Core
6627     * @systemapi
6628     * @since 12
6629     */
6630    getLightPaintingType(): LightPaintingType;
6631
6632    /**
6633     * Sets a light painting type for a camera device.
6634     *
6635     * @param { LightPaintingType } type - Light painting type to set.
6636     * @throws { BusinessError } 202 - Not System Application.
6637     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6638     * @throws { BusinessError } 7400103 - Session not config.
6639     * @syscap SystemCapability.Multimedia.Camera.Core
6640     * @systemapi
6641     * @since 12
6642     */
6643    setLightPaintingType(type: LightPaintingType): void;
6644
6645    /**
6646     * Gets supported light painting types.
6647     *
6648     * @returns { Array<LightPaintingType> } List of light painting types.
6649     * @throws { BusinessError } 202 - Not System Application.
6650     * @throws { BusinessError } 7400103 - Session not config.
6651     * @syscap SystemCapability.Multimedia.Camera.Core
6652     * @systemapi
6653     * @since 12
6654     */
6655    getSupportedLightPaintingTypes(): Array<LightPaintingType>;
6656  }
6657
6658  /**
6659   * Quick shot photo session object.
6660   *
6661   * @interface QuickShotPhotoSession
6662   * @extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom
6663   * @syscap SystemCapability.Multimedia.Camera.Core
6664   * @systemapi
6665   * @since 12
6666   */
6667  interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom {
6668    /**
6669     * Subscribes to error events.
6670     *
6671     * @param { 'error' } type - Event type.
6672     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6673     * @throws { BusinessError } 202 - Not System Application.
6674     * @syscap SystemCapability.Multimedia.Camera.Core
6675     * @systemapi
6676     * @since 12
6677     */
6678    on(type: 'error', callback: ErrorCallback): void;
6679
6680    /**
6681     * Unsubscribes from error events.
6682     *
6683     * @param { 'error' } type - Event type.
6684     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6685     * @throws { BusinessError } 202 - Not System Application.
6686     * @syscap SystemCapability.Multimedia.Camera.Core
6687     * @systemapi
6688     * @since 12
6689     */
6690    off(type: 'error', callback?: ErrorCallback): void;
6691
6692    /**
6693     * Subscribes to effect suggestion event callback.
6694     *
6695     * @param { 'effectSuggestionChange' } type - Event type.
6696     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
6697     * @throws { BusinessError } 202 - Not System Application.
6698     * @syscap SystemCapability.Multimedia.Camera.Core
6699     * @systemapi
6700     * @since 12
6701     */
6702    on(type: 'effectSuggestionChange', callback: AsyncCallback<EffectSuggestionType>): void;
6703
6704    /**
6705     * Unsubscribes from effect suggestion event callback.
6706     *
6707     * @param { 'effectSuggestionChange' } type - Event type.
6708     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
6709     * @throws { BusinessError } 202 - Not System Application.
6710     * @syscap SystemCapability.Multimedia.Camera.Core
6711     * @systemapi
6712     * @since 12
6713     */
6714    off(type: 'effectSuggestionChange', callback?: AsyncCallback<EffectSuggestionType>): void;
6715
6716    /**
6717     * Subscribes focus state change event callback.
6718     *
6719     * @param { 'focusStateChange' } type - Event type.
6720     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6721     * @throws { BusinessError } 202 - Not System Application.
6722     * @syscap SystemCapability.Multimedia.Camera.Core
6723     * @systemapi
6724     * @since 12
6725     */
6726    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6727
6728    /**
6729     * Unsubscribes from focus state change event callback.
6730     *
6731     * @param { 'focusStateChange' } type - Event type.
6732     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6733     * @throws { BusinessError } 202 - Not System Application.
6734     * @syscap SystemCapability.Multimedia.Camera.Core
6735     * @systemapi
6736     * @since 12
6737     */
6738    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6739
6740    /**
6741     * Subscribes zoom info event callback.
6742     *
6743     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6744     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6745     * @throws { BusinessError } 202 - Not System Application.
6746     * @syscap SystemCapability.Multimedia.Camera.Core
6747     * @systemapi
6748     * @since 12
6749     */
6750    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6751
6752    /**
6753     * Unsubscribes from zoom info event callback.
6754     *
6755     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6756     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6757     * @throws { BusinessError } 202 - Not System Application.
6758     * @syscap SystemCapability.Multimedia.Camera.Core
6759     * @systemapi
6760     * @since 12
6761     */
6762    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6763  }
6764
6765  /**
6766   * Panorama photo session object.
6767   *
6768   * @interface PanoramaPhotoSession
6769   * @extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect
6770   * @syscap SystemCapability.Multimedia.Camera.Core
6771   * @systemapi
6772   * @since 12
6773   */
6774  interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect {
6775    /**
6776     * Subscribes to error events.
6777     *
6778     * @param { 'error' } type - Event type.
6779     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6780     * @throws { BusinessError } 202 - Not System Application.
6781     * @syscap SystemCapability.Multimedia.Camera.Core
6782     * @systemapi
6783     * @since 12
6784     */
6785    on(type: 'error', callback: ErrorCallback): void;
6786
6787    /**
6788     * Unsubscribes from error events.
6789     *
6790     * @param { 'error' } type - Event type.
6791     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6792     * @throws { BusinessError } 202 - Not System Application.
6793     * @syscap SystemCapability.Multimedia.Camera.Core
6794     * @systemapi
6795     * @since 12
6796     */
6797    off(type: 'error', callback?: ErrorCallback): void;
6798
6799    /**
6800     * Subscribes focus state change event callback.
6801     *
6802     * @param { 'focusStateChange' } type - Event type.
6803     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6804     * @throws { BusinessError } 202 - Not System Application.
6805     * @syscap SystemCapability.Multimedia.Camera.Core
6806     * @systemapi
6807     * @since 12
6808     */
6809    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6810
6811    /**
6812     * Unsubscribes from focus state change event callback.
6813     *
6814     * @param { 'focusStateChange' } type - Event type.
6815     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6816     * @throws { BusinessError } 202 - Not System Application.
6817     * @syscap SystemCapability.Multimedia.Camera.Core
6818     * @systemapi
6819     * @since 12
6820     */
6821    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6822  }
6823
6824  /**
6825   * Fluorescence photo session object.
6826   *
6827   * @interface FluorescencePhotoSession
6828   * @syscap SystemCapability.Multimedia.Camera.Core
6829   * @systemapi
6830   * @since 12
6831   */
6832  interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom {
6833    /**
6834     * Subscribes to error events.
6835     *
6836     * @param { 'error' } type - Event type.
6837     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6838     * @throws { BusinessError } 202 - Not System Application.
6839     * @syscap SystemCapability.Multimedia.Camera.Core
6840     * @systemapi
6841     * @since 12
6842     */
6843    on(type: 'error', callback: ErrorCallback): void;
6844
6845    /**
6846     * Unsubscribes from error events.
6847     *
6848     * @param { 'error' } type - Event type.
6849     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6850     * @throws { BusinessError } 202 - Not System Application.
6851     * @syscap SystemCapability.Multimedia.Camera.Core
6852     * @systemapi
6853     * @since 12
6854     */
6855    off(type: 'error', callback?: ErrorCallback): void;
6856
6857    /**
6858     * Subscribes focus state change event callback.
6859     *
6860     * @param { 'focusStateChange' } type - Event type.
6861     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6862     * @throws { BusinessError } 202 - Not System Application.
6863     * @syscap SystemCapability.Multimedia.Camera.Core
6864     * @systemapi
6865     * @since 12
6866     */
6867    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6868
6869    /**
6870     * Unsubscribes from focus state change event callback.
6871     *
6872     * @param { 'focusStateChange' } type - Event type.
6873     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6874     * @throws { BusinessError } 202 - Not System Application.
6875     * @syscap SystemCapability.Multimedia.Camera.Core
6876     * @systemapi
6877     * @since 12
6878     */
6879    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6880  }
6881
6882  /**
6883   * Photo Functions object.
6884   *
6885   * @interface PhotoFunctions
6886   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
6887   * @syscap SystemCapability.Multimedia.Camera.Core
6888   * @systemapi
6889   * @since 12
6890   */
6891  interface PhotoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
6892  }
6893
6894  /**
6895   * Video Functions object.
6896   *
6897   * @interface VideoFunctions
6898   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
6899   * @syscap SystemCapability.Multimedia.Camera.Core
6900   * @systemapi
6901   * @since 12
6902   */
6903  interface VideoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
6904  }
6905
6906  /**
6907   * Portrait Photo Functions object.
6908   *
6909   * @interface PortraitPhotoFunctions
6910   * @extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery
6911   * @syscap SystemCapability.Multimedia.Camera.Core
6912   * @systemapi
6913   * @since 12
6914   */
6915  interface PortraitPhotoFunctions extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery {
6916  }
6917
6918  /**
6919   * Photo Conflict Functions object.
6920   *
6921   * @interface PhotoConflictFunctions
6922   * @extends ZoomQuery, MacroQuery
6923   * @syscap SystemCapability.Multimedia.Camera.Core
6924   * @systemapi
6925   * @since 12
6926   */
6927  interface PhotoConflictFunctions extends ZoomQuery, MacroQuery {
6928  }
6929
6930  /**
6931   * Video Conflict Functions object.
6932   *
6933   * @interface VideoConflictFunctions
6934   * @extends ZoomQuery, MacroQuery
6935   * @syscap SystemCapability.Multimedia.Camera.Core
6936   * @systemapi
6937   * @since 12
6938   */
6939  interface VideoConflictFunctions extends ZoomQuery, MacroQuery {
6940  }
6941
6942  /**
6943   * Portrait Photo Conflict Functions object.
6944   *
6945   * @interface PortraitPhotoFunctions
6946   * @extends ZoomQuery, PortraitQuery, ApertureQuery
6947   * @syscap SystemCapability.Multimedia.Camera.Core
6948   * @systemapi
6949   * @since 12
6950   */
6951  interface PortraitPhotoConflictFunctions extends ZoomQuery, PortraitQuery, ApertureQuery {
6952  }
6953
6954  /**
6955   * Camera output object.
6956   *
6957   * @interface CameraOutput
6958   * @syscap SystemCapability.Multimedia.Camera.Core
6959   * @since 10
6960   */
6961  interface CameraOutput {
6962    /**
6963     * Release output instance.
6964     *
6965     * @param { AsyncCallback<void> } callback - Callback used to return the result.
6966     * @throws { BusinessError } 7400201 - Camera service fatal error.
6967     * @syscap SystemCapability.Multimedia.Camera.Core
6968     * @since 10
6969     */
6970    release(callback: AsyncCallback<void>): void;
6971
6972    /**
6973     * Release output instance.
6974     *
6975     * @returns { Promise<void> } Promise used to return the result.
6976     * @throws { BusinessError } 7400201 - Camera service fatal error.
6977     * @syscap SystemCapability.Multimedia.Camera.Core
6978     * @since 10
6979     */
6980    release(): Promise<void>;
6981  }
6982
6983  /**
6984   * SketchStatusData object
6985   *
6986   * @typedef SketchStatusData
6987   * @syscap SystemCapability.Multimedia.Camera.Core
6988   * @systemapi
6989   * @since 11
6990   */
6991  interface SketchStatusData {
6992    /**
6993     * Status of the sketch stream.
6994     * 0 is stop, and 1 is start.
6995     *
6996     * @type { number }
6997     * @syscap SystemCapability.Multimedia.Camera.Core
6998     * @systemapi
6999     * @since 11
7000     */
7001    status: number;
7002
7003    /**
7004     * The zoom ratio of the sketch stream.
7005     *
7006     * @type { number }
7007     * @syscap SystemCapability.Multimedia.Camera.Core
7008     * @systemapi
7009     * @since 11
7010     */
7011    sketchRatio: number;
7012  }
7013
7014  /**
7015   * Preview output object.
7016   *
7017   * @interface PreviewOutput
7018   * @syscap SystemCapability.Multimedia.Camera.Core
7019   * @since 10
7020   */
7021  interface PreviewOutput extends CameraOutput {
7022    /**
7023     * Start output instance.
7024     *
7025     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7026     * @throws { BusinessError } 7400103 - Session not config.
7027     * @syscap SystemCapability.Multimedia.Camera.Core
7028     * @since 10
7029     * @deprecated since 11
7030     * @useinstead ohos.multimedia.camera.Session#start
7031     */
7032    start(callback: AsyncCallback<void>): void;
7033
7034    /**
7035     * Start output instance.
7036     *
7037     * @returns { Promise<void> } Promise used to return the result.
7038     * @throws { BusinessError } 7400103 - Session not config.
7039     * @syscap SystemCapability.Multimedia.Camera.Core
7040     * @since 10
7041     * @deprecated since 11
7042     * @useinstead ohos.multimedia.camera.Session#start
7043     */
7044    start(): Promise<void>;
7045
7046    /**
7047     * Stop output instance.
7048     *
7049     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7050     * @syscap SystemCapability.Multimedia.Camera.Core
7051     * @since 10
7052     * @deprecated since 11
7053     * @useinstead ohos.multimedia.camera.Session#stop
7054     */
7055    stop(callback: AsyncCallback<void>): void;
7056
7057    /**
7058     * Stop output instance.
7059     *
7060     * @returns { Promise<void> } Promise used to return the result.
7061     * @syscap SystemCapability.Multimedia.Camera.Core
7062     * @since 10
7063     * @deprecated since 11
7064     * @useinstead ohos.multimedia.camera.Session#stop
7065     */
7066    stop(): Promise<void>;
7067
7068    /**
7069     * Subscribes frame start event callback.
7070     *
7071     * @param { 'frameStart' } type - Event type.
7072     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7073     * @syscap SystemCapability.Multimedia.Camera.Core
7074     * @since 10
7075     */
7076    on(type: 'frameStart', callback: AsyncCallback<void>): void;
7077
7078    /**
7079     * Unsubscribes from frame start event callback.
7080     *
7081     * @param { 'frameStart' } type - Event type.
7082     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7083     * @syscap SystemCapability.Multimedia.Camera.Core
7084     * @since 10
7085     */
7086    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
7087
7088    /**
7089     * Subscribes frame end event callback.
7090     *
7091     * @param { 'frameEnd' } type - Event type.
7092     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7093     * @syscap SystemCapability.Multimedia.Camera.Core
7094     * @since 10
7095     */
7096    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
7097
7098    /**
7099     * Unsubscribes from frame end event callback.
7100     *
7101     * @param { 'frameEnd' } type - Event type.
7102     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7103     * @syscap SystemCapability.Multimedia.Camera.Core
7104     * @since 10
7105     */
7106    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
7107
7108    /**
7109     * Subscribes to error events.
7110     *
7111     * @param { 'error' } type - Event type.
7112     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7113     * @syscap SystemCapability.Multimedia.Camera.Core
7114     * @since 10
7115     */
7116    on(type: 'error', callback: ErrorCallback): void;
7117
7118    /**
7119     * Unsubscribes from error events.
7120     *
7121     * @param { 'error' } type - Event type.
7122     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7123     * @syscap SystemCapability.Multimedia.Camera.Core
7124     * @since 10
7125     */
7126    off(type: 'error', callback?: ErrorCallback): void;
7127
7128    /**
7129     * Get supported frame rates which can be set during session running.
7130     *
7131     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
7132     * @syscap SystemCapability.Multimedia.Camera.Core
7133     * @since 12
7134     */
7135    getSupportedFrameRates(): Array<FrameRateRange>
7136
7137    /**
7138     * Set a frame rate range.
7139     *
7140     * @param { number } minFps - Minimum frame rate per second.
7141     * @param { number } maxFps - Maximum frame rate per second.
7142     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7143     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
7144     * @syscap SystemCapability.Multimedia.Camera.Core
7145     * @since 12
7146     */
7147    setFrameRate(minFps: number, maxFps: number): void
7148
7149    /**
7150     * Get active frame rate range which has been set before.
7151     *
7152     * @returns { FrameRateRange } The active frame rate range.
7153     * @syscap SystemCapability.Multimedia.Camera.Core
7154     * @since 12
7155     */
7156    getActiveFrameRate(): FrameRateRange;
7157
7158    /**
7159     * Gets the current preconfig type if you had already call preconfig interface.
7160     *
7161     * @returns { Profile } The current preconfig type.
7162     * @throws { BusinessError } 7400201 - Camera service fatal error.
7163     * @syscap SystemCapability.Multimedia.Camera.Core
7164     * @since 12
7165     */
7166    getActiveProfile(): Profile;
7167
7168    /**
7169     * Adds a deferred surface.
7170     *
7171     * @param { string } surfaceId - Surface object id used in camera photo output.
7172     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7173     * @syscap SystemCapability.Multimedia.Camera.Core
7174     * @systemapi
7175     * @since 10
7176     */
7177    /**
7178     * Adds a deferred surface.
7179     *
7180     * @param { string } surfaceId - Surface object id used in camera photo output.
7181     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7182     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7183     * @syscap SystemCapability.Multimedia.Camera.Core
7184     * @systemapi
7185     * @since 12
7186     */
7187    addDeferredSurface(surfaceId: string): void;
7188
7189    /**
7190     * Determine whether camera sketch is supported.
7191     *
7192     * @returns { boolean } Is camera sketch supported.
7193     * @throws { BusinessError } 202 - Not System Application.
7194     * @syscap SystemCapability.Multimedia.Camera.Core
7195     * @systemapi
7196     * @since 11
7197     */
7198    isSketchSupported(): boolean;
7199
7200    /**
7201     * Gets the specific zoom ratio when sketch stream open.
7202     *
7203     * @returns { number } The specific zoom ratio of sketch.
7204     * @throws { BusinessError } 202 - Not System Application.
7205     * @throws { BusinessError } 7400103 - Session not config.
7206     * @syscap SystemCapability.Multimedia.Camera.Core
7207     * @systemapi
7208     * @since 11
7209     */
7210    getSketchRatio(): number;
7211
7212    /**
7213     * Enable sketch for camera.
7214     *
7215     * @param { boolean } enabled - enable sketch for camera if TRUE.
7216     * @throws { BusinessError } 202 - Not System Application.
7217     * @throws { BusinessError } 7400103 - Session not config.
7218     * @syscap SystemCapability.Multimedia.Camera.Core
7219     * @systemapi
7220     * @since 11
7221     */
7222    /**
7223     * Enable sketch for camera.
7224     *
7225     * @param { boolean } enabled - enable sketch for camera if TRUE.
7226     * @throws { BusinessError } 202 - Not System Application.
7227     * @throws { BusinessError } 7400102 - Operation not allowed.
7228     * @throws { BusinessError } 7400103 - Session not config.
7229     * @throws { BusinessError } 7400201 - Camera service fatal error.
7230     * @syscap SystemCapability.Multimedia.Camera.Core
7231     * @systemapi
7232     * @since 12
7233     */
7234    enableSketch(enabled: boolean): void;
7235
7236    /**
7237     * Attach surface to the sketch stream.
7238     *
7239     * @param { string } surfaceId - Surface object id used in sketch stream.
7240     * @throws { BusinessError } 202 - Not System Application.
7241     * @throws { BusinessError } 7400103 - Session not config.
7242     * @syscap SystemCapability.Multimedia.Camera.Core
7243     * @systemapi
7244     * @since 11
7245     */
7246    /**
7247     * Attach surface to the sketch stream.
7248     *
7249     * @param { string } surfaceId - Surface object id used in sketch stream.
7250     * @throws { BusinessError } 202 - Not System Application.
7251     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7252     * @throws { BusinessError } 7400103 - Session not config.
7253     * @throws { BusinessError } 7400201 - Camera service fatal error.
7254     * @syscap SystemCapability.Multimedia.Camera.Core
7255     * @systemapi
7256     * @since 12
7257     */
7258    attachSketchSurface(surfaceId: string): void;
7259
7260    /**
7261     * Subscribes sketch status changed event callback.
7262     *
7263     * @param { 'sketchStatusChanged' } type - Event type.
7264     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to sketch status data.
7265     * @throws { BusinessError } 202 - Not System Application.
7266     * @syscap SystemCapability.Multimedia.Camera.Core
7267     * @systemapi
7268     * @since 11
7269     */
7270    on(type: 'sketchStatusChanged', callback: AsyncCallback<SketchStatusData>): void;
7271
7272    /**
7273     * Unsubscribes sketch status changed event callback.
7274     *
7275     * @param { 'sketchStatusChanged' } type - Event type.
7276     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to get sketch status data.
7277     * @throws { BusinessError } 202 - Not System Application.
7278     * @syscap SystemCapability.Multimedia.Camera.Core
7279     * @systemapi
7280     * @since 11
7281     */
7282    off(type: 'sketchStatusChanged', callback?: AsyncCallback<SketchStatusData>): void;
7283  }
7284
7285  /**
7286   * Enum for effect suggestion.
7287   *
7288   * @enum { number }
7289   * @syscap SystemCapability.Multimedia.Camera.Core
7290   * @systemapi
7291   * @since 12
7292   */
7293  enum EffectSuggestionType {
7294    /**
7295     * None.
7296     *
7297     * @syscap SystemCapability.Multimedia.Camera.Core
7298     * @systemapi
7299     * @since 12
7300     */
7301    EFFECT_SUGGESTION_NONE = 0,
7302    /**
7303     * Portrait.
7304     *
7305     * @syscap SystemCapability.Multimedia.Camera.Core
7306     * @systemapi
7307     * @since 12
7308     */
7309    EFFECT_SUGGESTION_PORTRAIT = 1,
7310    /**
7311     * Food.
7312     *
7313     * @syscap SystemCapability.Multimedia.Camera.Core
7314     * @systemapi
7315     * @since 12
7316     */
7317    EFFECT_SUGGESTION_FOOD = 2,
7318
7319    /**
7320     * Sky.
7321     *
7322     * @syscap SystemCapability.Multimedia.Camera.Core
7323     * @systemapi
7324     * @since 12
7325     */
7326    EFFECT_SUGGESTION_SKY = 3,
7327
7328    /**
7329     * Sunrise and sunset.
7330     *
7331     * @syscap SystemCapability.Multimedia.Camera.Core
7332     * @systemapi
7333     * @since 12
7334     */
7335    EFFECT_SUGGESTION_SUNRISE_SUNSET = 4
7336  }
7337
7338  /**
7339   * Effect suggestion status
7340   *
7341   * @syscap SystemCapability.Multimedia.Camera.Core
7342   * @systemapi
7343   * @since 12
7344   */
7345  class EffectSuggestionStatus {
7346    /**
7347     * Effect Suggestion type.
7348     *
7349     * @type { EffectSuggestionType }
7350     * @syscap SystemCapability.Multimedia.Camera.Core
7351     * @systemapi
7352     * @since 12
7353     */
7354    type: EffectSuggestionType;
7355    /**
7356     * Effect Suggestion type status.
7357     *
7358     * @type { boolean }
7359     * @syscap SystemCapability.Multimedia.Camera.Core
7360     * @systemapi
7361     * @since 12
7362     */
7363    status: boolean;
7364  }
7365
7366  /**
7367   * Enumerates the image rotation angles.
7368   *
7369   * @enum { number }
7370   * @syscap SystemCapability.Multimedia.Camera.Core
7371   * @since 10
7372   */
7373  enum ImageRotation {
7374    /**
7375     * The capture image rotates 0 degrees.
7376     *
7377     * @syscap SystemCapability.Multimedia.Camera.Core
7378     * @since 10
7379     */
7380    ROTATION_0 = 0,
7381
7382    /**
7383     * The capture image rotates 90 degrees.
7384     *
7385     * @syscap SystemCapability.Multimedia.Camera.Core
7386     * @since 10
7387     */
7388    ROTATION_90 = 90,
7389
7390    /**
7391     * The capture image rotates 180 degrees.
7392     *
7393     * @syscap SystemCapability.Multimedia.Camera.Core
7394     * @since 10
7395     */
7396    ROTATION_180 = 180,
7397
7398    /**
7399     * The capture image rotates 270 degrees.
7400     *
7401     * @syscap SystemCapability.Multimedia.Camera.Core
7402     * @since 10
7403     */
7404    ROTATION_270 = 270
7405  }
7406
7407  /**
7408   * Photo capture location
7409   *
7410   * @typedef Location
7411   * @syscap SystemCapability.Multimedia.Camera.Core
7412   * @since 10
7413   */
7414  interface Location {
7415    /**
7416     * Latitude.
7417     *
7418     * @type { number }
7419     * @syscap SystemCapability.Multimedia.Camera.Core
7420     * @since 10
7421     */
7422    latitude: number;
7423
7424    /**
7425     * Longitude.
7426     *
7427     * @type { number }
7428     * @syscap SystemCapability.Multimedia.Camera.Core
7429     * @since 10
7430     */
7431    longitude: number;
7432
7433    /**
7434     * Altitude.
7435     *
7436     * @type { number }
7437     * @syscap SystemCapability.Multimedia.Camera.Core
7438     * @since 10
7439     */
7440    altitude: number;
7441  }
7442
7443  /**
7444   * Enumerates the image quality levels.
7445   *
7446   * @enum { number }
7447   * @syscap SystemCapability.Multimedia.Camera.Core
7448   * @since 10
7449   */
7450  enum QualityLevel {
7451    /**
7452     * High image quality.
7453     *
7454     * @syscap SystemCapability.Multimedia.Camera.Core
7455     * @since 10
7456     */
7457    QUALITY_LEVEL_HIGH = 0,
7458
7459    /**
7460     * Medium image quality.
7461     *
7462     * @syscap SystemCapability.Multimedia.Camera.Core
7463     * @since 10
7464     */
7465    QUALITY_LEVEL_MEDIUM = 1,
7466
7467    /**
7468     * Low image quality.
7469     *
7470     * @syscap SystemCapability.Multimedia.Camera.Core
7471     * @since 10
7472     */
7473    QUALITY_LEVEL_LOW = 2
7474  }
7475
7476  /**
7477   * Photo capture options to set.
7478   *
7479   * @typedef PhotoCaptureSetting
7480   * @syscap SystemCapability.Multimedia.Camera.Core
7481   * @since 10
7482   */
7483  interface PhotoCaptureSetting {
7484    /**
7485     * Photo image quality.
7486     *
7487     * @type { ?QualityLevel }
7488     * @syscap SystemCapability.Multimedia.Camera.Core
7489     * @since 10
7490     */
7491    quality?: QualityLevel;
7492
7493    /**
7494     * Photo rotation.
7495     *
7496     * @type { ?ImageRotation }
7497     * @syscap SystemCapability.Multimedia.Camera.Core
7498     * @since 10
7499     */
7500    rotation?: ImageRotation;
7501
7502    /**
7503     * Photo location.
7504     *
7505     * @type { ?Location }
7506     * @syscap SystemCapability.Multimedia.Camera.Core
7507     * @since 10
7508     */
7509    location?: Location;
7510
7511    /**
7512     * Set the mirror photo function switch, default to false.
7513     *
7514     * @type { ?boolean }
7515     * @syscap SystemCapability.Multimedia.Camera.Core
7516     * @since 10
7517     */
7518    mirror?: boolean;
7519  }
7520
7521  /**
7522   * Enumerates the delivery image types.
7523   *
7524   * @enum { number }
7525   * @syscap SystemCapability.Multimedia.Camera.Core
7526   * @systemapi
7527   * @since 11
7528   */
7529  enum DeferredDeliveryImageType {
7530    /**
7531     * Undefer image delivery.
7532     *
7533     * @syscap SystemCapability.Multimedia.Camera.Core
7534     * @systemapi
7535     * @since 11
7536     */
7537    NONE = 0,
7538
7539    /**
7540     * Defer photo delivery when capturing photos.
7541     *
7542     * @syscap SystemCapability.Multimedia.Camera.Core
7543     * @systemapi
7544     * @since 11
7545     */
7546    PHOTO = 1,
7547
7548    /**
7549     * Defer video delivery when capturing videos.
7550     *
7551     * @syscap SystemCapability.Multimedia.Camera.Core
7552     * @systemapi
7553     * @since 11
7554     */
7555    VIDEO = 2
7556  }
7557
7558  /**
7559   * Photo object
7560   *
7561   * @typedef Photo
7562   * @syscap SystemCapability.Multimedia.Camera.Core
7563   * @since 11
7564   */
7565  interface Photo {
7566    /**
7567     * Main image.
7568     *
7569     * @type { image.Image }
7570     * @syscap SystemCapability.Multimedia.Camera.Core
7571     * @since 11
7572     */
7573    main: image.Image;
7574
7575    /**
7576     * Raw image.
7577     *
7578     * @type { ?image.Image }
7579     * @syscap SystemCapability.Multimedia.Camera.Core
7580     * @systemapi
7581     * @since 12
7582     */
7583    raw?: image.Image;
7584
7585    /**
7586     * Release Photo object.
7587     *
7588     * @returns { Promise<void> } Promise used to return the result.
7589     * @syscap SystemCapability.Multimedia.Camera.Core
7590     * @since 11
7591     */
7592    release(): Promise<void>;
7593  }
7594
7595  /**
7596   * DeferredPhotoProxy object
7597   *
7598   * @typedef DeferredPhotoProxy
7599   * @syscap SystemCapability.Multimedia.Camera.Core
7600   * @systemapi
7601   * @since 11
7602   */
7603  interface DeferredPhotoProxy {
7604    /**
7605     * Thumbnail image.
7606     *
7607     * @returns { Promise<image.PixelMap> } Promise used to return the result.
7608     * @throws { BusinessError } 202 - Not System Application.
7609     * @syscap SystemCapability.Multimedia.Camera.Core
7610     * @systemapi
7611     * @since 11
7612     */
7613    getThumbnail(): Promise<image.PixelMap>;
7614
7615    /**
7616     * Release DeferredPhotoProxy object.
7617     *
7618     * @returns { Promise<void> } Promise used to return the result.
7619     * @throws { BusinessError } 202 - Not System Application.
7620     * @syscap SystemCapability.Multimedia.Camera.Core
7621     * @systemapi
7622     * @since 11
7623     */
7624    release(): Promise<void>;
7625  }
7626
7627
7628  /**
7629   * Photo output object.
7630   *
7631   * @interface PhotoOutput
7632   * @syscap SystemCapability.Multimedia.Camera.Core
7633   * @since 10
7634   */
7635  interface PhotoOutput extends CameraOutput {
7636    /**
7637     * Start capture output.
7638     *
7639     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7640     * @throws { BusinessError } 7400104 - Session not running.
7641     * @throws { BusinessError } 7400201 - Camera service fatal error.
7642     * @syscap SystemCapability.Multimedia.Camera.Core
7643     * @since 10
7644     */
7645    capture(callback: AsyncCallback<void>): void;
7646
7647    /**
7648     * Start capture output.
7649     *
7650     * @returns { Promise<void> } Promise used to return the result.
7651     * @throws { BusinessError } 7400104 - Session not running.
7652     * @throws { BusinessError } 7400201 - Camera service fatal error.
7653     * @syscap SystemCapability.Multimedia.Camera.Core
7654     * @since 10
7655     */
7656    capture(): Promise<void>;
7657
7658    /**
7659     * Start capture output.
7660     *
7661     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7662     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7663     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7664     * @throws { BusinessError } 7400104 - Session not running.
7665     * @throws { BusinessError } 7400201 - Camera service fatal error.
7666     * @syscap SystemCapability.Multimedia.Camera.Core
7667     * @since 10
7668     */
7669    capture(setting: PhotoCaptureSetting, callback: AsyncCallback<void>): void;
7670
7671    /**
7672     * Start capture output.
7673     *
7674     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7675     * @returns { Promise<void> } Promise used to return the result.
7676     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7677     * @throws { BusinessError } 7400104 - Session not running.
7678     * @throws { BusinessError } 7400201 - Camera service fatal error.
7679     * @syscap SystemCapability.Multimedia.Camera.Core
7680     * @since 10
7681     */
7682    /**
7683     * Start capture output.
7684     * Remove optional param.
7685     *
7686     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7687     * @returns { Promise<void> } Promise used to return the result.
7688     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7689     * @throws { BusinessError } 7400104 - Session not running.
7690     * @throws { BusinessError } 7400201 - Camera service fatal error.
7691     * @syscap SystemCapability.Multimedia.Camera.Core
7692     * @since 11
7693     */
7694    capture(setting: PhotoCaptureSetting): Promise<void>;
7695
7696    /**
7697     * Start burst capture.
7698     *
7699     * @param { PhotoCaptureSetting } setting - Photo capture settings.
7700     * @returns { Promise<void> } Promise used to return the result.
7701     * @throws { BusinessError } 202 - Not System Application.
7702     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7703     * @throws { BusinessError } 7400104 - Session not running.
7704     * @throws { BusinessError } 7400201 - Camera service fatal error.
7705     * @syscap SystemCapability.Multimedia.Camera.Core
7706     * @systemapi
7707     * @since 12
7708     */
7709    burstCapture(setting: PhotoCaptureSetting): Promise<void>;
7710
7711    /**
7712     * Confirm capture in Night mode or end burst capture.
7713     *
7714     * @throws { BusinessError } 202 - Not System Application.
7715     * @throws { BusinessError } 7400104 - Session not running.
7716     * @throws { BusinessError } 7400201 - Camera service fatal error.
7717     * @syscap SystemCapability.Multimedia.Camera.Core
7718     * @systemapi
7719     * @since 11
7720     */
7721    confirmCapture();
7722
7723    /**
7724     * Confirm if the deferred image delivery supported in the specific device.
7725     *
7726     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7727     * @returns { boolean } TRUE if the type of delivery image is support.
7728     * @throws { BusinessError } 202 - Not System Application.
7729     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7730     * @throws { BusinessError } 7400104 - Session not running.
7731     * @throws { BusinessError } 7400201 - Camera service fatal error.
7732     * @syscap SystemCapability.Multimedia.Camera.Core
7733     * @systemapi
7734     * @since 11
7735     */
7736    isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean;
7737
7738    /**
7739     * Confirm if the deferred image delivery enabled.
7740     *
7741     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7742     * @returns { boolean } TRUE if the type of delivery image is enable.
7743     * @throws { BusinessError } 202 - Not System Application.
7744     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7745     * @throws { BusinessError } 7400104 - Session not running.
7746     * @throws { BusinessError } 7400201 - Camera service fatal error.
7747     * @syscap SystemCapability.Multimedia.Camera.Core
7748     * @systemapi
7749     * @since 11
7750     */
7751    isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean;
7752
7753    /**
7754     * Sets the image type for deferred image delivery.
7755     *
7756     * @param { DeferredDeliveryImageType } type - Type of delivery image.
7757     * @throws { BusinessError } 202 - Not System Application.
7758     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7759     * @throws { BusinessError } 7400104 - Session not running.
7760     * @throws { BusinessError } 7400201 - Camera service fatal error.
7761     * @syscap SystemCapability.Multimedia.Camera.Core
7762     * @systemapi
7763     * @since 11
7764     */
7765    deferImageDelivery(type: DeferredDeliveryImageType): void;
7766
7767    /**
7768     * Subscribes photo available event callback.
7769     *
7770     * @param { 'photoAvailable' } type - Event type.
7771     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
7772     * @syscap SystemCapability.Multimedia.Camera.Core
7773     * @since 11
7774     */
7775    on(type: 'photoAvailable', callback: AsyncCallback<Photo>): void;
7776
7777    /**
7778     * Unsubscribes photo available event callback.
7779     *
7780     * @param { 'photoAvailable' } type - Event type.
7781     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
7782     * @syscap SystemCapability.Multimedia.Camera.Core
7783     * @since 11
7784     */
7785    off(type: 'photoAvailable', callback?: AsyncCallback<Photo>): void;
7786
7787    /**
7788     * Subscribes deferred photo proxy available event callback.
7789     *
7790     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
7791     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
7792     * @throws { BusinessError } 202 - Not System Application.
7793     * @syscap SystemCapability.Multimedia.Camera.Core
7794     * @systemapi
7795     * @since 11
7796     */
7797    on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback<DeferredPhotoProxy>): void;
7798
7799    /**
7800     * Unsubscribes deferred photo proxy available event callback.
7801     *
7802     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
7803     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
7804     * @throws { BusinessError } 202 - Not System Application.
7805     * @syscap SystemCapability.Multimedia.Camera.Core
7806     * @systemapi
7807     * @since 11
7808     */
7809    off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback<DeferredPhotoProxy>): void;
7810
7811    /**
7812     * Subscribes photo asset event callback.
7813     *
7814     * @param { 'photoAssetAvailable' } type - Event type.
7815     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
7816     * @syscap SystemCapability.Multimedia.Camera.Core
7817     * @since 12
7818     */
7819    on(type: 'photoAssetAvailable', callback: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
7820
7821    /**
7822     * Unsubscribes photo asset event callback.
7823     *
7824     * @param { 'photoAssetAvailable' } type - Event type.
7825     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
7826     * @syscap SystemCapability.Multimedia.Camera.Core
7827     * @since 12
7828     */
7829     off(type: 'photoAssetAvailable', callback?: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
7830
7831    /**
7832     * Check whether to support mirror photo.
7833     *
7834     * @returns { boolean } Is the mirror supported.
7835     * @syscap SystemCapability.Multimedia.Camera.Core
7836     * @since 10
7837     */
7838    isMirrorSupported(): boolean;
7839
7840    /**
7841     * Subscribes capture start event callback.
7842     *
7843     * @param { 'captureStart' } type - Event type.
7844     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
7845     * @syscap SystemCapability.Multimedia.Camera.Core
7846     * @since 10
7847     * @deprecated since 11
7848     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
7849     */
7850    on(type: 'captureStart', callback: AsyncCallback<number>): void;
7851
7852    /**
7853     * Unsubscribes from capture start event callback.
7854     *
7855     * @param { 'captureStart' } type - Event type.
7856     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
7857     * @syscap SystemCapability.Multimedia.Camera.Core
7858     * @since 10
7859     * @deprecated since 11
7860     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
7861     */
7862    off(type: 'captureStart', callback?: AsyncCallback<number>): void;
7863
7864    /**
7865     * Subscribes capture start event callback.
7866     *
7867     * @param { 'captureStartWithInfo' } type - Event type.
7868     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
7869     * @syscap SystemCapability.Multimedia.Camera.Core
7870     * @since 11
7871     */
7872    on(type: 'captureStartWithInfo', callback: AsyncCallback<CaptureStartInfo>): void;
7873
7874    /**
7875     * Unsubscribes from capture start event callback.
7876     *
7877     * @param { 'captureStartWithInfo' } type - Event type.
7878     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
7879     * @syscap SystemCapability.Multimedia.Camera.Core
7880     * @since 11
7881     */
7882    off(type: 'captureStartWithInfo', callback?: AsyncCallback<CaptureStartInfo>): void;
7883
7884    /**
7885     * Subscribes frame shutter event callback.
7886     *
7887     * @param { 'frameShutter' } type - Event type.
7888     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
7889     * @syscap SystemCapability.Multimedia.Camera.Core
7890     * @since 10
7891     */
7892    on(type: 'frameShutter', callback: AsyncCallback<FrameShutterInfo>): void;
7893
7894    /**
7895     * Unsubscribes from frame shutter event callback.
7896     *
7897     * @param { 'frameShutter' } type - Event type.
7898     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
7899     * @syscap SystemCapability.Multimedia.Camera.Core
7900     * @since 10
7901     */
7902    off(type: 'frameShutter', callback?: AsyncCallback<FrameShutterInfo>): void;
7903
7904    /**
7905     * Subscribes frame shutter end event callback.
7906     *
7907     * @param { 'frameShutterEnd' } type - Event type.
7908     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
7909     * @syscap SystemCapability.Multimedia.Camera.Core
7910     * @since 12
7911     */
7912    on(type: 'frameShutterEnd', callback: AsyncCallback<FrameShutterEndInfo>): void;
7913
7914    /**
7915     * Unsubscribes from frame shutter end event callback.
7916     *
7917     * @param { 'frameShutterEnd' } type - Event type.
7918     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
7919     * @syscap SystemCapability.Multimedia.Camera.Core
7920     * @since 12
7921     */
7922    off(type: 'frameShutterEnd', callback?: AsyncCallback<FrameShutterEndInfo>): void;
7923
7924    /**
7925     * Subscribes capture end event callback.
7926     *
7927     * @param { 'captureEnd' } type - Event type.
7928     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
7929     * @syscap SystemCapability.Multimedia.Camera.Core
7930     * @since 10
7931     */
7932    on(type: 'captureEnd', callback: AsyncCallback<CaptureEndInfo>): void;
7933
7934    /**
7935     * Unsubscribes from capture end event callback.
7936     *
7937     * @param { 'captureEnd' } type - Event type.
7938     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
7939     * @syscap SystemCapability.Multimedia.Camera.Core
7940     * @since 10
7941     */
7942    off(type: 'captureEnd', callback?: AsyncCallback<CaptureEndInfo>): void;
7943
7944    /**
7945     * Subscribes capture ready event callback. After receiving the callback, can proceed to the next capture
7946     *
7947     * @param { 'captureReady' } type - Event type.
7948     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
7949     * @syscap SystemCapability.Multimedia.Camera.Core
7950     * @since 12
7951     */
7952    on(type: 'captureReady', callback: AsyncCallback<void>): void;
7953
7954    /**
7955     * Unsubscribes from capture ready event callback.
7956     *
7957     * @param { 'captureReady' } type - Event type.
7958     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
7959     * @syscap SystemCapability.Multimedia.Camera.Core
7960     * @since 12
7961     */
7962    off(type: 'captureReady', callback?: AsyncCallback<void>): void;
7963
7964    /**
7965     * Subscribes estimated capture duration event callback.
7966     *
7967     * @param { 'estimatedCaptureDuration' } type - Event type.
7968     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
7969     * @syscap SystemCapability.Multimedia.Camera.Core
7970     * @since 12
7971     */
7972    on(type: 'estimatedCaptureDuration', callback: AsyncCallback<number>): void;
7973
7974    /**
7975     * Unsubscribes from estimated capture duration event callback.
7976     *
7977     * @param { 'estimatedCaptureDuration' } type - Event type.
7978     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
7979     * @syscap SystemCapability.Multimedia.Camera.Core
7980     * @since 12
7981     */
7982    off(type: 'estimatedCaptureDuration', callback?: AsyncCallback<number>): void;
7983
7984    /**
7985     * Subscribes to error events.
7986     *
7987     * @param { 'error' } type - Event type.
7988     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
7989     * @syscap SystemCapability.Multimedia.Camera.Core
7990     * @since 10
7991     */
7992    on(type: 'error', callback: ErrorCallback): void;
7993
7994    /**
7995     * Unsubscribes from error events.
7996     *
7997     * @param { 'error' } type - Event type.
7998     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
7999     * @syscap SystemCapability.Multimedia.Camera.Core
8000     * @since 10
8001     */
8002    off(type: 'error', callback?: ErrorCallback): void;
8003
8004    /**
8005     * Gets the current preconfig type if you had already call preconfig interface.
8006     *
8007     * @returns { Profile } The current preconfig type.
8008     * @throws { BusinessError } 7400201 - Camera service fatal error.
8009     * @syscap SystemCapability.Multimedia.Camera.Core
8010     * @since 12
8011     */
8012    getActiveProfile(): Profile;
8013
8014    /**
8015     * Checks whether PhotoOutput supports quick thumbnail.
8016     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
8017     *
8018     * @returns { boolean } Whether quick thumbnail is supported.
8019     * @throws { BusinessError } 7400104 - session is not running.
8020     * @syscap SystemCapability.Multimedia.Camera.Core
8021     * @systemapi
8022     * @since 10
8023     */
8024    /**
8025     * Checks whether PhotoOutput supports quick thumbnail.
8026     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
8027     *
8028     * @returns { boolean } Whether quick thumbnail is supported.
8029     * @throws { BusinessError } 202 - Not System Application.
8030     * @throws { BusinessError } 7400104 - session is not running.
8031     * @syscap SystemCapability.Multimedia.Camera.Core
8032     * @systemapi
8033     * @since 12
8034     */
8035    isQuickThumbnailSupported(): boolean;
8036
8037    /**
8038     * Enables or disables quick thumbnail.
8039     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8040     * To avoid stream reconfiguration and performance loss,
8041     * you are advised to call the method before Session.commitConfig().
8042     *
8043     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8044     * @throws { BusinessError } 7400104 - session is not running.
8045     * @syscap SystemCapability.Multimedia.Camera.Core
8046     * @systemapi
8047     * @since 10
8048     */
8049    /**
8050     * Enables or disables quick thumbnail.
8051     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8052     * To avoid stream reconfiguration and performance loss,
8053     * you are advised to call the method before Session.commitConfig().
8054     *
8055     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8056     * @throws { BusinessError } 202 - Not System Application.
8057     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8058     * @throws { BusinessError } 7400104 - session is not running.
8059     * @throws { BusinessError } 7400201 - Camera service fatal error.
8060     * @syscap SystemCapability.Multimedia.Camera.Core
8061     * @systemapi
8062     * @since 12
8063     */
8064    enableQuickThumbnail(enabled: boolean): void;
8065
8066    /**
8067     * Subscribes to camera thumbnail events.
8068     * This method is valid only after enableQuickThumbnail(true) is called.
8069     *
8070     * @param { 'quickThumbnail' } type - Event type.
8071     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8072     * @syscap SystemCapability.Multimedia.Camera.Core
8073     * @systemapi
8074     * @since 10
8075     */
8076    on(type: 'quickThumbnail', callback: AsyncCallback<image.PixelMap>): void;
8077
8078    /**
8079     * Unsubscribes from camera thumbnail events.
8080     * This method is valid only after enableQuickThumbnail(true) is called.
8081     *
8082     * @param { 'quickThumbnail' } type - Event type.
8083     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8084     * @syscap SystemCapability.Multimedia.Camera.Core
8085     * @systemapi
8086     * @since 10
8087     */
8088    off(type: 'quickThumbnail', callback?: AsyncCallback<image.PixelMap>): void;
8089
8090    /**
8091     * Confirm if the auto high quality photo supported.
8092     *
8093     * @returns { boolean } TRUE if the auto high quality photo is supported.
8094     * @throws { BusinessError } 202 - Not System Application.
8095     * @throws { BusinessError } 7400104 - session is not running.
8096     * @throws { BusinessError } 7400201 - Camera service fatal error.
8097     * @syscap SystemCapability.Multimedia.Camera.Core
8098     * @systemapi
8099     * @since 12
8100     */
8101    isAutoHighQualityPhotoSupported(): boolean;
8102
8103    /**
8104     * Enable auto high quality photo.
8105     *
8106     * @param { boolean } enabled - Target state for auto high quality photo.
8107     * @throws { BusinessError } 202 - Not System Application.
8108     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8109     * @throws { BusinessError } 7400104 - session is not running.
8110     * @throws { BusinessError } 7400201 - Camera service fatal error.
8111     * @syscap SystemCapability.Multimedia.Camera.Core
8112     * @systemapi
8113     * @since 12
8114     */
8115    enableAutoHighQualityPhoto(enabled: boolean): void;
8116
8117    /**
8118     * Confirm if the auto cloud image enhancement is supported.
8119     *
8120     * @returns { boolean } TRUE if the auto cloud image enhancement is supported.
8121     * @throws { BusinessError } 202 - Not System Application.
8122     * @throws { BusinessError } 7400201 - Camera service fatal error.
8123     * @syscap SystemCapability.Multimedia.Camera.Core
8124     * @systemapi
8125     * @since 12
8126     */
8127     isAutoCloudImageEnhancementSupported(): boolean;
8128
8129    /**
8130     * Enable auto cloud image enhancement
8131     *
8132     * @param { boolean } enabled - Target state for auto cloud image enhancement.
8133     * @throws { BusinessError } 202 - Not System Application.
8134     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8135     * @throws { BusinessError } 7400201 - Camera service fatal error.
8136     * @syscap SystemCapability.Multimedia.Camera.Core
8137     * @systemapi
8138     * @since 12
8139     */
8140     enableAutoCloudImageEnhancement(enabled: boolean): void;
8141
8142    /**
8143     * Confirm if moving photo supported.
8144     *
8145     * @returns { boolean } TRUE if the moving photo is supported.
8146     * @throws { BusinessError } 7400201 - Camera service fatal error.
8147     * @syscap SystemCapability.Multimedia.Camera.Core
8148     * @since 12
8149     */
8150    isMovingPhotoSupported(): boolean;
8151
8152    /**
8153     * Enable moving photo.
8154     *
8155     * @permission ohos.permission.MICROPHONE
8156     * @param { boolean } enabled - Target state for moving photo.
8157     * @throws { BusinessError } 201 - permission denied.
8158     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8159     * @throws { BusinessError } 7400201 - Camera service fatal error.
8160     * @syscap SystemCapability.Multimedia.Camera.Core
8161     * @since 12
8162     */
8163    enableMovingPhoto(enabled: boolean): void;
8164  }
8165
8166  /**
8167   * Frame shutter callback info.
8168   *
8169   * @typedef FrameShutterInfo
8170   * @syscap SystemCapability.Multimedia.Camera.Core
8171   * @since 10
8172   */
8173  interface FrameShutterInfo {
8174    /**
8175     * Capture id.
8176     *
8177     * @type { number }
8178     * @syscap SystemCapability.Multimedia.Camera.Core
8179     * @since 10
8180     */
8181    captureId: number;
8182    /**
8183     * Timestamp for frame.
8184     *
8185     * @type { number }
8186     * @syscap SystemCapability.Multimedia.Camera.Core
8187     * @since 10
8188     */
8189    timestamp: number;
8190  }
8191
8192  /**
8193   * Frame shutter end callback info.
8194   *
8195   * @typedef FrameShutterEndInfo
8196   * @syscap SystemCapability.Multimedia.Camera.Core
8197   * @since 12
8198   */
8199  interface FrameShutterEndInfo {
8200    /**
8201     * Capture id.
8202     *
8203     * @type { number }
8204     * @syscap SystemCapability.Multimedia.Camera.Core
8205     * @since 12
8206     */
8207    captureId: number;
8208  }
8209
8210  /**
8211   * Capture start info.
8212   *
8213   * @typedef CaptureStartInfo
8214   * @syscap SystemCapability.Multimedia.Camera.Core
8215   * @since 11
8216   */
8217  interface CaptureStartInfo {
8218    /**
8219     * Capture id.
8220     *
8221     * @type { number }
8222     * @syscap SystemCapability.Multimedia.Camera.Core
8223     * @since 11
8224     */
8225    captureId: number;
8226    /**
8227     * Time(in milliseconds) is the shutter time for the photo.
8228     *
8229     * @type { number }
8230     * @syscap SystemCapability.Multimedia.Camera.Core
8231     * @since 11
8232     */
8233    time: number;
8234  }
8235
8236  /**
8237   * Capture end info.
8238   *
8239   * @typedef CaptureEndInfo
8240   * @syscap SystemCapability.Multimedia.Camera.Core
8241   * @since 10
8242   */
8243  interface CaptureEndInfo {
8244    /**
8245     * Capture id.
8246     *
8247     * @type { number }
8248     * @syscap SystemCapability.Multimedia.Camera.Core
8249     * @since 10
8250     */
8251    captureId: number;
8252    /**
8253     * Frame count.
8254     *
8255     * @type { number }
8256     * @syscap SystemCapability.Multimedia.Camera.Core
8257     * @since 10
8258     */
8259    frameCount: number;
8260  }
8261
8262  /**
8263   * Video output object.
8264   *
8265   * @interface VideoOutput
8266   * @syscap SystemCapability.Multimedia.Camera.Core
8267   * @since 10
8268   */
8269  interface VideoOutput extends CameraOutput {
8270    /**
8271     * Start video output.
8272     *
8273     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8274     * @throws { BusinessError } 7400103 - Session not config.
8275     * @throws { BusinessError } 7400201 - Camera service fatal error.
8276     * @syscap SystemCapability.Multimedia.Camera.Core
8277     * @since 10
8278     */
8279    start(callback: AsyncCallback<void>): void;
8280
8281    /**
8282     * Start video output.
8283     *
8284     * @returns { Promise<void> } Promise used to return the result.
8285     * @throws { BusinessError } 7400103 - Session not config.
8286     * @throws { BusinessError } 7400201 - Camera service fatal error.
8287     * @syscap SystemCapability.Multimedia.Camera.Core
8288     * @since 10
8289     */
8290    start(): Promise<void>;
8291
8292    /**
8293     * Stop video output.
8294     *
8295     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8296     * @syscap SystemCapability.Multimedia.Camera.Core
8297     * @since 10
8298     */
8299    stop(callback: AsyncCallback<void>): void;
8300
8301    /**
8302     * Stop video output.
8303     *
8304     * @returns { Promise<void> } Promise used to return the result.
8305     * @syscap SystemCapability.Multimedia.Camera.Core
8306     * @since 10
8307     */
8308    stop(): Promise<void>;
8309
8310    /**
8311     * Determine whether video mirror is supported.
8312     *
8313     * @returns { boolean } Is video mirror supported.
8314     * @throws { BusinessError } 202 - Not System Application.
8315     * @syscap SystemCapability.Multimedia.Camera.Core
8316     * @systemapi
8317     * @since 12
8318     */
8319    isMirrorSupported(): boolean;
8320
8321    /**
8322     * Enable mirror for video capture.
8323     *
8324     * @param { boolean } enabled - enable video mirror if TRUE.
8325     * @throws { BusinessError } 202 - Not System Application.
8326     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8327     * @throws { BusinessError } 7400103 - Session not config.
8328     * @syscap SystemCapability.Multimedia.Camera.Core
8329     * @systemapi
8330     * @since 12
8331     */
8332    enableMirror(enabled: boolean): void;
8333
8334    /**
8335     * Get supported frame rates which can be set during session running.
8336     *
8337     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
8338     * @syscap SystemCapability.Multimedia.Camera.Core
8339     * @since 12
8340     */
8341    getSupportedFrameRates(): Array<FrameRateRange>
8342
8343    /**
8344     * Set a frame rate range.
8345     *
8346     * @param { number } minFps - Minimum frame rate per second.
8347     * @param { number } maxFps - Maximum frame rate per second.
8348     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8349     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
8350     * @syscap SystemCapability.Multimedia.Camera.Core
8351     * @since 12
8352     */
8353    setFrameRate(minFps: number, maxFps: number): void
8354
8355    /**
8356     * Get active frame rate range which has been set before.
8357     *
8358     * @returns { FrameRateRange } The active frame rate range.
8359     * @syscap SystemCapability.Multimedia.Camera.Core
8360     * @since 12
8361     */
8362    getActiveFrameRate(): FrameRateRange;
8363
8364    /**
8365     * Subscribes frame start event callback.
8366     *
8367     * @param { 'frameStart' } type - Event type.
8368     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8369     * @syscap SystemCapability.Multimedia.Camera.Core
8370     * @since 10
8371     */
8372    on(type: 'frameStart', callback: AsyncCallback<void>): void;
8373
8374    /**
8375     * Unsubscribes from frame start event callback.
8376     *
8377     * @param { 'frameStart' } type - Event type.
8378     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8379     * @syscap SystemCapability.Multimedia.Camera.Core
8380     * @since 10
8381     */
8382    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
8383
8384    /**
8385     * Subscribes frame end event callback.
8386     *
8387     * @param { 'frameEnd' } type - Event type.
8388     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8389     * @syscap SystemCapability.Multimedia.Camera.Core
8390     * @since 10
8391     */
8392    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
8393
8394    /**
8395     * Unsubscribes from frame end event callback.
8396     *
8397     * @param { 'frameEnd' } type - Event type.
8398     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8399     * @syscap SystemCapability.Multimedia.Camera.Core
8400     * @since 10
8401     */
8402    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
8403
8404    /**
8405     * Subscribes to error events.
8406     *
8407     * @param { 'error' } type - Event type.
8408     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8409     * @syscap SystemCapability.Multimedia.Camera.Core
8410     * @since 10
8411     */
8412    on(type: 'error', callback: ErrorCallback): void;
8413
8414    /**
8415     * Unsubscribes from error events.
8416     *
8417     * @param { 'error' } type - Event type.
8418     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8419     * @syscap SystemCapability.Multimedia.Camera.Core
8420     * @since 10
8421     */
8422    off(type: 'error', callback?: ErrorCallback): void;
8423
8424    /**
8425     * Gets the current preconfig type if you had already call preconfig interface.
8426     *
8427     * @returns { VideoProfile } The current preconfig type.
8428     * @throws { BusinessError } 7400201 - Camera service fatal error.
8429     * @syscap SystemCapability.Multimedia.Camera.Core
8430     * @since 12
8431     */
8432    getActiveProfile(): VideoProfile;
8433
8434    /**
8435     * Get supported video meta types.
8436     * @returns { Array<VideoMetaType> } The array of supported video meta type.
8437     * @throws { BusinessError } 202 - Not System Application.
8438     * @throws { BusinessError } 7400201 - Camera service fatal error.
8439     * @syscap SystemCapability.Multimedia.Camera.Core
8440     * @systemapi
8441     * @since 12
8442     */
8443    getSupportedVideoMetaTypes(): Array<VideoMetaType>;
8444
8445    /**
8446     * Attach a meta surface to VideoOutput.
8447     * @param { string } surfaceId - Surface object id used for receiving meta infos.
8448     * @param { VideoMetaType } type - Video meta type.
8449     * @throws { BusinessError } 202 - Not System Application.
8450     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8451     * @throws { BusinessError } 7400201 - Camera service fatal error.
8452     * @syscap SystemCapability.Multimedia.Camera.Core
8453     * @systemapi
8454     * @since 12
8455     */
8456    attachMetaSurface(surfaceId: string, type: VideoMetaType): void;
8457  }
8458
8459  /**
8460   * Video meta type.
8461   *
8462   * @enum { number }
8463   * @syscap SystemCapability.Multimedia.Camera.Core
8464   * @systemapi
8465   * @since 12
8466   */
8467  enum VideoMetaType {
8468    /**
8469     * Video meta type for storing maker info.
8470     * @syscap SystemCapability.Multimedia.Camera.Core
8471     * @systemapi
8472     * @since 12
8473     */
8474    VIDEO_META_MAKER_INFO = 0,
8475  }
8476
8477  /**
8478   * Metadata object type.
8479   *
8480   * @enum { number }
8481   * @syscap SystemCapability.Multimedia.Camera.Core
8482   * @since 10
8483   */
8484  enum MetadataObjectType {
8485    /**
8486     * Face detection type.
8487     *
8488     * @syscap SystemCapability.Multimedia.Camera.Core
8489     * @since 10
8490     */
8491    FACE_DETECTION = 0
8492  }
8493
8494  /**
8495   * Enum for light painting tabletype.
8496   *
8497   * @enum { number }
8498   * @syscap SystemCapability.Multimedia.Camera.Core
8499   * @systemapi
8500   * @since 12
8501   */
8502  enum LightPaintingType {
8503    /**
8504     * Traffic trails effect.
8505     *
8506     * @syscap SystemCapability.Multimedia.Camera.Core
8507     * @systemapi
8508     * @since 12
8509     */
8510    TRAFFIC_TRAILS = 0,
8511
8512    /**
8513     * Star trails effect.
8514     *
8515     * @syscap SystemCapability.Multimedia.Camera.Core
8516     * @systemapi
8517     * @since 12
8518     */
8519    STAR_TRAILS = 1,
8520
8521    /**
8522     * Silky water effect.
8523     *
8524     * @syscap SystemCapability.Multimedia.Camera.Core
8525     * @systemapi
8526     * @since 12
8527     */
8528    SILKY_WATER = 2,
8529
8530    /**
8531     * Light graffiti effect.
8532     *
8533     * @syscap SystemCapability.Multimedia.Camera.Core
8534     * @systemapi
8535     * @since 12
8536     */
8537    LIGHT_GRAFFITI = 3
8538  }
8539
8540  /**
8541   * Rectangle definition.
8542   *
8543   * @typedef Rect
8544   * @syscap SystemCapability.Multimedia.Camera.Core
8545   * @since 10
8546   */
8547  interface Rect {
8548    /**
8549     * X coordinator of top left point.
8550     *
8551     * @type { number }
8552     * @syscap SystemCapability.Multimedia.Camera.Core
8553     * @since 10
8554     */
8555    topLeftX: number;
8556    /**
8557     * Y coordinator of top left point.
8558     *
8559     * @type { number }
8560     * @syscap SystemCapability.Multimedia.Camera.Core
8561     * @since 10
8562     */
8563    topLeftY: number;
8564    /**
8565     * Width of this rectangle.
8566     *
8567     * @type { number }
8568     * @syscap SystemCapability.Multimedia.Camera.Core
8569     * @since 10
8570     */
8571    width: number;
8572    /**
8573     * Height of this rectangle.
8574     *
8575     * @type { number }
8576     * @syscap SystemCapability.Multimedia.Camera.Core
8577     * @since 10
8578     */
8579    height: number;
8580  }
8581
8582  /**
8583   * Metadata object basis.
8584   *
8585   * @typedef MetadataObject
8586   * @syscap SystemCapability.Multimedia.Camera.Core
8587   * @since 10
8588   */
8589  interface MetadataObject {
8590    /**
8591     * Metadata object type.
8592     *
8593     * @type { MetadataObjectType }
8594     * @readonly
8595     * @syscap SystemCapability.Multimedia.Camera.Core
8596     * @since 10
8597     */
8598    readonly type: MetadataObjectType;
8599    /**
8600     * Metadata object timestamp in milliseconds.
8601     *
8602     * @type { number }
8603     * @readonly
8604     * @syscap SystemCapability.Multimedia.Camera.Core
8605     * @since 10
8606     */
8607    readonly timestamp: number;
8608    /**
8609     * The axis-aligned bounding box of detected metadata object.
8610     *
8611     * @type { Rect }
8612     * @readonly
8613     * @syscap SystemCapability.Multimedia.Camera.Core
8614     * @since 10
8615     */
8616    readonly boundingBox: Rect;
8617  }
8618
8619  /**
8620   * Camera Occlusion Detection Result.
8621   *
8622   * @typedef CameraOcclusionDetectionResult
8623   * @syscap SystemCapability.Multimedia.Camera.Core
8624   * @systemapi
8625   * @since 12
8626   */
8627  interface CameraOcclusionDetectionResult {
8628    /**
8629     * Check whether camera is occluded.
8630     *
8631     * @type { boolean }
8632     * @syscap SystemCapability.Multimedia.Camera.Core
8633     * @systemapi
8634     * @since 12
8635     */
8636    readonly isCameraOccluded: boolean;
8637  }
8638
8639  /**
8640   * Metadata Output object
8641   *
8642   * @interface MetadataOutput
8643   * @syscap SystemCapability.Multimedia.Camera.Core
8644   * @since 10
8645   */
8646  interface MetadataOutput extends CameraOutput {
8647    /**
8648     * Start output metadata
8649     *
8650     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8651     * @throws { BusinessError } 7400103 - Session not config.
8652     * @throws { BusinessError } 7400201 - Camera service fatal error.
8653     * @syscap SystemCapability.Multimedia.Camera.Core
8654     * @since 10
8655     */
8656    start(callback: AsyncCallback<void>): void;
8657
8658    /**
8659     * Start output metadata
8660     *
8661     * @returns { Promise<void> } Promise used to return the result.
8662     * @throws { BusinessError } 7400103 - Session not config.
8663     * @throws { BusinessError } 7400201 - Camera service fatal error.
8664     * @syscap SystemCapability.Multimedia.Camera.Core
8665     * @since 10
8666     */
8667    start(): Promise<void>;
8668
8669    /**
8670     * Stop output metadata
8671     *
8672     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8673     * @syscap SystemCapability.Multimedia.Camera.Core
8674     * @since 10
8675     */
8676    stop(callback: AsyncCallback<void>): void;
8677
8678    /**
8679     * Stop output metadata
8680     *
8681     * @returns { Promise<void> } Promise used to return the result.
8682     * @syscap SystemCapability.Multimedia.Camera.Core
8683     * @since 10
8684     */
8685    stop(): Promise<void>;
8686
8687    /**
8688     * Subscribes to metadata objects available event callback.
8689     *
8690     * @param { 'metadataObjectsAvailable' } type - Event type.
8691     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
8692     * @syscap SystemCapability.Multimedia.Camera.Core
8693     * @since 10
8694     */
8695    on(type: 'metadataObjectsAvailable', callback: AsyncCallback<Array<MetadataObject>>): void;
8696
8697    /**
8698     * Unsubscribes from metadata objects available event callback.
8699     *
8700     * @param { 'metadataObjectsAvailable' } type - Event type.
8701     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
8702     * @syscap SystemCapability.Multimedia.Camera.Core
8703     * @since 10
8704     */
8705    off(type: 'metadataObjectsAvailable', callback?: AsyncCallback<Array<MetadataObject>>): void;
8706
8707    /**
8708     * Subscribes to error events.
8709     *
8710     * @param { 'error' } type - Event type.
8711     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8712     * @syscap SystemCapability.Multimedia.Camera.Core
8713     * @since 10
8714     */
8715    on(type: 'error', callback: ErrorCallback): void;
8716
8717    /**
8718     * Unsubscribes from error events.
8719     *
8720     * @param { 'error' } type - Event type.
8721     * @param { ErrorCallback } callback - Callback used to get the video output errors.
8722     * @syscap SystemCapability.Multimedia.Camera.Core
8723     * @since 10
8724     */
8725    off(type: 'error', callback?: ErrorCallback): void;
8726  }
8727}
8728
8729export default camera;
8730