• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     * Depth profiles.
242     *
243     * @type { Array<DepthProfile> }
244     * @readonly
245     * @syscap SystemCapability.Multimedia.Camera.Core
246     * @systemapi
247     * @since 13
248     */
249    readonly depthProfiles: Array<DepthProfile>;
250
251    /**
252     * All the supported metadata Object Types.
253     *
254     * @type { Array<MetadataObjectType> }
255     * @readonly
256     * @syscap SystemCapability.Multimedia.Camera.Core
257     * @since 10
258     */
259    readonly supportedMetadataObjectTypes: Array<MetadataObjectType>;
260  }
261
262  /**
263   * Enum for camera error code.
264   *
265   * @enum { number }
266   * @syscap SystemCapability.Multimedia.Camera.Core
267   * @since 10
268   */
269  enum CameraErrorCode {
270    /**
271     * Parameter missing or parameter type incorrect.
272     *
273     * @syscap SystemCapability.Multimedia.Camera.Core
274     * @since 10
275     */
276    INVALID_ARGUMENT = 7400101,
277
278    /**
279     * Operation not allowed.
280     *
281     * @syscap SystemCapability.Multimedia.Camera.Core
282     * @since 10
283     */
284    OPERATION_NOT_ALLOWED = 7400102,
285
286    /**
287     * Session not config.
288     *
289     * @syscap SystemCapability.Multimedia.Camera.Core
290     * @since 10
291     */
292    SESSION_NOT_CONFIG = 7400103,
293
294    /**
295     * Session not running.
296     *
297     * @syscap SystemCapability.Multimedia.Camera.Core
298     * @since 10
299     */
300    SESSION_NOT_RUNNING = 7400104,
301
302    /**
303     * Session config locked.
304     *
305     * @syscap SystemCapability.Multimedia.Camera.Core
306     * @since 10
307     */
308    SESSION_CONFIG_LOCKED = 7400105,
309
310    /**
311     * Device setting locked.
312     *
313     * @syscap SystemCapability.Multimedia.Camera.Core
314     * @since 10
315     */
316    DEVICE_SETTING_LOCKED = 7400106,
317
318    /**
319     * Can not use camera cause of conflict.
320     *
321     * @syscap SystemCapability.Multimedia.Camera.Core
322     * @since 10
323     */
324    CONFLICT_CAMERA = 7400107,
325
326    /**
327     * Camera disabled cause of security reason.
328     *
329     * @syscap SystemCapability.Multimedia.Camera.Core
330     * @since 10
331     */
332    DEVICE_DISABLED = 7400108,
333
334    /**
335     * Can not use camera cause of preempted.
336     *
337     * @syscap SystemCapability.Multimedia.Camera.Core
338     * @since 10
339     */
340    DEVICE_PREEMPTED = 7400109,
341
342    /**
343     * Unresolved conflicts with current configurations.
344     *
345     * @syscap SystemCapability.Multimedia.Camera.Core
346     * @since 12
347     */
348    UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110,
349
350    /**
351     * Camera service fatal error.
352     *
353     * @syscap SystemCapability.Multimedia.Camera.Core
354     * @since 10
355     */
356    SERVICE_FATAL_ERROR = 7400201
357  }
358
359  /**
360   * Enum for restore parameter.
361   *
362   * @enum { number }
363   * @syscap SystemCapability.Multimedia.Camera.Core
364   * @systemapi
365   * @since 11
366   */
367  enum RestoreParamType {
368    /**
369     * No need set restore Stream Parameter, only prelaunch camera device.
370     *
371     * @syscap SystemCapability.Multimedia.Camera.Core
372     * @systemapi
373     * @since 11
374     */
375    NO_NEED_RESTORE_PARAM = 0,
376
377    /**
378     * Presistent default parameter, long-lasting effect after T minutes.
379     *
380     * @syscap SystemCapability.Multimedia.Camera.Core
381     * @systemapi
382     * @since 11
383     */
384    PRESISTENT_DEFAULT_PARAM = 1,
385
386    /**
387     * Transient active parameter, which has a higher priority than PRESISTENT_DEFAULT_PARAM when both exist.
388     *
389     * @syscap SystemCapability.Multimedia.Camera.Core
390     * @systemapi
391     * @since 11
392     */
393    TRANSIENT_ACTIVE_PARAM = 2
394  }
395
396  /**
397   * Setting parameter for stream.
398   *
399   * @typedef SettingParam
400   * @syscap SystemCapability.Multimedia.Camera.Core
401   * @systemapi
402   * @since 11
403   */
404  interface SettingParam {
405    /**
406     * Skin smooth level value for restore.
407     *
408     * @type { number }
409     * @syscap SystemCapability.Multimedia.Camera.Core
410     * @systemapi
411     * @since 11
412     */
413    skinSmoothLevel: number;
414
415    /**
416     * Face slender value for restore.
417     *
418     * @type { number }
419     * @syscap SystemCapability.Multimedia.Camera.Core
420     * @systemapi
421     * @since 11
422     */
423    faceSlender: number;
424
425    /**
426     * Skin tone value for restore.
427     *
428     * @type { number }
429     * @syscap SystemCapability.Multimedia.Camera.Core
430     * @systemapi
431     * @since 11
432     */
433    skinTone: number;
434  }
435
436  /**
437   * Prelaunch config object.
438   *
439   * @typedef PrelaunchConfig
440   * @syscap SystemCapability.Multimedia.Camera.Core
441   * @systemapi
442   * @since 10
443   */
444  interface PrelaunchConfig {
445    /**
446     * Camera instance.
447     *
448     * @type { CameraDevice }
449     * @syscap SystemCapability.Multimedia.Camera.Core
450     * @systemapi
451     * @since 10
452     */
453    cameraDevice: CameraDevice;
454
455    /**
456     * Restore parameter type.
457     *
458     * @type { ?RestoreParamType }
459     * @syscap SystemCapability.Multimedia.Camera.Core
460     * @systemapi
461     * @since 11
462     */
463    restoreParamType?: RestoreParamType;
464
465    /**
466     * Begin active time.
467     *
468     * @type { ?number }
469     * @syscap SystemCapability.Multimedia.Camera.Core
470     * @systemapi
471     * @since 11
472     */
473    activeTime?: number;
474
475    /**
476     * Setting parameter.
477     *
478     * @type { ?SettingParam }
479     * @syscap SystemCapability.Multimedia.Camera.Core
480     * @systemapi
481     * @since 11
482     */
483    settingParam?: SettingParam;
484  }
485
486  /**
487   * Camera manager object.
488   *
489   * @interface CameraManager
490   * @syscap SystemCapability.Multimedia.Camera.Core
491   * @since 10
492   */
493  interface CameraManager {
494    /**
495     * Gets supported camera descriptions.
496     *
497     * @returns { Array<CameraDevice> } An array of supported cameras.
498     * @syscap SystemCapability.Multimedia.Camera.Core
499     * @since 10
500     */
501    getSupportedCameras(): Array<CameraDevice>;
502
503    /**
504     * Gets supported output capability for specific camera.
505     *
506     * @param { CameraDevice } camera - Camera device.
507     * @returns { CameraOutputCapability } The camera output capability.
508     * @syscap SystemCapability.Multimedia.Camera.Core
509     * @since 10
510     * @deprecated since 11
511     * @useinstead ohos.multimedia.camera.CameraManager#getSupportedOutputCapability
512     */
513    getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability;
514
515    /**
516     * Gets supported scene mode for specific camera.
517     *
518     * @param { CameraDevice } camera - Camera device.
519     * @returns { Array<SceneMode> } An array of supported scene mode of camera.
520     * @syscap SystemCapability.Multimedia.Camera.Core
521     * @since 11
522     */
523    getSupportedSceneModes(camera: CameraDevice): Array<SceneMode>;
524
525    /**
526     * Gets supported output capability for specific camera.
527     *
528     * @param { CameraDevice } camera - Camera device.
529     * @param { SceneMode } mode - Scene mode.
530     * @returns { CameraOutputCapability } The camera output capability.
531     * @syscap SystemCapability.Multimedia.Camera.Core
532     * @since 11
533     */
534    getSupportedOutputCapability(camera: CameraDevice, mode: SceneMode): CameraOutputCapability;
535
536    /**
537     * Determine whether camera is muted.
538     *
539     * @returns { boolean } Is camera muted.
540     * @syscap SystemCapability.Multimedia.Camera.Core
541     * @since 10
542     */
543    isCameraMuted(): boolean;
544
545    /**
546     * Determine whether camera mute is supported.
547     *
548     * @returns { boolean } Is camera mute supported.
549     * @syscap SystemCapability.Multimedia.Camera.Core
550     * @systemapi
551     * @since 10
552     */
553    /**
554     * Determine whether camera mute is supported.
555     *
556     * @returns { boolean } Is camera mute supported.
557     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
558     * @syscap SystemCapability.Multimedia.Camera.Core
559     * @systemapi
560     * @since 13
561     */
562    isCameraMuteSupported(): boolean;
563
564    /**
565     * Mute camera.
566     *
567     * @param { boolean } mute - Mute camera if TRUE, otherwise unmute camera.
568     * @syscap SystemCapability.Multimedia.Camera.Core
569     * @systemapi
570     * @since 10
571     * @deprecated since 12
572     * @useinstead ohos.multimedia.camera.CameraManager#muteCameraPersistent
573     */
574    muteCamera(mute: boolean): void;
575
576    /**
577     * Mutes or unmutes camera for persistence purpose.
578     *
579     * @permission ohos.camera.CAMERA_CONTROL
580     * @param { boolean } mute - Mute camera if TRUE, otherwise unmute camera.
581     * @param { PolicyType } type - Type for indicating the calling role.
582     * @throws { BusinessError } 201 - Permission denied.
583     * @throws { BusinessError } 202 - Not System Application.
584     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
585     * @syscap SystemCapability.Multimedia.Camera.Core
586     * @systemapi
587     * @since 12
588     */
589    muteCameraPersistent(mute: boolean, type: PolicyType): void;
590
591    /**
592     * Creates a CameraInput instance by camera.
593     *
594     * @permission ohos.permission.CAMERA
595     * @param { CameraDevice } camera - Camera device used to create the instance.
596     * @returns { CameraInput } The CameraInput instance.
597     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
598     * @syscap SystemCapability.Multimedia.Camera.Core
599     * @since 10
600     */
601    /**
602     * Creates a CameraInput instance by camera.
603     *
604     * @permission ohos.permission.CAMERA
605     * @param { CameraDevice } camera - Camera device used to create the instance.
606     * @returns { CameraInput } The CameraInput instance.
607     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
608     * @throws { BusinessError } 7400102 - Operation not allowed.
609     * @throws { BusinessError } 7400201 - Camera service fatal error.
610     * @syscap SystemCapability.Multimedia.Camera.Core
611     * @since 12
612     */
613    createCameraInput(camera: CameraDevice): CameraInput;
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     * @syscap SystemCapability.Multimedia.Camera.Core
624     * @since 10
625     */
626    /**
627     * Creates a CameraInput instance by camera position and type.
628     *
629     * @permission ohos.permission.CAMERA
630     * @param { CameraPosition } position - Target camera position.
631     * @param { CameraType } type - Target camera type.
632     * @returns { CameraInput } The CameraInput instance.
633     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
634     * @throws { BusinessError } 7400102 - Operation not allowed.
635     * @throws { BusinessError } 7400201 - Camera service fatal error.
636     * @syscap SystemCapability.Multimedia.Camera.Core
637     * @since 12
638     */
639    createCameraInput(position: CameraPosition, type: CameraType): CameraInput;
640
641    /**
642     * Creates a PreviewOutput instance.
643     *
644     * @param { Profile } profile - Preview output profile.
645     * @param { string } surfaceId - Surface object id used in camera photo output.
646     * @returns { PreviewOutput } The PreviewOutput instance.
647     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
648     * @syscap SystemCapability.Multimedia.Camera.Core
649     * @since 10
650     */
651    /**
652     * Creates a PreviewOutput instance.
653     *
654     * @param { Profile } profile - Preview output profile.
655     * @param { string } surfaceId - Surface object id used in camera photo output.
656     * @returns { PreviewOutput } The PreviewOutput instance.
657     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
658     * @throws { BusinessError } 7400201 - Camera service fatal error.
659     * @syscap SystemCapability.Multimedia.Camera.Core
660     * @since 12
661     */
662    createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput;
663
664    /**
665     * Creates a PreviewOutput instance without profile.
666     * You can use this method to create a preview output instance without a profile, This instance can
667     * only be used in a preconfiged session.
668     *
669     * @param { string } surfaceId - Surface object id used in camera preview output.
670     * @returns { PreviewOutput } The PreviewOutput instance.
671     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
672     * @throws { BusinessError } 7400201 - Camera service fatal error.
673     * @syscap SystemCapability.Multimedia.Camera.Core
674     * @since 12
675     */
676    createPreviewOutput(surfaceId: string): PreviewOutput;
677
678    /**
679     * Creates a PhotoOutput instance.
680     *
681     * @param { Profile } profile - Photo output profile.
682     * @param { string } surfaceId - Surface object id used in camera photo output.
683     * @returns { PhotoOutput } The PhotoOutput instance.
684     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
685     * @syscap SystemCapability.Multimedia.Camera.Core
686     * @since 10
687     * @deprecated since 11
688     * @useinstead ohos.multimedia.camera.CameraManager#createPhotoOutput
689     */
690    createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput;
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     *
697     * @param { Profile } profile - Photo output profile.
698     * @returns { PhotoOutput } The PhotoOutput instance.
699     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
700     * @syscap SystemCapability.Multimedia.Camera.Core
701     * @since 11
702     */
703    /**
704     * Creates a PhotoOutput instance without surfaceId.
705     * Call PhotoOutput capture interface will give a callback,
706     * {@link on(type: 'photoAvailable', callback: AsyncCallback<Photo>)}
707     * You can use this method to create a photo output instance without a profile, This instance can
708     * only be used in a preconfiged session.
709     *
710     * @param { Profile } profile - Photo output profile.
711     * @returns { PhotoOutput } The PhotoOutput instance.
712     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
713     * @throws { BusinessError } 7400201 - Camera service fatal error.
714     * @syscap SystemCapability.Multimedia.Camera.Core
715     * @since 12
716     */
717    createPhotoOutput(profile?: Profile): PhotoOutput;
718
719    /**
720     * Creates a VideoOutput instance.
721     *
722     * @param { VideoProfile } profile - Video profile.
723     * @param { string } surfaceId - Surface object id used in camera video output.
724     * @returns { VideoOutput } The VideoOutput instance.
725     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
726     * @syscap SystemCapability.Multimedia.Camera.Core
727     * @since 10
728     */
729    /**
730     * Creates a VideoOutput instance.
731     *
732     * @param { VideoProfile } profile - Video profile.
733     * @param { string } surfaceId - Surface object id used in camera video output.
734     * @returns { VideoOutput } The VideoOutput instance.
735     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
736     * @throws { BusinessError } 7400201 - Camera service fatal error.
737     * @syscap SystemCapability.Multimedia.Camera.Core
738     * @since 12
739     */
740    createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput;
741
742    /**
743     * Creates a VideoOutput instance without profile.
744     * You can use this method to create a video output instance without a profile, This instance can
745     * only be used in a preconfiged session.
746     *
747     * @param { string } surfaceId - Surface object id used in camera video output.
748     * @returns { VideoOutput } The VideoOutput instance.
749     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
750     * @throws { BusinessError } 7400201 - Camera service fatal error.
751     * @syscap SystemCapability.Multimedia.Camera.Core
752     * @since 12
753     */
754    createVideoOutput(surfaceId: string): VideoOutput;
755
756    /**
757     * Creates a MetadataOutput instance.
758     *
759     * @param { Array<MetadataObjectType> } metadataObjectTypes - Array of MetadataObjectType.
760     * @returns { MetadataOutput } The MetadataOutput instance.
761     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
762     * @syscap SystemCapability.Multimedia.Camera.Core
763     * @since 10
764     */
765    /**
766     * Creates a MetadataOutput instance.
767     *
768     * @param { Array<MetadataObjectType> } metadataObjectTypes - Array of MetadataObjectType.
769     * @returns { MetadataOutput } The MetadataOutput instance.
770     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
771     * @throws { BusinessError } 7400201 - Camera service fatal error.
772     * @syscap SystemCapability.Multimedia.Camera.Core
773     * @since 12
774     */
775    createMetadataOutput(metadataObjectTypes: Array<MetadataObjectType>): MetadataOutput;
776
777    /**
778     * Creates a DepthDataOutput instance.
779     *
780     * @param { DepthProfile } profile - Depth data profile.
781     * @returns { DepthDataOutput } The DepthDataOutput instance.
782     * @throws { BusinessError } 202 - Not System Application.
783     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
784     * @syscap SystemCapability.Multimedia.Camera.Core
785     * @systemapi
786     * @since 13
787     */
788    createDepthDataOutput(profile: DepthProfile): DepthDataOutput;
789
790    /**
791     * Gets a CaptureSession instance.
792     *
793     * @returns { CaptureSession } The CaptureSession instance.
794     * @throws { BusinessError } 7400201 - Camera service fatal error.
795     * @syscap SystemCapability.Multimedia.Camera.Core
796     * @since 10
797     * @deprecated since 11
798     * @useinstead ohos.multimedia.camera.CameraManager#createSession
799     */
800    createCaptureSession(): CaptureSession;
801
802    /**
803     * Gets a Session instance by specific scene mode.
804     *
805     * @param { SceneMode } mode - Scene mode.
806     * @returns { T } The specific Session instance by specific scene mode.
807     * @throws { BusinessError } 401 - Parameter error. Possible causes:
808     * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types;
809     * 3. Parameter verification failed.
810     * @throws { BusinessError } 7400201 - Camera service fatal error.
811     * @syscap SystemCapability.Multimedia.Camera.Core
812     * @since 11
813     */
814    createSession<T extends Session>(mode: SceneMode): T;
815
816    /**
817     * Subscribes camera status change event callback.
818     *
819     * @param { 'cameraStatus' } type - Event type.
820     * @param { AsyncCallback<CameraStatusInfo> } callback - Callback used to get the camera status change.
821     * @syscap SystemCapability.Multimedia.Camera.Core
822     * @since 10
823     */
824    on(type: 'cameraStatus', callback: AsyncCallback<CameraStatusInfo>): void;
825
826    /**
827     * Unsubscribes from camera status change event callback.
828     *
829     * @param { 'cameraStatus' } type - Event type.
830     * @param { AsyncCallback<CameraStatusInfo> } callback - Callback used to get the camera status change.
831     * @syscap SystemCapability.Multimedia.Camera.Core
832     * @since 10
833     */
834    off(type: 'cameraStatus', callback?: AsyncCallback<CameraStatusInfo>): void;
835
836    /**
837     * Subscribes fold status change event callback.
838     *
839     * @param { 'foldStatusChanged' } type - Event type.
840     * @param { AsyncCallback<FoldStatusInfo> } callback - Callback used to get the fold status change.
841     * @syscap SystemCapability.Multimedia.Camera.Core
842     * @since 12
843     */
844    on(type: 'foldStatusChange', callback: AsyncCallback<FoldStatusInfo>): void;
845
846    /**
847     * Unsubscribes from fold status change event callback.
848     *
849     * @param { 'foldStatusChanged' } type - Event type.
850     * @param { AsyncCallback<FoldStatusInfo> } callback - Callback used to get the fold status change.
851     * @syscap SystemCapability.Multimedia.Camera.Core
852     * @since 12
853     */
854    off(type: 'foldStatusChange', callback?: AsyncCallback<FoldStatusInfo>): void;
855
856    /**
857     * Subscribes camera mute change event callback.
858     *
859     * @param { 'cameraMute' } type - Event type.
860     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
861     * @syscap SystemCapability.Multimedia.Camera.Core
862     * @systemapi
863     * @since 10
864     */
865    /**
866     * Subscribes camera mute change event callback.
867     *
868     * @param { 'cameraMute' } type - Event type.
869     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
870     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
871     * @syscap SystemCapability.Multimedia.Camera.Core
872     * @systemapi
873     * @since 13
874     */
875    on(type: 'cameraMute', callback: AsyncCallback<boolean>): void;
876
877    /**
878     * Unsubscribes from camera mute change event callback.
879     *
880     * @param { 'cameraMute' } type - Event type.
881     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
882     * @syscap SystemCapability.Multimedia.Camera.Core
883     * @systemapi
884     * @since 10
885     */
886    /**
887     * Unsubscribes from camera mute change event callback.
888     *
889     * @param { 'cameraMute' } type - Event type.
890     * @param { AsyncCallback<boolean> } callback - Callback used to get the camera mute change.
891     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
892     * @syscap SystemCapability.Multimedia.Camera.Core
893     * @systemapi
894     * @since 13
895     */
896    off(type: 'cameraMute', callback?: AsyncCallback<boolean>): void;
897
898    /**
899     * Determines whether the camera device supports prelaunch.
900     * This function must be called in prior to the setPrelaunchConfig and prelaunch functions.
901     *
902     * @param { CameraDevice } camera - Camera device.
903     * @returns { boolean } Whether prelaunch is supported.
904     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
905     * @syscap SystemCapability.Multimedia.Camera.Core
906     * @systemapi
907     * @since 10
908     */
909    /**
910     * Determines whether the camera device supports prelaunch.
911     * This function must be called in prior to the setPrelaunchConfig and prelaunch functions.
912     *
913     * @param { CameraDevice } camera - Camera device.
914     * @returns { boolean } Whether prelaunch is supported.
915     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
916     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
917     * @syscap SystemCapability.Multimedia.Camera.Core
918     * @systemapi
919     * @since 12
920     */
921    isPrelaunchSupported(camera: CameraDevice): boolean;
922
923    /**
924     * Sets the camera prelaunch configuration.
925     * The configuration is sent to the camera service when you exit the camera or change the configuration next time.
926     *
927     * @permission ohos.permission.CAMERA
928     * @param { PrelaunchConfig } prelaunchConfig - Prelaunch configuration info.
929     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
930     * @throws { BusinessError } 7400102 - Operation not allowed.
931     * @syscap SystemCapability.Multimedia.Camera.Core
932     * @systemapi
933     * @since 10
934     */
935    /**
936     * Sets the camera prelaunch configuration.
937     * The configuration is sent to the camera service when you exit the camera or change the configuration next time.
938     *
939     * @permission ohos.permission.CAMERA
940     * @param { PrelaunchConfig } prelaunchConfig - Prelaunch configuration info.
941     * @throws { BusinessError } 202 - Not System Application.
942     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
943     * @throws { BusinessError } 7400102 - Operation not allowed.
944     * @throws { BusinessError } 7400201 - Camera service fatal error.
945     * @syscap SystemCapability.Multimedia.Camera.Core
946     * @systemapi
947     * @since 12
948     */
949    setPrelaunchConfig(prelaunchConfig: PrelaunchConfig): void;
950
951    /**
952     * Enable the camera to prelaunch and start.
953     * This function is called when the user clicks the system camera icon to start the camera application.
954     *
955     * @syscap SystemCapability.Multimedia.Camera.Core
956     * @systemapi
957     * @since 10
958     */
959    /**
960     * Enable the camera to prelaunch and start.
961     * This function is called when the user clicks the system camera icon to start the camera application.
962     *
963     * @throws { BusinessError } 202 - Not System Application.
964     * @syscap SystemCapability.Multimedia.Camera.Core
965     * @systemapi
966     * @since 13
967     */
968    prelaunch(): void;
969
970    /**
971     * Prepare the camera resources.
972     * This function is called when the user touch down the camera switch icon in camera application.
973     *
974     * @param { string } cameraId - The camera to prepare.
975     * @throws { BusinessError } 202 - Not System Application.
976     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
977     * @syscap SystemCapability.Multimedia.Camera.Core
978     * @systemapi
979     * @since 11
980     */
981    /**
982     * Prepare the camera resources.
983     * This function is called when the user touch down the camera switch icon in camera application.
984     *
985     * @param { string } cameraId - The camera to prepare.
986     * @throws { BusinessError } 202 - Not System Application.
987     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
988     * @throws { BusinessError } 7400201 - Camera service fatal error.
989     * @syscap SystemCapability.Multimedia.Camera.Core
990     * @systemapi
991     * @since 12
992     */
993    preSwitchCamera(cameraId: string): void;
994
995    /**
996     * Creates a deferred PreviewOutput instance.
997     *
998     * @param { Profile } profile - Preview output profile.
999     * @returns { PreviewOutput } the PreviewOutput instance.
1000     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1001     * @syscap SystemCapability.Multimedia.Camera.Core
1002     * @systemapi
1003     * @since 10
1004     */
1005    /**
1006     * Creates a deferred PreviewOutput instance.
1007     * You can use the method to create deferred preview output without profile, then you must add this output
1008     * to a session which already preconfiged.
1009     *
1010     * @param { Profile } profile - Preview output profile.
1011     * @returns { PreviewOutput } the PreviewOutput instance.
1012     * @throws { BusinessError } 202 - Not System Application.
1013     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1014     * @syscap SystemCapability.Multimedia.Camera.Core
1015     * @systemapi
1016     * @since 12
1017     */
1018    createDeferredPreviewOutput(profile?: Profile): PreviewOutput;
1019
1020    /**
1021     * Check if the device has a torch.
1022     *
1023     * @returns { boolean } this value that specifies whether the device has a torch.
1024     * @syscap SystemCapability.Multimedia.Camera.Core
1025     * @since 11
1026     */
1027    isTorchSupported(): boolean;
1028
1029    /**
1030     * Check if a specifies torch mode is supported.
1031     * @param { TorchMode } mode - torch mode.
1032     * @returns { boolean } is torch mode supported.
1033     * @syscap SystemCapability.Multimedia.Camera.Core
1034     * @since 11
1035     */
1036    isTorchModeSupported(mode: TorchMode): boolean;
1037
1038    /**
1039     * Get current torch mode.
1040     *
1041     * @returns { TorchMode } torch mode.
1042     * @syscap SystemCapability.Multimedia.Camera.Core
1043     * @since 11
1044     */
1045    getTorchMode(): TorchMode;
1046
1047    /**
1048     * Set torch mode to the device.
1049     *
1050     * @param { TorchMode } mode - torch mode.
1051     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1052     * @syscap SystemCapability.Multimedia.Camera.Core
1053     * @since 11
1054     */
1055    /**
1056     * Set torch mode to the device.
1057     *
1058     * @param { TorchMode } mode - torch mode.
1059     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
1060     * @throws { BusinessError } 7400102 - Operation not allowed.
1061     * @throws { BusinessError } 7400201 - Camera service fatal error.
1062     * @syscap SystemCapability.Multimedia.Camera.Core
1063     * @since 12
1064     */
1065    setTorchMode(mode: TorchMode): void;
1066
1067    /**
1068     * Subscribes torch status change event callback.
1069     *
1070     * @param { 'torchStatusChange' } type - Event type
1071     * @param { AsyncCallback<TorchStatusInfo> } callback - Callback used to return the torch status change
1072     * @syscap SystemCapability.Multimedia.Camera.Core
1073     * @since 11
1074     */
1075    on(type: 'torchStatusChange', callback: AsyncCallback<TorchStatusInfo>): void;
1076
1077    /**
1078     * Unsubscribes torch status change event callback.
1079     *
1080     * @param { 'torchStatusChange' } type - Event type
1081     * @param { AsyncCallback<TorchStatusInfo> } callback - Callback used to return the torch status change
1082     * @syscap SystemCapability.Multimedia.Camera.Core
1083     * @since 11
1084     */
1085    off(type: 'torchStatusChange', callback?: AsyncCallback<TorchStatusInfo>): void;
1086  }
1087
1088  /**
1089   * Torch status info.
1090   *
1091   * @typedef TorchStatusInfo
1092   * @syscap SystemCapability.Multimedia.Camera.Core
1093   * @since 11
1094   */
1095  interface TorchStatusInfo {
1096    /**
1097     * is torch available
1098     *
1099     * @type { boolean }
1100     * @readonly
1101     * @syscap SystemCapability.Multimedia.Camera.Core
1102     * @since 11
1103     */
1104    readonly isTorchAvailable: boolean;
1105
1106    /**
1107     * is torch active
1108     *
1109     * @type { boolean }
1110     * @readonly
1111     * @syscap SystemCapability.Multimedia.Camera.Core
1112     * @since 11
1113     */
1114    readonly isTorchActive: boolean;
1115
1116    /**
1117     * the current torch brightness level.
1118     *
1119     * @type { number }
1120     * @readonly
1121     * @syscap SystemCapability.Multimedia.Camera.Core
1122     * @since 11
1123     */
1124    readonly torchLevel: number;
1125  }
1126
1127  /**
1128   * Enum for torch mode.
1129   *
1130   * @enum { number }
1131   * @syscap SystemCapability.Multimedia.Camera.Core
1132   * @since 11
1133   */
1134  enum TorchMode {
1135    /**
1136     * The device torch is always off.
1137     *
1138     * @syscap SystemCapability.Multimedia.Camera.Core
1139     * @since 11
1140     */
1141    OFF = 0,
1142
1143    /**
1144     * The device torch is always on.
1145     *
1146     * @syscap SystemCapability.Multimedia.Camera.Core
1147     * @since 11
1148     */
1149    ON = 1,
1150
1151    /**
1152     * The device continuously monitors light levels and uses the torch when necessary.
1153     *
1154     * @syscap SystemCapability.Multimedia.Camera.Core
1155     * @since 11
1156     */
1157    AUTO = 2
1158  }
1159
1160  /**
1161   * Camera status info.
1162   *
1163   * @typedef CameraStatusInfo
1164   * @syscap SystemCapability.Multimedia.Camera.Core
1165   * @since 10
1166   */
1167  interface CameraStatusInfo {
1168    /**
1169     * Camera instance.
1170     *
1171     * @type { CameraDevice }
1172     * @syscap SystemCapability.Multimedia.Camera.Core
1173     * @since 10
1174     */
1175    camera: CameraDevice;
1176
1177    /**
1178     * Current camera status.
1179     *
1180     * @type { CameraStatus }
1181     * @syscap SystemCapability.Multimedia.Camera.Core
1182     * @since 10
1183     */
1184    status: CameraStatus;
1185  }
1186
1187  /**
1188   * Fold status info.
1189   *
1190   * @typedef FoldStatusInfo
1191   * @syscap SystemCapability.Multimedia.Camera.Core
1192   * @since 12
1193   */
1194  interface FoldStatusInfo {
1195    /**
1196     * Gets supported camera devices under the current fold status.
1197     *
1198     * @type { Array<CameraDevice> }
1199     * @readonly
1200     * @syscap SystemCapability.Multimedia.Camera.Core
1201     * @since 12
1202     */
1203    readonly supportedCameras: Array<CameraDevice>;
1204
1205    /**
1206     * Current fold status.
1207     *
1208     * @type { FoldStatus }
1209     * @readonly
1210     * @syscap SystemCapability.Multimedia.Camera.Core
1211     * @since 12
1212     */
1213    readonly foldStatus: FoldStatus;
1214  }
1215
1216  /**
1217   * Enum for camera position.
1218   *
1219   * @enum { number }
1220   * @syscap SystemCapability.Multimedia.Camera.Core
1221   * @since 10
1222   */
1223  /**
1224   * Enum for camera position.
1225   *
1226   * @enum { number }
1227   * @syscap SystemCapability.Multimedia.Camera.Core
1228   * @atomicservice
1229   * @since 12
1230   */
1231  enum CameraPosition {
1232    /**
1233     * Unspecified position.
1234     *
1235     * @syscap SystemCapability.Multimedia.Camera.Core
1236     * @since 10
1237     */
1238    /**
1239     * Unspecified position.
1240     *
1241     * @syscap SystemCapability.Multimedia.Camera.Core
1242     * @atomicservice
1243     * @since 12
1244     */
1245    CAMERA_POSITION_UNSPECIFIED = 0,
1246
1247    /**
1248     * Back position.
1249     *
1250     * @syscap SystemCapability.Multimedia.Camera.Core
1251     * @since 10
1252     */
1253    /**
1254     * Back position.
1255     *
1256     * @syscap SystemCapability.Multimedia.Camera.Core
1257     * @atomicservice
1258     * @since 12
1259     */
1260    CAMERA_POSITION_BACK = 1,
1261
1262    /**
1263     * Front position.
1264     *
1265     * @syscap SystemCapability.Multimedia.Camera.Core
1266     * @since 10
1267     */
1268    /**
1269     * Front position.
1270     *
1271     * @syscap SystemCapability.Multimedia.Camera.Core
1272     * @atomicservice
1273     * @since 12
1274     */
1275    CAMERA_POSITION_FRONT = 2,
1276
1277    /**
1278     * Camera that is inner position when the device is folded.
1279     *
1280     * @syscap SystemCapability.Multimedia.Camera.Core
1281     * @since 11
1282     */
1283    /**
1284     * Camera that is inner position when the device is folded.
1285     *
1286     * @syscap SystemCapability.Multimedia.Camera.Core
1287     * @atomicservice
1288     * @since 12
1289     * @deprecated since 12
1290     */
1291    CAMERA_POSITION_FOLD_INNER = 3
1292  }
1293
1294  /**
1295   * Enum for camera type.
1296   *
1297   * @enum { number }
1298   * @syscap SystemCapability.Multimedia.Camera.Core
1299   * @since 10
1300   */
1301  enum CameraType {
1302    /**
1303     * Default camera type
1304     *
1305     * @syscap SystemCapability.Multimedia.Camera.Core
1306     * @since 10
1307     */
1308    CAMERA_TYPE_DEFAULT = 0,
1309
1310    /**
1311     * Wide camera
1312     *
1313     * @syscap SystemCapability.Multimedia.Camera.Core
1314     * @since 10
1315     */
1316    CAMERA_TYPE_WIDE_ANGLE = 1,
1317
1318    /**
1319     * Ultra wide camera
1320     *
1321     * @syscap SystemCapability.Multimedia.Camera.Core
1322     * @since 10
1323     */
1324    CAMERA_TYPE_ULTRA_WIDE = 2,
1325
1326    /**
1327     * Telephoto camera
1328     *
1329     * @syscap SystemCapability.Multimedia.Camera.Core
1330     * @since 10
1331     */
1332    CAMERA_TYPE_TELEPHOTO = 3,
1333
1334    /**
1335     * True depth camera
1336     *
1337     * @syscap SystemCapability.Multimedia.Camera.Core
1338     * @since 10
1339     */
1340    CAMERA_TYPE_TRUE_DEPTH = 4
1341  }
1342
1343  /**
1344   * Enum for camera connection type.
1345   *
1346   * @enum { number }
1347   * @syscap SystemCapability.Multimedia.Camera.Core
1348   * @since 10
1349   */
1350  enum ConnectionType {
1351    /**
1352     * Built-in camera.
1353     *
1354     * @syscap SystemCapability.Multimedia.Camera.Core
1355     * @since 10
1356     */
1357    CAMERA_CONNECTION_BUILT_IN = 0,
1358
1359    /**
1360     * Camera connected using USB
1361     *
1362     * @syscap SystemCapability.Multimedia.Camera.Core
1363     * @since 10
1364     */
1365    CAMERA_CONNECTION_USB_PLUGIN = 1,
1366
1367    /**
1368     * Remote camera
1369     *
1370     * @syscap SystemCapability.Multimedia.Camera.Core
1371     * @since 10
1372     */
1373    CAMERA_CONNECTION_REMOTE = 2
1374  }
1375
1376  /**
1377   * Enum for remote camera device type.
1378   *
1379   * @enum { number }
1380   * @syscap SystemCapability.Multimedia.Camera.Core
1381   * @systemapi
1382   * @since 10
1383   */
1384  enum HostDeviceType {
1385    /**
1386     * Indicates an unknown device camera.
1387     *
1388     * @syscap SystemCapability.Multimedia.Camera.Core
1389     * @systemapi
1390     * @since 10
1391     */
1392    UNKNOWN_TYPE = 0,
1393
1394    /**
1395     * Indicates a smartphone camera.
1396     *
1397     * @syscap SystemCapability.Multimedia.Camera.Core
1398     * @systemapi
1399     * @since 10
1400     */
1401    PHONE = 0x0E,
1402
1403    /**
1404     * Indicates a tablet camera.
1405     *
1406     * @syscap SystemCapability.Multimedia.Camera.Core
1407     * @systemapi
1408     * @since 10
1409     */
1410    TABLET = 0x11
1411  }
1412
1413  /**
1414   * Camera device object.
1415   *
1416   * @typedef CameraDevice
1417   * @syscap SystemCapability.Multimedia.Camera.Core
1418   * @since 10
1419   */
1420  interface CameraDevice {
1421    /**
1422     * Camera id attribute.
1423     *
1424     * @type { string }
1425     * @readonly
1426     * @syscap SystemCapability.Multimedia.Camera.Core
1427     * @since 10
1428     */
1429    readonly cameraId: string;
1430
1431    /**
1432     * Camera position attribute.
1433     *
1434     * @type { CameraPosition }
1435     * @readonly
1436     * @syscap SystemCapability.Multimedia.Camera.Core
1437     * @since 10
1438     */
1439    readonly cameraPosition: CameraPosition;
1440
1441    /**
1442     * Camera type attribute.
1443     *
1444     * @type { CameraType }
1445     * @readonly
1446     * @syscap SystemCapability.Multimedia.Camera.Core
1447     * @since 10
1448     */
1449    readonly cameraType: CameraType;
1450
1451    /**
1452     * Camera connection type attribute.
1453     *
1454     * @type { ConnectionType }
1455     * @readonly
1456     * @syscap SystemCapability.Multimedia.Camera.Core
1457     * @since 10
1458     */
1459    readonly connectionType: ConnectionType;
1460
1461    /**
1462     * Camera remote camera device name attribute.
1463     *
1464     * @type { string }
1465     * @readonly
1466     * @syscap SystemCapability.Multimedia.Camera.Core
1467     * @systemapi
1468     * @since 10
1469     */
1470    readonly hostDeviceName: string;
1471
1472    /**
1473     * Camera remote camera device type attribute.
1474     *
1475     * @type { HostDeviceType }
1476     * @readonly
1477     * @syscap SystemCapability.Multimedia.Camera.Core
1478     * @systemapi
1479     * @since 10
1480     */
1481    readonly hostDeviceType: HostDeviceType;
1482
1483    /**
1484     * Camera sensor orientation attribute.
1485     *
1486     * @type { number }
1487     * @readonly
1488     * @syscap SystemCapability.Multimedia.Camera.Core
1489     * @since 12
1490     */
1491    readonly cameraOrientation: number;
1492  }
1493
1494  /**
1495   * Size parameter.
1496   *
1497   * @typedef Size
1498   * @syscap SystemCapability.Multimedia.Camera.Core
1499   * @since 10
1500   */
1501  interface Size {
1502    /**
1503     * Height.
1504     *
1505     * @type { number }
1506     * @syscap SystemCapability.Multimedia.Camera.Core
1507     * @since 10
1508     */
1509    height: number;
1510
1511    /**
1512     * Width.
1513     *
1514     * @type { number }
1515     * @syscap SystemCapability.Multimedia.Camera.Core
1516     * @since 10
1517     */
1518    width: number;
1519  }
1520
1521  /**
1522   * Point parameter.
1523   *
1524   * @typedef Point
1525   * @syscap SystemCapability.Multimedia.Camera.Core
1526   * @since 10
1527   */
1528  interface Point {
1529    /**
1530     * x co-ordinate
1531     *
1532     * @type { number }
1533     * @syscap SystemCapability.Multimedia.Camera.Core
1534     * @since 10
1535     */
1536    x: number;
1537
1538    /**
1539     * y co-ordinate
1540     *
1541     * @type { number }
1542     * @syscap SystemCapability.Multimedia.Camera.Core
1543     * @since 10
1544     */
1545    y: number;
1546  }
1547
1548  /**
1549   * Camera input object.
1550   *
1551   * @interface CameraInput
1552   * @syscap SystemCapability.Multimedia.Camera.Core
1553   * @since 10
1554   */
1555  interface CameraInput {
1556    /**
1557     * Open camera.
1558     *
1559     * @param { AsyncCallback<void> } callback - Callback used to return the result.
1560     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1561     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1562     * @throws { BusinessError } 7400201 - Camera service fatal error.
1563     * @syscap SystemCapability.Multimedia.Camera.Core
1564     * @since 10
1565     */
1566    open(callback: AsyncCallback<void>): void;
1567
1568    /**
1569     * Open camera.
1570     *
1571     * @returns { Promise<void> } Promise used to return the result.
1572     * @throws { BusinessError } 7400102 - Operation not allowed.
1573     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1574     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1575     * @throws { BusinessError } 7400201 - Camera service fatal error.
1576     * @syscap SystemCapability.Multimedia.Camera.Core
1577     * @since 10
1578     */
1579    open(): Promise<void>;
1580
1581    /**
1582     * Open camera.
1583     *
1584     * @param { boolean } isSecureEnabled - Enable secure camera.
1585     * @returns { Promise<bigint> } Promise used to return the result.
1586     * @throws { BusinessError } 7400107 - Can not use camera cause of conflict.
1587     * @throws { BusinessError } 7400108 - Camera disabled cause of security reason.
1588     * @throws { BusinessError } 7400201 - Camera service fatal error.
1589     * @syscap SystemCapability.Multimedia.Camera.Core
1590     * @since 12
1591     */
1592    open(isSecureEnabled: boolean): Promise<bigint>;
1593
1594    /**
1595     * Close camera.
1596     *
1597     * @param { AsyncCallback<void> } callback - Callback used to return the result.
1598     * @throws { BusinessError } 7400201 - Camera service fatal error.
1599     * @syscap SystemCapability.Multimedia.Camera.Core
1600     * @since 10
1601     */
1602    close(callback: AsyncCallback<void>): void;
1603
1604    /**
1605     * Close camera.
1606     *
1607     * @returns { Promise<void> } Promise used to return the result.
1608     * @throws { BusinessError } 7400201 - Camera service fatal error.
1609     * @syscap SystemCapability.Multimedia.Camera.Core
1610     * @since 10
1611     */
1612    close(): Promise<void>;
1613
1614    /**
1615     * Subscribes to error events.
1616     *
1617     * @param { 'error' } type - Event type.
1618     * @param { CameraDevice } camera - Camera device.
1619     * @param { ErrorCallback } callback - Callback used to get the camera input errors.
1620     * @syscap SystemCapability.Multimedia.Camera.Core
1621     * @since 10
1622     */
1623    on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void;
1624
1625    /**
1626     * Unsubscribes from error events.
1627     *
1628     * @param { 'error' } type - Event type.
1629     * @param { CameraDevice } camera - Camera device.
1630     * @param { ErrorCallback } callback - Callback used to get the camera input errors.
1631     * @syscap SystemCapability.Multimedia.Camera.Core
1632     * @since 10
1633     */
1634    off(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void;
1635
1636    /**
1637     * Subscribes to camera occlusion detection results.
1638     *
1639     * @param { 'cameraOcclusionDetection' } type - Event type.
1640     * @param { AsyncCallback<CameraOcclusionDetectionResult> } callback - Callback used to get detection results.
1641     * @throws { BusinessError } 202 - Not System Application.
1642     * @syscap SystemCapability.Multimedia.Camera.Core
1643     * @systemapi
1644     * @since 12
1645     */
1646    on(type: 'cameraOcclusionDetection', callback: AsyncCallback<CameraOcclusionDetectionResult>): void;
1647
1648    /**
1649     * Unsubscribes from camera occlusion detection results.
1650     *
1651     * @param { 'cameraOcclusionDetection' } type - Event type.
1652     * @param { AsyncCallback<CameraOcclusionDetectionResult> } callback - Callback used to get detection results.
1653     * @throws { BusinessError } 202 - Not System Application.
1654     * @syscap SystemCapability.Multimedia.Camera.Core
1655     * @systemapi
1656     * @since 12
1657     */
1658    off(type: 'cameraOcclusionDetection', callback?: AsyncCallback<CameraOcclusionDetectionResult>): void;
1659  }
1660
1661  /**
1662   * Enumerates the camera scene modes.
1663   *
1664   * @enum { number }
1665   * @syscap SystemCapability.Multimedia.Camera.Core
1666   * @since 11
1667   */
1668  enum SceneMode {
1669    /**
1670     * Normal photo mode.
1671     *
1672     * @syscap SystemCapability.Multimedia.Camera.Core
1673     * @since 11
1674     */
1675    NORMAL_PHOTO = 1,
1676
1677    /**
1678     * Normal video mode.
1679     *
1680     * @syscap SystemCapability.Multimedia.Camera.Core
1681     * @since 11
1682     */
1683    NORMAL_VIDEO = 2,
1684
1685    /**
1686     * Portrait photo mode.
1687     *
1688     * @syscap SystemCapability.Multimedia.Camera.Core
1689     * @systemapi
1690     * @since 11
1691     */
1692    PORTRAIT_PHOTO = 3,
1693
1694    /**
1695     * Night photo mode.
1696     *
1697     * @syscap SystemCapability.Multimedia.Camera.Core
1698     * @systemapi
1699     * @since 11
1700     */
1701    NIGHT_PHOTO = 4,
1702
1703    /**
1704     * Professional photo mode.
1705     *
1706     * @syscap SystemCapability.Multimedia.Camera.Core
1707     * @systemapi
1708     * @since 12
1709     */
1710    PROFESSIONAL_PHOTO = 5,
1711
1712    /**
1713     * Professional video mode.
1714     *
1715     * @syscap SystemCapability.Multimedia.Camera.Core
1716     * @systemapi
1717     * @since 12
1718     */
1719    PROFESSIONAL_VIDEO = 6,
1720
1721    /**
1722     * Slow motion video mode.
1723     *
1724     * @syscap SystemCapability.Multimedia.Camera.Core
1725     * @systemapi
1726     * @since 12
1727     */
1728    SLOW_MOTION_VIDEO = 7,
1729
1730    /**
1731     * Macro photo mode.
1732     *
1733     * @syscap SystemCapability.Multimedia.Camera.Core
1734     * @systemapi
1735     * @since 12
1736     */
1737    MACRO_PHOTO = 8,
1738
1739    /**
1740     * Macro video mode.
1741     *
1742     * @syscap SystemCapability.Multimedia.Camera.Core
1743     * @systemapi
1744     * @since 12
1745     */
1746    MACRO_VIDEO = 9,
1747
1748    /**
1749     * Light painting photo mode.
1750     *
1751     * @syscap SystemCapability.Multimedia.Camera.Core
1752     * @systemapi
1753     * @since 12
1754     */
1755    LIGHT_PAINTING_PHOTO = 10,
1756
1757    /**
1758     * High resolution mode.
1759     *
1760     * @syscap SystemCapability.Multimedia.Camera.Core
1761     * @systemapi
1762     * @since 12
1763     */
1764    HIGH_RESOLUTION_PHOTO = 11,
1765
1766    /**
1767     * Secure camera mode.
1768     *
1769     * @syscap SystemCapability.Multimedia.Camera.Core
1770     * @since 12
1771     */
1772    SECURE_PHOTO = 12,
1773
1774    /**
1775     * Quick shot mode.
1776     *
1777     * @syscap SystemCapability.Multimedia.Camera.Core
1778     * @systemapi
1779     * @since 12
1780     */
1781    QUICK_SHOT_PHOTO = 13,
1782
1783    /**
1784     * Aperture video mode.
1785     *
1786     * @syscap SystemCapability.Multimedia.Camera.Core
1787     * @systemapi
1788     * @since 12
1789     */
1790    APERTURE_VIDEO = 14,
1791
1792    /**
1793     * Panorama photo camera mode.
1794     *
1795     * @syscap SystemCapability.Multimedia.Camera.Core
1796     * @systemapi
1797     * @since 12
1798     */
1799    PANORAMA_PHOTO = 15,
1800
1801    /**
1802     * Timelapse photo camera mode.
1803     *
1804     * @syscap SystemCapability.Multimedia.Camera.Core
1805     * @systemapi
1806     * @since 12
1807     */
1808    TIME_LAPSE_PHOTO = 16,
1809
1810    /**
1811     * Fluorescence photo mode.
1812     *
1813     * @syscap SystemCapability.Multimedia.Camera.Core
1814     * @systemapi
1815     * @since 13
1816     */
1817    FLUORESCENCE_PHOTO = 17
1818  }
1819
1820  /**
1821   * Enum for camera format type.
1822   *
1823   * @enum { number }
1824   * @syscap SystemCapability.Multimedia.Camera.Core
1825   * @since 10
1826   */
1827  enum CameraFormat {
1828    /**
1829     * RGBA 8888 Format.
1830     *
1831     * @syscap SystemCapability.Multimedia.Camera.Core
1832     * @since 10
1833     */
1834    CAMERA_FORMAT_RGBA_8888 = 3,
1835
1836    /**
1837     * Digital negative Format.
1838     *
1839     * @syscap SystemCapability.Multimedia.Camera.Core
1840     * @systemapi
1841     * @since 12
1842     */
1843    CAMERA_FORMAT_DNG = 4,
1844
1845    /**
1846     * YUV 420 Format.
1847     *
1848     * @syscap SystemCapability.Multimedia.Camera.Core
1849     * @since 10
1850     */
1851    CAMERA_FORMAT_YUV_420_SP = 1003,
1852
1853    /**
1854     * JPEG Format.
1855     *
1856     * @syscap SystemCapability.Multimedia.Camera.Core
1857     * @since 10
1858     */
1859    CAMERA_FORMAT_JPEG = 2000,
1860
1861    /**
1862     * YCBCR P010 Format.
1863     *
1864     * @syscap SystemCapability.Multimedia.Camera.Core
1865     * @since 11
1866     */
1867    CAMERA_FORMAT_YCBCR_P010,
1868
1869    /**
1870     * YCRCB P010 Format.
1871     *
1872     * @syscap SystemCapability.Multimedia.Camera.Core
1873     * @since 11
1874     */
1875    CAMERA_FORMAT_YCRCB_P010,
1876
1877    /**
1878     * HEIC Format.
1879     *
1880     * @syscap SystemCapability.Multimedia.Camera.Core
1881     * @since 13
1882     */
1883    CAMERA_FORMAT_HEIC = 2003,
1884
1885    /**
1886     * Depth Data Format: float 16.
1887     *
1888     * @syscap SystemCapability.Multimedia.Camera.Core
1889     * @systemapi
1890     * @since 13
1891     */
1892    CAMERA_FORMAT_DEPTH_16 = 3000,
1893
1894    /**
1895     * Depth Data Format: float 32.
1896     *
1897     * @syscap SystemCapability.Multimedia.Camera.Core
1898     * @systemapi
1899     * @since 13
1900     */
1901    CAMERA_FORMAT_DEPTH_32 = 3001
1902  }
1903
1904  /**
1905   * Enum for flash mode.
1906   *
1907   * @enum { number }
1908   * @syscap SystemCapability.Multimedia.Camera.Core
1909   * @since 10
1910   */
1911  enum FlashMode {
1912    /**
1913     * Close mode.
1914     *
1915     * @syscap SystemCapability.Multimedia.Camera.Core
1916     * @since 10
1917     */
1918    FLASH_MODE_CLOSE = 0,
1919
1920    /**
1921     * Open mode.
1922     *
1923     * @syscap SystemCapability.Multimedia.Camera.Core
1924     * @since 10
1925     */
1926    FLASH_MODE_OPEN = 1,
1927
1928    /**
1929     * Auto mode.
1930     *
1931     * @syscap SystemCapability.Multimedia.Camera.Core
1932     * @since 10
1933     */
1934    FLASH_MODE_AUTO = 2,
1935
1936    /**
1937     * Always open mode.
1938     *
1939     * @syscap SystemCapability.Multimedia.Camera.Core
1940     * @since 10
1941     */
1942    FLASH_MODE_ALWAYS_OPEN = 3
1943  }
1944
1945  /**
1946   * LCD Flash Status.
1947   *
1948   * @typedef LcdFlashStatus
1949   * @syscap SystemCapability.Multimedia.Camera.Core
1950   * @systemapi
1951   * @since 12
1952   */
1953  interface LcdFlashStatus {
1954    /**
1955     * Check whether lcd flash is needed.
1956     *
1957     * @type { boolean }
1958     * @syscap SystemCapability.Multimedia.Camera.Core
1959     * @systemapi
1960     * @since 12
1961     */
1962    readonly isLcdFlashNeeded: boolean;
1963
1964    /**
1965     * Compensate value for lcd flash.
1966     *
1967     * @type { number }
1968     * @syscap SystemCapability.Multimedia.Camera.Core
1969     * @systemapi
1970     * @since 12
1971     */
1972    readonly lcdCompensation: number;
1973  }
1974
1975  /**
1976   * Flash Query object.
1977   *
1978   * @interface FlashQuery
1979   * @syscap SystemCapability.Multimedia.Camera.Core
1980   * @since 12
1981   */
1982  interface FlashQuery {
1983    /**
1984     * Check if device has flash light.
1985     *
1986     * @returns { boolean } The flash light support status.
1987     * @throws { BusinessError } 7400103 - Session not config.
1988     * @syscap SystemCapability.Multimedia.Camera.Core
1989     * @since 11
1990     */
1991    /**
1992     * Check if device has flash light.
1993     * Move to FlashQuery interface from Flash since 12.
1994     *
1995     * @returns { boolean } The flash light support status.
1996     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
1997     * @syscap SystemCapability.Multimedia.Camera.Core
1998     * @since 12
1999     */
2000    hasFlash(): boolean;
2001
2002    /**
2003     * Checks whether a specified flash mode is supported.
2004     *
2005     * @param { FlashMode } flashMode - Flash mode
2006     * @returns { boolean } Is the flash mode supported.
2007     * @throws { BusinessError } 7400103 - Session not config.
2008     * @syscap SystemCapability.Multimedia.Camera.Core
2009     * @since 11
2010     */
2011    /**
2012     * Checks whether a specified flash mode is supported.
2013     * Move to FlashQuery interface from Flash since 12.
2014     *
2015     * @param { FlashMode } flashMode - Flash mode
2016     * @returns { boolean } Is the flash mode supported.
2017     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2018     * @syscap SystemCapability.Multimedia.Camera.Core
2019     * @since 12
2020     */
2021    isFlashModeSupported(flashMode: FlashMode): boolean;
2022
2023    /**
2024     * Checks whether lcd flash is supported.
2025     *
2026     * @returns { boolean } Is lcd flash supported.
2027     * @throws { BusinessError } 202 - Not System Application.
2028     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2029     * @syscap SystemCapability.Multimedia.Camera.Core
2030     * @systemapi
2031     * @since 12
2032     */
2033    isLcdFlashSupported(): boolean;
2034  }
2035
2036  /**
2037   * Flash object.
2038   *
2039   * @interface Flash
2040   * @syscap SystemCapability.Multimedia.Camera.Core
2041   * @since 11
2042   */
2043  interface Flash extends FlashQuery {
2044    /**
2045     * Gets current flash mode.
2046     *
2047     * @returns { FlashMode } The current flash mode.
2048     * @throws { BusinessError } 7400103 - Session not config.
2049     * @syscap SystemCapability.Multimedia.Camera.Core
2050     * @since 11
2051     */
2052    getFlashMode(): FlashMode;
2053
2054    /**
2055     * Sets flash mode.
2056     *
2057     * @param { FlashMode } flashMode - Target flash mode.
2058     * @throws { BusinessError } 7400103 - Session not config.
2059     * @syscap SystemCapability.Multimedia.Camera.Core
2060     * @since 11
2061     */
2062    setFlashMode(flashMode: FlashMode): void;
2063
2064    /**
2065     * Enable lcd flash.
2066     *
2067     * @param { boolean } enabled - Target lcd flash status.
2068     * @throws { BusinessError } 202 - Not System Application.
2069     * @throws { BusinessError } 7400103 - Session not config.
2070     * @syscap SystemCapability.Multimedia.Camera.Core
2071     * @systemapi
2072     * @since 13
2073     */
2074    enableLcdFlash(enabled: boolean): void;
2075  }
2076
2077  /**
2078   * Enum for exposure mode.
2079   *
2080   * @enum { number }
2081   * @syscap SystemCapability.Multimedia.Camera.Core
2082   * @since 10
2083   */
2084  enum ExposureMode {
2085    /**
2086     * Lock exposure mode.
2087     *
2088     * @syscap SystemCapability.Multimedia.Camera.Core
2089     * @since 10
2090     */
2091    EXPOSURE_MODE_LOCKED = 0,
2092
2093    /**
2094     * Auto exposure mode.
2095     *
2096     * @syscap SystemCapability.Multimedia.Camera.Core
2097     * @since 10
2098     */
2099    EXPOSURE_MODE_AUTO = 1,
2100
2101    /**
2102     * Continuous automatic exposure.
2103     *
2104     * @syscap SystemCapability.Multimedia.Camera.Core
2105     * @since 10
2106     */
2107    EXPOSURE_MODE_CONTINUOUS_AUTO = 2,
2108
2109    /**
2110     * Manual exposure mode.
2111     *
2112     * @syscap SystemCapability.Multimedia.Camera.Core
2113     * @systemapi
2114     * @since 12
2115     */
2116    EXPOSURE_MODE_MANUAL = 3
2117  }
2118
2119  /**
2120   * Enum for exposure metering mode.
2121   *
2122   * @enum { number }
2123   * @syscap SystemCapability.Multimedia.Camera.Core
2124   * @systemapi
2125   * @since 12
2126   */
2127  enum ExposureMeteringMode {
2128    /**
2129     * Matrix metering.
2130     *
2131     * @syscap SystemCapability.Multimedia.Camera.Core
2132     * @systemapi
2133     * @since 12
2134     */
2135    MATRIX = 0,
2136
2137    /**
2138     * Center metering.
2139     *
2140     * @syscap SystemCapability.Multimedia.Camera.Core
2141     * @systemapi
2142     * @since 12
2143     */
2144    CENTER = 1,
2145
2146    /**
2147     * Spot metering.
2148     *
2149     * @syscap SystemCapability.Multimedia.Camera.Core
2150     * @systemapi
2151     * @since 12
2152     */
2153    SPOT = 2
2154  }
2155
2156  /**
2157   * AutoExposureQuery object.
2158   *
2159   * @interface AutoExposureQuery
2160   * @syscap SystemCapability.Multimedia.Camera.Core
2161   * @since 12
2162   */
2163  interface AutoExposureQuery {
2164    /**
2165     * Checks whether a specified exposure mode is supported.
2166     *
2167     * @param { ExposureMode } aeMode - Exposure mode
2168     * @returns { boolean } Is the exposure mode supported.
2169     * @throws { BusinessError } 7400103 - Session not config.
2170     * @syscap SystemCapability.Multimedia.Camera.Core
2171     * @since 11
2172     */
2173    /**
2174     * Checks whether a specified exposure mode is supported.
2175     * Move to AutoExposureQuery interface from AutoExposure interface since 12.
2176     *
2177     * @param { ExposureMode } aeMode - Exposure mode
2178     * @returns { boolean } Is the exposure mode supported.
2179     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2180     * @syscap SystemCapability.Multimedia.Camera.Core
2181     * @since 12
2182     */
2183    isExposureModeSupported(aeMode: ExposureMode): boolean;
2184
2185    /**
2186     * Query the exposure compensation range.
2187     *
2188     * @returns { Array<number> } The array of compensation range.
2189     * @throws { BusinessError } 7400103 - Session not config.
2190     * @syscap SystemCapability.Multimedia.Camera.Core
2191     * @since 11
2192     */
2193    /**
2194     * Query the exposure compensation range.
2195     * Move to AutoExposureQuery interface from AutoExposure interface since 12.
2196     *
2197     * @returns { Array<number> } The array of compensation range.
2198     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2199     * @syscap SystemCapability.Multimedia.Camera.Core
2200     * @since 12
2201     */
2202    getExposureBiasRange(): Array<number>;
2203
2204    /**
2205     * Checks whether a specified exposure metering mode is supported.
2206     *
2207     * @param { ExposureMeteringMode } aeMeteringMode - Exposure metering mode
2208     * @returns { boolean } Is the exposure metering mode supported.
2209     * @throws { BusinessError } 202 - Not System Application.
2210     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2211     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2212     * @syscap SystemCapability.Multimedia.Camera.Core
2213     * @systemapi
2214     * @since 12
2215     */
2216    isExposureMeteringModeSupported(aeMeteringMode: ExposureMeteringMode): boolean;
2217  }
2218
2219  /**
2220   * AutoExposure object.
2221   *
2222   * @interface AutoExposure
2223   * @syscap SystemCapability.Multimedia.Camera.Core
2224   * @since 11
2225   */
2226  interface AutoExposure extends AutoExposureQuery {
2227    /**
2228     * Gets current exposure mode.
2229     *
2230     * @returns { ExposureMode } The current exposure mode.
2231     * @throws { BusinessError } 7400103 - Session not config.
2232     * @syscap SystemCapability.Multimedia.Camera.Core
2233     * @since 11
2234     */
2235    getExposureMode(): ExposureMode;
2236
2237    /**
2238     * Sets Exposure mode.
2239     *
2240     * @param { ExposureMode } aeMode - Exposure mode
2241     * @throws { BusinessError } 7400103 - Session not config.
2242     * @syscap SystemCapability.Multimedia.Camera.Core
2243     * @since 11
2244     */
2245    setExposureMode(aeMode: ExposureMode): void;
2246
2247    /**
2248     * Gets current metering point.
2249     *
2250     * @returns { Point } The current metering point.
2251     * @throws { BusinessError } 7400103 - Session not config.
2252     * @syscap SystemCapability.Multimedia.Camera.Core
2253     * @since 11
2254     */
2255    getMeteringPoint(): Point;
2256
2257    /**
2258     * Set the center point of the metering area.
2259     *
2260     * @param { Point } point - metering point
2261     * @throws { BusinessError } 7400103 - Session not config.
2262     * @syscap SystemCapability.Multimedia.Camera.Core
2263     * @since 11
2264     */
2265    setMeteringPoint(point: Point): void;
2266
2267    /**
2268     * Query the exposure compensation range.
2269     *
2270     * @returns { Array<number> } The array of compensation range.
2271     * @throws { BusinessError } 7400103 - Session not config.
2272     * @syscap SystemCapability.Multimedia.Camera.Core
2273     * @since 11
2274     */
2275    getExposureBiasRange(): Array<number>;
2276
2277    /**
2278     * Set exposure compensation.
2279     *
2280     * @param { number } exposureBias - Exposure compensation
2281     * @throws { BusinessError } 7400103 - Session not config.
2282     * @syscap SystemCapability.Multimedia.Camera.Core
2283     * @since 11
2284     */
2285    /**
2286     * Set exposure compensation.
2287     *
2288     * @param { number } exposureBias - Exposure compensation
2289     * @throws { BusinessError } 7400102 - Operation not allowed.
2290     * @throws { BusinessError } 7400103 - Session not config.
2291     * @syscap SystemCapability.Multimedia.Camera.Core
2292     * @since 12
2293     */
2294    setExposureBias(exposureBias: number): void;
2295
2296    /**
2297     * Query the exposure value.
2298     *
2299     * @returns { number } The exposure value.
2300     * @throws { BusinessError } 7400103 - Session not config.
2301     * @syscap SystemCapability.Multimedia.Camera.Core
2302     * @since 11
2303     */
2304    getExposureValue(): number;
2305
2306    /**
2307     * Gets current exposure metering mode.
2308     *
2309     * @returns { ExposureMeteringMode } The current exposure metering mode.
2310     * @throws { BusinessError } 202 - Not System Application.
2311     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2312     * @syscap SystemCapability.Multimedia.Camera.Core
2313     * @systemapi
2314     * @since 12
2315     */
2316    getExposureMeteringMode(): ExposureMeteringMode;
2317
2318    /**
2319     * Sets exposure metering mode.
2320     *
2321     * @param { ExposureMeteringMode } aeMeteringMode - Exposure metering mode
2322     * @throws { BusinessError } 202 - Not System Application.
2323     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2324     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2325     * @syscap SystemCapability.Multimedia.Camera.Core
2326     * @systemapi
2327     * @since 12
2328     */
2329    setExposureMeteringMode(aeMeteringMode: ExposureMeteringMode): void;
2330  }
2331
2332  /**
2333   * Enum for focus mode.
2334   *
2335   * @enum { number }
2336   * @syscap SystemCapability.Multimedia.Camera.Core
2337   * @since 10
2338   */
2339  enum FocusMode {
2340    /**
2341     * Manual mode.
2342     *
2343     * @syscap SystemCapability.Multimedia.Camera.Core
2344     * @since 10
2345     */
2346    FOCUS_MODE_MANUAL = 0,
2347
2348    /**
2349     * Continuous auto mode.
2350     *
2351     * @syscap SystemCapability.Multimedia.Camera.Core
2352     * @since 10
2353     */
2354    FOCUS_MODE_CONTINUOUS_AUTO = 1,
2355
2356    /**
2357     * Auto mode.
2358     *
2359     * @syscap SystemCapability.Multimedia.Camera.Core
2360     * @since 10
2361     */
2362    FOCUS_MODE_AUTO = 2,
2363
2364    /**
2365     * Locked mode.
2366     *
2367     * @syscap SystemCapability.Multimedia.Camera.Core
2368     * @since 10
2369     */
2370    FOCUS_MODE_LOCKED = 3
2371  }
2372
2373  /**
2374   * Enum for focus state.
2375   *
2376   * @enum { number }
2377   * @syscap SystemCapability.Multimedia.Camera.Core
2378   * @since 10
2379   */
2380  enum FocusState {
2381    /**
2382     * Scan state.
2383     *
2384     * @syscap SystemCapability.Multimedia.Camera.Core
2385     * @since 10
2386     */
2387    FOCUS_STATE_SCAN = 0,
2388
2389    /**
2390     * Focused state.
2391     *
2392     * @syscap SystemCapability.Multimedia.Camera.Core
2393     * @since 10
2394     */
2395    FOCUS_STATE_FOCUSED = 1,
2396
2397    /**
2398     * Unfocused state.
2399     *
2400     * @syscap SystemCapability.Multimedia.Camera.Core
2401     * @since 10
2402     */
2403    FOCUS_STATE_UNFOCUSED = 2
2404  }
2405
2406  /**
2407   * Focus Query object.
2408   *
2409   * @interface FocusQuery
2410   * @syscap SystemCapability.Multimedia.Camera.Core
2411   * @since 12
2412   */
2413  interface FocusQuery {
2414    /**
2415     * Checks whether a specified focus mode is supported.
2416     *
2417     * @param { FocusMode } afMode - Focus mode.
2418     * @returns { boolean } Is the focus mode supported.
2419     * @throws { BusinessError } 7400103 - Session not config.
2420     * @syscap SystemCapability.Multimedia.Camera.Core
2421     * @since 11
2422     */
2423    /**
2424     * Checks whether a specified focus mode is supported.
2425     * Move to FocusQuery interface from Focus interface since 12.
2426     *
2427     * @param { FocusMode } afMode - Focus mode.
2428     * @returns { boolean } Is the focus mode supported.
2429     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2430     * @syscap SystemCapability.Multimedia.Camera.Core
2431     * @since 12
2432     */
2433    isFocusModeSupported(afMode: FocusMode): boolean;
2434
2435    /**
2436     * Checks whether a focus assist is supported.
2437     *
2438     * @returns { boolean } Is the focus assist supported.
2439     * @throws { BusinessError } 202 - Not System Application.
2440     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2441     * @syscap SystemCapability.Multimedia.Camera.Core
2442     * @systemapi
2443     * @since 12
2444     */
2445    isFocusAssistSupported(): boolean;
2446  }
2447
2448  /**
2449   * Focus object.
2450   *
2451   * @interface Focus
2452   * @syscap SystemCapability.Multimedia.Camera.Core
2453   * @since 11
2454   */
2455  interface Focus extends FocusQuery {
2456    /**
2457     * Gets current focus mode.
2458     *
2459     * @returns { FocusMode } The current focus mode.
2460     * @throws { BusinessError } 7400103 - Session not config.
2461     * @syscap SystemCapability.Multimedia.Camera.Core
2462     * @since 11
2463     */
2464    getFocusMode(): FocusMode;
2465
2466    /**
2467     * Sets focus mode.
2468     *
2469     * @param { FocusMode } afMode - Target focus mode.
2470     * @throws { BusinessError } 7400103 - Session not config.
2471     * @syscap SystemCapability.Multimedia.Camera.Core
2472     * @since 11
2473     */
2474    setFocusMode(afMode: FocusMode): void;
2475
2476    /**
2477     * Sets focus point.
2478     *
2479     * @param { Point } point - Target focus point.
2480     * @throws { BusinessError } 7400103 - Session not config.
2481     * @syscap SystemCapability.Multimedia.Camera.Core
2482     * @since 11
2483     */
2484    setFocusPoint(point: Point): void;
2485
2486    /**
2487     * Gets current focus point.
2488     *
2489     * @returns { Point } The current focus point.
2490     * @throws { BusinessError } 7400103 - Session not config.
2491     * @syscap SystemCapability.Multimedia.Camera.Core
2492     * @since 11
2493     */
2494    getFocusPoint(): Point;
2495
2496    /**
2497     * Gets current focal length.
2498     *
2499     * @returns { number } The current focal point.
2500     * @throws { BusinessError } 7400103 - Session not config.
2501     * @syscap SystemCapability.Multimedia.Camera.Core
2502     * @since 11
2503     */
2504    getFocalLength(): number;
2505
2506    /**
2507     * Gets current focus assist.
2508     *
2509     * @returns { boolean } The current focus assist.
2510     * @throws { BusinessError } 202 - Not System Application.
2511     * @throws { BusinessError } 7400103 - Session not config.
2512     * @syscap SystemCapability.Multimedia.Camera.Core
2513     * @systemapi
2514     * @since 12
2515     */
2516    getFocusAssist(): boolean;
2517
2518    /**
2519     * Sets focus assist.
2520     *
2521     * @param { boolean } enabled - Enable focus assist if TRUE.
2522     * @throws { BusinessError } 202 - Not System Application.
2523     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2524     * @throws { BusinessError } 7400103 - Session not config.
2525     * @syscap SystemCapability.Multimedia.Camera.Core
2526     * @systemapi
2527     * @since 12
2528     */
2529    setFocusAssist(enabled: boolean): void;
2530  }
2531
2532  /**
2533   * ManualFocus object.
2534   *
2535   * @interface ManualFocus
2536   * @syscap SystemCapability.Multimedia.Camera.Core
2537   * @systemapi
2538   * @since 12
2539   */
2540  interface ManualFocus {
2541    /**
2542     * Gets current focus distance.
2543     *
2544     * @returns { number } The current focus distance.
2545     * @throws { BusinessError } 202 - Not System Application.
2546     * @throws { BusinessError } 7400103 - Session not config.
2547     * @syscap SystemCapability.Multimedia.Camera.Core
2548     * @systemapi
2549     * @since 12
2550     */
2551    getFocusDistance(): number;
2552
2553    /**
2554     * Sets focus distance.
2555     *
2556     * @param { number } distance - Focus distance
2557     * @throws { BusinessError } 202 - Not System Application.
2558     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2559     * @throws { BusinessError } 7400103 - Session not config.
2560     * @syscap SystemCapability.Multimedia.Camera.Core
2561     * @systemapi
2562     * @since 12
2563     */
2564    setFocusDistance(distance: number): void;
2565  }
2566
2567  /**
2568   * Enumerates the camera white balance modes.
2569   *
2570   * @enum { number }
2571   * @syscap SystemCapability.Multimedia.Camera.Core
2572   * @systemapi
2573   * @since 12
2574   */
2575  enum WhiteBalanceMode {
2576    /**
2577     * Auto white balance mode.
2578     *
2579     * @syscap SystemCapability.Multimedia.Camera.Core
2580     * @systemapi
2581     * @since 12
2582     */
2583    AUTO = 0,
2584
2585    /**
2586     * Cloudy white balance mode.
2587     *
2588     * @syscap SystemCapability.Multimedia.Camera.Core
2589     * @systemapi
2590     * @since 12
2591     */
2592    CLOUDY = 1,
2593
2594    /**
2595     * Incandescent white balance mode.
2596     *
2597     * @syscap SystemCapability.Multimedia.Camera.Core
2598     * @systemapi
2599     * @since 12
2600     */
2601    INCANDESCENT = 2,
2602
2603    /**
2604     * Fluorescent white balance mode.
2605     *
2606     * @syscap SystemCapability.Multimedia.Camera.Core
2607     * @systemapi
2608     * @since 12
2609     */
2610    FLUORESCENT = 3,
2611
2612    /**
2613     * Daylight white balance mode.
2614     *
2615     * @syscap SystemCapability.Multimedia.Camera.Core
2616     * @systemapi
2617     * @since 12
2618     */
2619    DAYLIGHT = 4,
2620
2621    /**
2622     * Manual white balance mode.
2623     *
2624     * @syscap SystemCapability.Multimedia.Camera.Core
2625     * @systemapi
2626     * @since 12
2627     */
2628    MANUAL = 5,
2629
2630    /**
2631     * Lock white balance mode.
2632     *
2633     * @syscap SystemCapability.Multimedia.Camera.Core
2634     * @systemapi
2635     * @since 12
2636     */
2637    LOCKED = 6
2638  }
2639
2640  /**
2641   * White Balance Query object.
2642   *
2643   * @interface WhiteBalanceQuery
2644   * @syscap SystemCapability.Multimedia.Camera.Core
2645   * @systemapi
2646   * @since 12
2647   */
2648  interface WhiteBalanceQuery {
2649    /**
2650     * Checks whether a specified white balance mode is supported.
2651     *
2652     * @param { WhiteBalanceMode } mode - White balance mode.
2653     * @returns { boolean } Is the white balance mode supported.
2654     * @throws { BusinessError } 202 - Not System Application.
2655     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2656     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2657     * @syscap SystemCapability.Multimedia.Camera.Core
2658     * @systemapi
2659     * @since 12
2660     */
2661    isWhiteBalanceModeSupported(mode: WhiteBalanceMode): boolean;
2662
2663    /**
2664     * Query the white balance mode range.
2665     *
2666     * @returns { Array<number> } The array of white balance mode range.
2667     * @throws { BusinessError } 202 - Not System Application.
2668     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2669     * @syscap SystemCapability.Multimedia.Camera.Core
2670     * @systemapi
2671     * @since 12
2672     */
2673    getWhiteBalanceRange(): Array<number>;
2674  }
2675
2676  /**
2677   * WhiteBalance object.
2678   *
2679   * @interface WhiteBalance
2680   * @syscap SystemCapability.Multimedia.Camera.Core
2681   * @systemapi
2682   * @since 12
2683   */
2684  interface WhiteBalance extends WhiteBalanceQuery {
2685    /**
2686     * Gets current white balance mode.
2687     *
2688     * @returns { WhiteBalanceMode } The current white balance mode.
2689     * @throws { BusinessError } 202 - Not System Application.
2690     * @throws { BusinessError } 7400103 - Session not config.
2691     * @syscap SystemCapability.Multimedia.Camera.Core
2692     * @systemapi
2693     * @since 12
2694     */
2695    getWhiteBalanceMode(): WhiteBalanceMode;
2696
2697    /**
2698     * Sets white balance mode.
2699     *
2700     * @param { WhiteBalanceMode } mode - Target white balance mode.
2701     * @throws { BusinessError } 202 - Not System Application.
2702     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2703     * @throws { BusinessError } 7400103 - Session not config.
2704     * @syscap SystemCapability.Multimedia.Camera.Core
2705     * @systemapi
2706     * @since 12
2707     */
2708    setWhiteBalanceMode(mode: WhiteBalanceMode): void;
2709
2710    /**
2711     * Gets current white balance.
2712     *
2713     * @returns { number } The current white balance.
2714     * @throws { BusinessError } 202 - Not System Application.
2715     * @throws { BusinessError } 7400103 - Session not config.
2716     * @syscap SystemCapability.Multimedia.Camera.Core
2717     * @systemapi
2718     * @since 12
2719     */
2720    getWhiteBalance(): number;
2721
2722    /**
2723     * Sets white balance.
2724     *
2725     * @param { number } whiteBalance - White balance.
2726     * @throws { BusinessError } 202 - Not System Application.
2727     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2728     * @throws { BusinessError } 7400103 - Session not config.
2729     * @syscap SystemCapability.Multimedia.Camera.Core
2730     * @systemapi
2731     * @since 12
2732     */
2733    setWhiteBalance(whiteBalance: number): void;
2734  }
2735
2736  /**
2737   * Manual ISO Query object.
2738   *
2739   * @interface ManualIsoQuery
2740   * @syscap SystemCapability.Multimedia.Camera.Core
2741   * @systemapi
2742   * @since 12
2743   */
2744  interface ManualIsoQuery {
2745    /**
2746     * Checks whether ISO is supported.
2747     *
2748     * @returns { boolean } Is the ISO supported.
2749     * @throws { BusinessError } 202 - Not System Application.
2750     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2751     * @syscap SystemCapability.Multimedia.Camera.Core
2752     * @systemapi
2753     * @since 12
2754     */
2755    isManualIsoSupported(): boolean;
2756
2757    /**
2758     * Get the ISO range.
2759     *
2760     * @returns { Array<number> } The array of ISO range.
2761     * @throws { BusinessError } 202 - Not System Application.
2762     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2763     * @syscap SystemCapability.Multimedia.Camera.Core
2764     * @systemapi
2765     * @since 12
2766     */
2767    getIsoRange(): Array<number>;
2768  }
2769
2770  /**
2771   * ManualIso object.
2772   *
2773   * @interface ManualIso
2774   * @syscap SystemCapability.Multimedia.Camera.Core
2775   * @systemapi
2776   * @since 12
2777   */
2778  interface ManualIso extends ManualIsoQuery {
2779    /**
2780     * Gets current ISO.
2781     *
2782     * @returns { number } The current ISO.
2783     * @throws { BusinessError } 202 - Not System Application.
2784     * @throws { BusinessError } 7400103 - Session not config.
2785     * @syscap SystemCapability.Multimedia.Camera.Core
2786     * @systemapi
2787     * @since 12
2788     */
2789    getIso(): number;
2790
2791    /**
2792     * Sets ISO.
2793     *
2794     * @param { number } iso - ISO
2795     * @throws { BusinessError } 202 - Not System Application.
2796     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
2797     * @throws { BusinessError } 7400103 - Session not config.
2798     * @syscap SystemCapability.Multimedia.Camera.Core
2799     * @systemapi
2800     * @since 12
2801     */
2802    setIso(iso: number): void;
2803  }
2804
2805  /**
2806   * Enum for smooth zoom mode.
2807   *
2808   * @enum { number }
2809   * @syscap SystemCapability.Multimedia.Camera.Core
2810   * @since 11
2811   */
2812  enum SmoothZoomMode {
2813    /**
2814     * Normal zoom mode.
2815     *
2816     * @syscap SystemCapability.Multimedia.Camera.Core
2817     * @since 11
2818     */
2819    NORMAL = 0
2820  }
2821
2822  /**
2823   * SmoothZoomInfo object
2824   *
2825   * @typedef SmoothZoomInfo
2826   * @syscap SystemCapability.Multimedia.Camera.Core
2827   * @since 11
2828   */
2829  interface SmoothZoomInfo {
2830    /**
2831     * The duration of smooth zoom.
2832     *
2833     * @type { number }
2834     * @syscap SystemCapability.Multimedia.Camera.Core
2835     * @since 11
2836     */
2837    duration: number;
2838  }
2839
2840  /**
2841   * ZoomPointInfo object.
2842   *
2843   * @typedef ZoomPointInfo
2844   * @syscap SystemCapability.Multimedia.Camera.Core
2845   * @systemapi
2846   * @since 12
2847   */
2848  interface ZoomPointInfo {
2849    /**
2850     * The zoom ratio value.
2851     *
2852     * @type { number }
2853     * @readonly
2854     * @syscap SystemCapability.Multimedia.Camera.Core
2855     * @systemapi
2856     * @since 12
2857     */
2858    readonly zoomRatio: number;
2859
2860    /**
2861     * The equivalent focal Length.
2862     *
2863     * @type { number }
2864     * @readonly
2865     * @syscap SystemCapability.Multimedia.Camera.Core
2866     * @systemapi
2867     * @since 12
2868     */
2869    readonly equivalentFocalLength: number;
2870  }
2871
2872  /**
2873   * Zoom query object.
2874   *
2875   * @interface ZoomQuery
2876   * @syscap SystemCapability.Multimedia.Camera.Core
2877   * @since 12
2878   */
2879  interface ZoomQuery {
2880    /**
2881     * Gets all supported zoom ratio range.
2882     *
2883     * @returns { Array<number> } The zoom ratio range.
2884     * @throws { BusinessError } 7400103 - Session not config.
2885     * @syscap SystemCapability.Multimedia.Camera.Core
2886     * @since 11
2887     */
2888    /**
2889     * Gets all supported zoom ratio range.
2890     * Move to ZoomQuery interface from Zoom since 12.
2891     *
2892     * @returns { Array<number> } The zoom ratio range.
2893     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2894     * @syscap SystemCapability.Multimedia.Camera.Core
2895     * @since 12
2896     */
2897    getZoomRatioRange(): Array<number>;
2898
2899    /**
2900     * Gets all important zoom ratio infos.
2901     *
2902     * @returns { Array<ZoomPointInfo> } The zoom point infos.
2903     * @throws { BusinessError } 202 - Not System Application.
2904     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
2905     * @syscap SystemCapability.Multimedia.Camera.Core
2906     * @systemapi
2907     * @since 12
2908     */
2909    getZoomPointInfos(): Array<ZoomPointInfo>;
2910  }
2911
2912  /**
2913   * Zoom object.
2914   *
2915   * @interface Zoom
2916   * @syscap SystemCapability.Multimedia.Camera.Core
2917   * @since 11
2918   */
2919  interface Zoom extends ZoomQuery {
2920    /**
2921     * Gets zoom ratio.
2922     *
2923     * @returns { number } The zoom ratio value.
2924     * @throws { BusinessError } 7400103 - Session not config.
2925     * @syscap SystemCapability.Multimedia.Camera.Core
2926     * @since 11
2927     */
2928    /**
2929     * Gets zoom ratio.
2930     *
2931     * @returns { number } The zoom ratio value.
2932     * @throws { BusinessError } 7400103 - Session not config.
2933     * @throws { BusinessError } 7400201 - Camera service fatal error.
2934     * @syscap SystemCapability.Multimedia.Camera.Core
2935     * @since 12
2936     */
2937    getZoomRatio(): number;
2938
2939    /**
2940     * Sets zoom ratio.
2941     *
2942     * @param { number } zoomRatio - Target zoom ratio.
2943     * @throws { BusinessError } 7400103 - Session not config.
2944     * @syscap SystemCapability.Multimedia.Camera.Core
2945     * @since 11
2946     */
2947    setZoomRatio(zoomRatio: number): void;
2948
2949    /**
2950     * Sets target zoom ratio by smooth method.
2951     *
2952     * @param { number } targetRatio - Target zoom ratio.
2953     * @param { SmoothZoomMode } mode - Smooth zoom mode.
2954     * @throws { BusinessError } 7400103 - Session not config.
2955     * @syscap SystemCapability.Multimedia.Camera.Core
2956     * @since 11
2957     */
2958    setSmoothZoom(targetRatio: number, mode?: SmoothZoomMode): void;
2959
2960    /**
2961     * Notify device to prepare for zoom.
2962     *
2963     * @throws { BusinessError } 202 - Not System Application.
2964     * @throws { BusinessError } 7400103 - Session not config.
2965     * @syscap SystemCapability.Multimedia.Camera.Core
2966     * @systemapi
2967     * @since 11
2968     */
2969    prepareZoom(): void;
2970
2971    /**
2972     * Notify device of zoom completion.
2973     *
2974     * @throws { BusinessError } 202 - Not System Application.
2975     * @throws { BusinessError } 7400103 - Session not config.
2976     * @syscap SystemCapability.Multimedia.Camera.Core
2977     * @systemapi
2978     * @since 11
2979     */
2980    unprepareZoom(): void;
2981  }
2982
2983  /**
2984   * Enum for video stabilization mode.
2985   *
2986   * @enum { number }
2987   * @syscap SystemCapability.Multimedia.Camera.Core
2988   * @since 10
2989   */
2990  enum VideoStabilizationMode {
2991    /**
2992     * Turn off video stablization.
2993     *
2994     * @syscap SystemCapability.Multimedia.Camera.Core
2995     * @since 10
2996     */
2997    OFF = 0,
2998
2999    /**
3000     * LOW mode provides basic stabilization effect.
3001     *
3002     * @syscap SystemCapability.Multimedia.Camera.Core
3003     * @since 10
3004     */
3005    LOW = 1,
3006
3007    /**
3008     * MIDDLE mode means algorithms can achieve better effects than LOW mode.
3009     *
3010     * @syscap SystemCapability.Multimedia.Camera.Core
3011     * @since 10
3012     */
3013    MIDDLE = 2,
3014
3015    /**
3016     * HIGH mode means algorithms can achieve better effects than MIDDLE mode.
3017     *
3018     * @syscap SystemCapability.Multimedia.Camera.Core
3019     * @since 10
3020     */
3021    HIGH = 3,
3022
3023    /**
3024     * Camera HDF can select mode automatically.
3025     *
3026     * @syscap SystemCapability.Multimedia.Camera.Core
3027     * @since 10
3028     */
3029    AUTO = 4
3030  }
3031
3032  /**
3033   * Stabilization Query object.
3034   *
3035   * @interface StabilizationQuery
3036   * @syscap SystemCapability.Multimedia.Camera.Core
3037   * @since 12
3038   */
3039  interface StabilizationQuery {
3040    /**
3041     * Check whether the specified video stabilization mode is supported.
3042     *
3043     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
3044     * @returns { boolean } Is flash mode supported.
3045     * @throws { BusinessError } 7400103 - Session not config.
3046     * @syscap SystemCapability.Multimedia.Camera.Core
3047     * @since 11
3048     */
3049    /**
3050     * Check whether the specified video stabilization mode is supported.
3051     * Move to StabilizationQuery interface from Stabilization since 12.
3052     *
3053     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
3054     * @returns { boolean } Is flash mode supported.
3055     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3056     * @syscap SystemCapability.Multimedia.Camera.Core
3057     * @since 12
3058     */
3059    isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
3060  }
3061
3062  /**
3063   * Stabilization object.
3064   *
3065   * @interface Stabilization
3066   * @syscap SystemCapability.Multimedia.Camera.Core
3067   * @since 11
3068   */
3069  interface Stabilization extends StabilizationQuery {
3070    /**
3071     * Query the video stabilization mode currently in use.
3072     *
3073     * @returns { VideoStabilizationMode } The current video stabilization mode.
3074     * @throws { BusinessError } 7400103 - Session not config.
3075     * @syscap SystemCapability.Multimedia.Camera.Core
3076     * @since 11
3077     */
3078    getActiveVideoStabilizationMode(): VideoStabilizationMode;
3079
3080    /**
3081     * Set video stabilization mode.
3082     *
3083     * @param { VideoStabilizationMode } mode - video stabilization mode to set.
3084     * @throws { BusinessError } 7400103 - Session not config.
3085     * @syscap SystemCapability.Multimedia.Camera.Core
3086     * @since 11
3087     */
3088    setVideoStabilizationMode(mode: VideoStabilizationMode): void;
3089  }
3090
3091  /**
3092   * Enumerates the camera portrait theme types.
3093   *
3094   * @enum { number }
3095   * @syscap SystemCapability.Multimedia.Camera.Core
3096   * @systemapi
3097   * @since 14
3098   */
3099  enum PortraitThemeType {
3100    /**
3101     * Natural portrait theme type.
3102     *
3103     * @syscap SystemCapability.Multimedia.Camera.Core
3104     * @systemapi
3105     * @since 14
3106     */
3107    NATURAL = 0,
3108
3109    /**
3110     * Delicate portrait theme type.
3111     *
3112     * @syscap SystemCapability.Multimedia.Camera.Core
3113     * @systemapi
3114     * @since 14
3115     */
3116    DELICATE = 1,
3117
3118    /**
3119     * Stylish portrait theme type.
3120     *
3121     * @syscap SystemCapability.Multimedia.Camera.Core
3122     * @systemapi
3123     * @since 14
3124     */
3125    STYLISH = 2
3126  }
3127
3128  /**
3129   * Enumerates the camera beauty effect types.
3130   *
3131   * @enum { number }
3132   * @syscap SystemCapability.Multimedia.Camera.Core
3133   * @systemapi
3134   * @since 10
3135   */
3136  enum BeautyType {
3137    /**
3138     * Auto beauty type.
3139     *
3140     * @syscap SystemCapability.Multimedia.Camera.Core
3141     * @systemapi
3142     * @since 10
3143     */
3144    AUTO = 0,
3145
3146    /**
3147     * Skin smooth beauty type.
3148     *
3149     * @syscap SystemCapability.Multimedia.Camera.Core
3150     * @systemapi
3151     * @since 10
3152     */
3153    SKIN_SMOOTH = 1,
3154
3155    /**
3156     * Face slender beauty type.
3157     *
3158     * @syscap SystemCapability.Multimedia.Camera.Core
3159     * @systemapi
3160     * @since 10
3161     */
3162    FACE_SLENDER = 2,
3163
3164    /**
3165     * Skin tone beauty type.
3166     *
3167     * @syscap SystemCapability.Multimedia.Camera.Core
3168     * @systemapi
3169     * @since 10
3170     */
3171    SKIN_TONE = 3
3172  }
3173
3174  /**
3175   * Beauty Query object.
3176   *
3177   * @interface BeautyQuery
3178   * @syscap SystemCapability.Multimedia.Camera.Core
3179   * @systemapi
3180   * @since 12
3181   */
3182  interface BeautyQuery {
3183    /**
3184     * Gets supported beauty effect types.
3185     *
3186     * @returns { Array<BeautyType> } List of beauty effect types.
3187     * @throws { BusinessError } 202 - Not System Application.
3188     * @throws { BusinessError } 7400103 - Session not config.
3189     * @syscap SystemCapability.Multimedia.Camera.Core
3190     * @systemapi
3191     * @since 11
3192     */
3193    /**
3194     * Gets supported beauty effect types.
3195     * Move to BeautyQuery from Beauty since 12.
3196     *
3197     * @returns { Array<BeautyType> } List of beauty effect types.
3198     * @throws { BusinessError } 202 - Not System Application.
3199     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3200     * @syscap SystemCapability.Multimedia.Camera.Core
3201     * @systemapi
3202     * @since 12
3203     */
3204    getSupportedBeautyTypes(): Array<BeautyType>;
3205
3206    /**
3207     * Gets the specific beauty effect type range.
3208     *
3209     * @param { BeautyType } type - The type of beauty effect.
3210     * @returns { Array<number> } The array of the specific beauty effect range.
3211     * @throws { BusinessError } 202 - Not System Application.
3212     * @throws { BusinessError } 7400103 - Session not config.
3213     * @syscap SystemCapability.Multimedia.Camera.Core
3214     * @systemapi
3215     * @since 11
3216     */
3217    /**
3218     * Gets the specific beauty effect type range.
3219     * Move to BeautyQuery from Beauty since 12.
3220     *
3221     * @param { BeautyType } type - The type of beauty effect.
3222     * @returns { Array<number> } The array of the specific beauty effect range.
3223     * @throws { BusinessError } 202 - Not System Application.
3224     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3225     * @syscap SystemCapability.Multimedia.Camera.Core
3226     * @systemapi
3227     * @since 12
3228     */
3229    getSupportedBeautyRange(type: BeautyType): Array<number>;
3230
3231    /**
3232     * Gets supported portrait theme type.
3233     *
3234     * @returns { Array<PortraitThemeType> } Lists of portrait theme types
3235     * @throws { BusinessError } 202 - Not System Application.
3236     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3237     * @syscap SystemCapability.Multimedia.Camera.Core
3238     * @systemapi
3239     * @since 14
3240     */
3241    getSupportedPortraitThemeTypes(): Array<PortraitThemeType>;
3242
3243    /**
3244     * Checks whether portrait theme is supported.
3245     *
3246     * @returns { boolean } Is portrait theme supported.
3247     * @throws { BusinessError } 202 - Not System Application.
3248     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3249     * @syscap SystemCapability.Multimedia.Camera.Core
3250     * @systemapi
3251     * @since 14
3252     */
3253    isPortraitThemeSupported(): boolean;
3254  }
3255
3256  /**
3257   * Beauty object.
3258   *
3259   * @interface Beauty
3260   * @syscap SystemCapability.Multimedia.Camera.Core
3261   * @systemapi
3262   * @since 11
3263   */
3264  interface Beauty extends BeautyQuery {
3265    /**
3266     * Gets the beauty effect in use.
3267     *
3268     * @param { BeautyType } type - The type of beauty effect.
3269     * @returns { number } the beauty effect in use.
3270     * @throws { BusinessError } 202 - Not System Application.
3271     * @throws { BusinessError } 7400103 - Session not config.
3272     * @syscap SystemCapability.Multimedia.Camera.Core
3273     * @systemapi
3274     * @since 11
3275     */
3276    getBeauty(type: BeautyType): number;
3277
3278    /**
3279     * Sets a beauty effect for a camera device.
3280     *
3281     * @param { BeautyType } type - The type of beauty effect.
3282     * @param { number } value The number of beauty effect.
3283     * @throws { BusinessError } 202 - Not System Application.
3284     * @throws { BusinessError } 7400103 - Session not config.
3285     * @syscap SystemCapability.Multimedia.Camera.Core
3286     * @systemapi
3287     * @since 11
3288     */
3289    setBeauty(type: BeautyType, value: number): void;
3290
3291    /**
3292     * Sets a portrait theme type for a camera device.
3293     *
3294     * @param { PortraitThemeType } type - The type of portrait theme.
3295     * @throws { BusinessError } 202 - Not System Application.
3296     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3297     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3298     * @syscap SystemCapability.Multimedia.Camera.Core
3299     * @systemapi
3300     * @since 14
3301     */
3302    setPortraitThemeType(type: PortraitThemeType): void;
3303  }
3304
3305  /**
3306   * EffectSuggestion object.
3307   *
3308   * @typedef EffectSuggestion
3309   * @syscap SystemCapability.Multimedia.Camera.Core
3310   * @systemapi
3311   * @since 12
3312   */
3313  interface EffectSuggestion {
3314
3315    /**
3316     * Checks whether effect suggestion is supported.
3317     *
3318     * @returns { boolean } Is the effect suggestion supported.
3319     * @throws { BusinessError } 202 - Not System Application.
3320     * @throws { BusinessError } 7400103 - Session not config.
3321     * @syscap SystemCapability.Multimedia.Camera.Core
3322     * @systemapi
3323     * @since 12
3324     */
3325    isEffectSuggestionSupported(): boolean;
3326
3327    /**
3328     * Enable effect suggestion for session.
3329     *
3330     * @param { boolean } enabled enable effect suggestion for session if TRUE..
3331     * @throws { BusinessError } 202 - Not System Application.
3332     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3333     * @throws { BusinessError } 7400103 - Session not config.
3334     * @syscap SystemCapability.Multimedia.Camera.Core
3335     * @systemapi
3336     * @since 12
3337     */
3338    enableEffectSuggestion(enabled: boolean): void;
3339
3340    /**
3341     * Gets supported effect suggestion types.
3342     *
3343     * @returns { Array<EffectSuggestionType> } The array of the effect suggestion types.
3344     * @throws { BusinessError } 202 - Not System Application.
3345     * @throws { BusinessError } 7400103 - Session not config.
3346     * @syscap SystemCapability.Multimedia.Camera.Core
3347     * @systemapi
3348     * @since 12
3349     */
3350    getSupportedEffectSuggestionTypes(): Array<EffectSuggestionType>;
3351
3352    /**
3353     * Set the range of effect suggestion type and enable status.
3354     * The application should fully set all data when it starts up.
3355     *
3356     * @param { Array<EffectSuggestionStatus> } status - The array of the effect suggestion status.
3357     * @throws { BusinessError } 202 - Not System Application.
3358     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3359     * @throws { BusinessError } 7400103 - Session not config.
3360     * @syscap SystemCapability.Multimedia.Camera.Core
3361     * @systemapi
3362     * @since 12
3363     */
3364    setEffectSuggestionStatus(status: Array<EffectSuggestionStatus>): void;
3365
3366    /**
3367     * Update the enable status of the effect suggestion type.
3368     *
3369     * @param { EffectSuggestionType } type - The type of effect suggestion.
3370     * @param { boolean } enabled - The status of effect suggestion type.
3371     * @throws { BusinessError } 202 - Not System Application.
3372     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3373     * @throws { BusinessError } 7400103 - Session not config.
3374     * @syscap SystemCapability.Multimedia.Camera.Core
3375     * @systemapi
3376     * @since 12
3377     */
3378    updateEffectSuggestion(type: EffectSuggestionType, enabled: boolean): void;
3379  }
3380
3381  /**
3382   * Enumerates the camera color effect types.
3383   *
3384   * @enum { number }
3385   * @syscap SystemCapability.Multimedia.Camera.Core
3386   * @systemapi
3387   * @since 11
3388   */
3389  enum ColorEffectType {
3390    /**
3391     * Normal color effect type.
3392     *
3393     * @syscap SystemCapability.Multimedia.Camera.Core
3394     * @systemapi
3395     * @since 11
3396     */
3397    NORMAL = 0,
3398
3399    /**
3400     * Bright color effect type.
3401     *
3402     * @syscap SystemCapability.Multimedia.Camera.Core
3403     * @systemapi
3404     * @since 11
3405     */
3406    BRIGHT = 1,
3407
3408    /**
3409     * Soft color effect type.
3410     *
3411     * @syscap SystemCapability.Multimedia.Camera.Core
3412     * @systemapi
3413     * @since 11
3414     */
3415    SOFT = 2,
3416
3417    /**
3418     * Black white color effect type.
3419     *
3420     * @syscap SystemCapability.Multimedia.Camera.Core
3421     * @systemapi
3422     * @since 12
3423     */
3424    BLACK_WHITE = 3
3425  }
3426
3427  /**
3428   * Enum for policy type
3429   *
3430   * @enum { number }
3431   * @syscap SystemCapability.Multimedia.Camera.Core
3432   * @systemapi
3433   * @since 12
3434   */
3435  enum PolicyType {
3436    /**
3437     * PRIVACY type.
3438     *
3439     * @syscap SystemCapability.Multimedia.Camera.Core
3440     * @systemapi
3441     * @since 12
3442     */
3443    PRIVACY = 1,
3444  }
3445
3446  /**
3447   * Color Effect Query object.
3448   *
3449   * @interface ColorEffectQuery
3450   * @syscap SystemCapability.Multimedia.Camera.Core
3451   * @systemapi
3452   * @since 12
3453   */
3454  interface ColorEffectQuery {
3455    /**
3456     * Gets supported color effect types.
3457     *
3458     * @returns { Array<ColorEffectType> } List of color effect types.
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     * Gets supported color effect types.
3467     * Move to ColorEffectQuery from ColorEffect since 12.
3468     *
3469     * @returns { Array<ColorEffectType> } List of color effect types.
3470     * @throws { BusinessError } 202 - Not System Application.
3471     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3472     * @syscap SystemCapability.Multimedia.Camera.Core
3473     * @systemapi
3474     * @since 12
3475     */
3476    getSupportedColorEffects(): Array<ColorEffectType>;
3477  }
3478
3479  /**
3480   * Color effect object.
3481   *
3482   * @interface ColorEffect
3483   * @syscap SystemCapability.Multimedia.Camera.Core
3484   * @systemapi
3485   * @since 11
3486   */
3487  interface ColorEffect extends ColorEffectQuery {
3488    /**
3489     * Gets the specific color effect type.
3490     *
3491     * @returns { ColorEffectType } The array of the specific color effect type.
3492     * @throws { BusinessError } 202 - Not System Application.
3493     * @throws { BusinessError } 7400103 - Session not config.
3494     * @syscap SystemCapability.Multimedia.Camera.Core
3495     * @systemapi
3496     * @since 11
3497     */
3498    getColorEffect(): ColorEffectType;
3499
3500    /**
3501     * Sets a color effect for a camera device.
3502     *
3503     * @param { ColorEffectType } type - The type of color effect.
3504     * @throws { BusinessError } 202 - Not System Application.
3505     * @throws { BusinessError } 7400103 - Session not config.
3506     * @syscap SystemCapability.Multimedia.Camera.Core
3507     * @systemapi
3508     * @since 11
3509     */
3510    setColorEffect(type: ColorEffectType): void;
3511  }
3512
3513  /**
3514   * Color Management Query object.
3515   *
3516   * @interface ColorManagementQuery
3517   * @syscap SystemCapability.Multimedia.Camera.Core
3518   * @since 12
3519   */
3520  interface ColorManagementQuery {
3521    /**
3522     * Gets the supported color space types.
3523     *
3524     * @returns { Array<colorSpaceManager.ColorSpace> } The array of the supported color space for the session.
3525     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3526     * @syscap SystemCapability.Multimedia.Camera.Core
3527     * @since 12
3528     */
3529    getSupportedColorSpaces(): Array<colorSpaceManager.ColorSpace>;
3530  }
3531
3532  /**
3533   * Color Management object.
3534   *
3535   * @interface ColorManagement
3536   * @syscap SystemCapability.Multimedia.Camera.Core
3537   * @since 12
3538   */
3539  interface ColorManagement extends ColorManagementQuery {
3540    /**
3541     * Gets the specific color space type.
3542     *
3543     * @returns { colorSpaceManager.ColorSpace } Current color space.
3544     * @throws { BusinessError } 7400103 - Session not config.
3545     * @syscap SystemCapability.Multimedia.Camera.Core
3546     * @since 12
3547     */
3548    getActiveColorSpace(): colorSpaceManager.ColorSpace;
3549
3550    /**
3551     * Sets a color space for the session.
3552     *
3553     * @param { colorSpaceManager.ColorSpace } colorSpace - The type of color space.
3554     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3555     * @throws { BusinessError } 7400102 - The colorSpace does not match the format.
3556     * @throws { BusinessError } 7400103 - Session not config.
3557     * @throws { BusinessError } 7400201 - Camera service fatal error.
3558     * @syscap SystemCapability.Multimedia.Camera.Core
3559     * @since 12
3560     */
3561    setColorSpace(colorSpace: colorSpaceManager.ColorSpace): void;
3562  }
3563
3564  /**
3565   * Auto Device Switch Query object.
3566   *
3567   * @interface AutoDeviceSwitchQuery
3568   * @syscap SystemCapability.Multimedia.Camera.Core
3569   * @since 13
3570   */
3571  interface AutoDeviceSwitchQuery {
3572    /**
3573     * Check whether auto device switch is supported.
3574     *
3575     * @returns { boolean } Is auto device switch supported.
3576     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
3577     * @syscap SystemCapability.Multimedia.Camera.Core
3578     * @since 13
3579     */
3580    isAutoDeviceSwitchSupported(): boolean;
3581  }
3582
3583  /**
3584   * Auto Device Switch object.
3585   *
3586   * @interface AutoDeviceSwitch
3587   * @extends AutoDeviceSwitchQuery
3588   * @syscap SystemCapability.Multimedia.Camera.Core
3589   * @since 13
3590   */
3591  interface AutoDeviceSwitch extends AutoDeviceSwitchQuery {
3592    /**
3593     * Enable auto device switch for session.
3594     *
3595     * @param { boolean } enabled - enable auto device switch if TRUE.
3596     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3597     * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types;
3598     * 3. Parameters verification failed.
3599     * @throws { BusinessError } 7400102 - Operation not allowed.
3600     * @throws { BusinessError } 7400103 - Session not config.
3601     * @throws { BusinessError } 7400201 - Camera service fatal error.
3602     * @syscap SystemCapability.Multimedia.Camera.Core
3603     * @since 13
3604     */
3605    enableAutoDeviceSwitch(enabled: boolean): void;
3606  }
3607
3608  /**
3609   * Auto Device Switch Status.
3610   *
3611   * @typedef AutoDeviceSwitchStatus
3612   * @syscap SystemCapability.Multimedia.Camera.Core
3613   * @since 13
3614   */
3615  interface AutoDeviceSwitchStatus {
3616    /**
3617     * Notify whether device is switched.
3618     *
3619     * @type { boolean }
3620     * @readonly
3621     * @syscap SystemCapability.Multimedia.Camera.Core
3622     * @since 13
3623     */
3624    readonly isDeviceSwitched: boolean;
3625
3626    /**
3627     * Notify whether device capability is changed.
3628     *
3629     * @type { boolean }
3630     * @readonly
3631     * @syscap SystemCapability.Multimedia.Camera.Core
3632     * @since 13
3633     */
3634    readonly isDeviceCapabilityChanged: boolean;
3635  }
3636
3637  /**
3638   * Macro Query object.
3639   *
3640   * @interface MacroQuery
3641   * @syscap SystemCapability.Multimedia.Camera.Core
3642   * @systemapi
3643   * @since 12
3644   */
3645  interface MacroQuery {
3646    /**
3647     * Determine whether camera macro is supported.
3648     *
3649     * @returns { boolean } Is camera macro supported.
3650     * @throws { BusinessError } 202 - Not System Application.
3651     * @syscap SystemCapability.Multimedia.Camera.Core
3652     * @systemapi
3653     * @since 11
3654     */
3655    /**
3656     * Determine whether camera macro is supported.
3657     * Move to MacroQuery interface from Macro since 12.
3658     *
3659     * @returns { boolean } Is camera macro supported.
3660     * @throws { BusinessError } 202 - Not System Application.
3661     * @syscap SystemCapability.Multimedia.Camera.Core
3662     * @systemapi
3663     * @since 12
3664     */
3665    isMacroSupported(): boolean;
3666  }
3667
3668  /**
3669   * Macro object.
3670   *
3671   * @interface Macro
3672   * @syscap SystemCapability.Multimedia.Camera.Core
3673   * @systemapi
3674   * @since 11
3675   */
3676  interface Macro extends MacroQuery {
3677    /**
3678     * Enable macro for camera.
3679     *
3680     * @param { boolean } enabled - enable macro for camera if TRUE.
3681     * @throws { BusinessError } 202 - Not System Application.
3682     * @throws { BusinessError } 7400103 - Session not config.
3683     * @syscap SystemCapability.Multimedia.Camera.Core
3684     * @systemapi
3685     * @since 11
3686     */
3687    /**
3688     * Enable macro for camera.
3689     *
3690     * @param { boolean } enabled - enable macro for camera if TRUE.
3691     * @throws { BusinessError } 202 - Not System Application.
3692     * @throws { BusinessError } 7400102 - Operation not allowed.
3693     * @throws { BusinessError } 7400103 - Session not config.
3694     * @syscap SystemCapability.Multimedia.Camera.Core
3695     * @systemapi
3696     * @since 12
3697     */
3698    enableMacro(enabled: boolean): void;
3699  }
3700
3701  /**
3702   * Enum for usage type used in capture session.
3703   *
3704   * @enum { number }
3705   * @syscap SystemCapability.Multimedia.Camera.Core
3706   * @systemapi
3707   * @since 13
3708   */
3709  enum UsageType {
3710    /**
3711     * Bokeh usage type.
3712     *
3713     * @syscap SystemCapability.Multimedia.Camera.Core
3714     * @systemapi
3715     * @since 13
3716     */
3717    BOKEH = 0
3718  }
3719
3720  /**
3721   * Session object.
3722   *
3723   * @interface Session
3724   * @syscap SystemCapability.Multimedia.Camera.Core
3725   * @since 11
3726   */
3727  interface Session {
3728    /**
3729     * Begin capture session config.
3730     *
3731     * @throws { BusinessError } 7400105 - Session config locked.
3732     * @syscap SystemCapability.Multimedia.Camera.Core
3733     * @since 11
3734     */
3735    /**
3736     * Begin capture session config.
3737     *
3738     * @throws { BusinessError } 7400105 - Session config locked.
3739     * @throws { BusinessError } 7400201 - Camera service fatal error.
3740     * @syscap SystemCapability.Multimedia.Camera.Core
3741     * @since 12
3742     */
3743    beginConfig(): void;
3744
3745    /**
3746     * Commit capture session config.
3747     *
3748     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3749     * @throws { BusinessError } 7400102 - Operation not allowed.
3750     * @throws { BusinessError } 7400201 - Camera service fatal error.
3751     * @syscap SystemCapability.Multimedia.Camera.Core
3752     * @since 11
3753     */
3754    commitConfig(callback: AsyncCallback<void>): void;
3755
3756    /**
3757     * Commit capture session config.
3758     *
3759     * @returns { Promise<void> } Promise used to return the result.
3760     * @throws { BusinessError } 7400102 - Operation not allowed.
3761     * @throws { BusinessError } 7400201 - Camera service fatal error.
3762     * @syscap SystemCapability.Multimedia.Camera.Core
3763     * @since 11
3764     */
3765    commitConfig(): Promise<void>;
3766
3767    /**
3768     * Determines whether the camera input can be added into the session.
3769     * This method is valid between Session.beginConfig() and Session.commitConfig().
3770     *
3771     * @param { CameraInput } cameraInput - Target camera input to add.
3772     * @returns { boolean } You can add the input into the session.
3773     * @syscap SystemCapability.Multimedia.Camera.Core
3774     * @since 11
3775     */
3776    canAddInput(cameraInput: CameraInput): boolean;
3777
3778    /**
3779     * Adds a camera input.
3780     * This method is valid between Session.beginConfig() and Session.commitConfig().
3781     *
3782     * @param { CameraInput } cameraInput - Target camera input to add.
3783     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3784     * @throws { BusinessError } 7400102 - Operation not allowed.
3785     * @throws { BusinessError } 7400103 - Session not config.
3786     * @syscap SystemCapability.Multimedia.Camera.Core
3787     * @since 11
3788     */
3789    /**
3790     * Adds a camera input.
3791     * This method is valid between Session.beginConfig() and Session.commitConfig().
3792     *
3793     * @param { CameraInput } cameraInput - Target camera input to add.
3794     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3795     * @throws { BusinessError } 7400102 - Operation not allowed.
3796     * @throws { BusinessError } 7400103 - Session not config.
3797     * @throws { BusinessError } 7400201 - Camera service fatal error.
3798     * @syscap SystemCapability.Multimedia.Camera.Core
3799     * @since 12
3800     */
3801    addInput(cameraInput: CameraInput): void;
3802
3803    /**
3804     * Removes a camera input.
3805     * This method is valid between Session.beginConfig() and Session.commitConfig().
3806     *
3807     * @param { CameraInput } cameraInput - Target camera input to remove.
3808     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3809     * @throws { BusinessError } 7400102 - Operation not allowed.
3810     * @throws { BusinessError } 7400103 - Session not config.
3811     * @syscap SystemCapability.Multimedia.Camera.Core
3812     * @since 11
3813     */
3814    /**
3815     * Removes a camera input.
3816     * This method is valid between Session.beginConfig() and Session.commitConfig().
3817     *
3818     * @param { CameraInput } cameraInput - Target camera input to remove.
3819     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3820     * @throws { BusinessError } 7400102 - Operation not allowed.
3821     * @throws { BusinessError } 7400103 - Session not config.
3822     * @throws { BusinessError } 7400201 - Camera service fatal error.
3823     * @syscap SystemCapability.Multimedia.Camera.Core
3824     * @since 12
3825     */
3826    removeInput(cameraInput: CameraInput): void;
3827
3828    /**
3829     * Determines whether the camera output can be added into the session.
3830     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3831     *
3832     * @param { CameraOutput } cameraOutput - Target camera output to add.
3833     * @returns { boolean } You can add the output into the session.
3834     * @syscap SystemCapability.Multimedia.Camera.Core
3835     * @since 11
3836     */
3837    canAddOutput(cameraOutput: CameraOutput): boolean;
3838
3839    /**
3840     * Adds a camera output.
3841     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3842     *
3843     * @param { CameraOutput } cameraOutput - Target camera output to add.
3844     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3845     * @throws { BusinessError } 7400102 - Operation not allowed.
3846     * @throws { BusinessError } 7400103 - Session not config.
3847     * @syscap SystemCapability.Multimedia.Camera.Core
3848     * @since 11
3849     */
3850    /**
3851     * Adds a camera output.
3852     * This method is valid after Session.addInput(cameraInput) and before Session.commitConfig().
3853     *
3854     * @param { CameraOutput } cameraOutput - Target camera output to add.
3855     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3856     * @throws { BusinessError } 7400102 - Operation not allowed.
3857     * @throws { BusinessError } 7400103 - Session not config.
3858     * @throws { BusinessError } 7400201 - Camera service fatal error.
3859     * @syscap SystemCapability.Multimedia.Camera.Core
3860     * @since 12
3861     */
3862    addOutput(cameraOutput: CameraOutput): void;
3863
3864    /**
3865     * Removes a camera output.
3866     * This method is valid between Session.beginConfig() and Session.commitConfig().
3867     *
3868     * @param { CameraOutput } cameraOutput - Target camera output to remove.
3869     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3870     * @throws { BusinessError } 7400102 - Operation not allowed.
3871     * @throws { BusinessError } 7400103 - Session not config.
3872     * @syscap SystemCapability.Multimedia.Camera.Core
3873     * @since 11
3874     */
3875    /**
3876     * Removes a camera output.
3877     * This method is valid between Session.beginConfig() and Session.commitConfig().
3878     *
3879     * @param { CameraOutput } cameraOutput - Target camera output to remove.
3880     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3881     * @throws { BusinessError } 7400102 - Operation not allowed.
3882     * @throws { BusinessError } 7400103 - Session not config.
3883     * @throws { BusinessError } 7400201 - Camera service fatal error.
3884     * @syscap SystemCapability.Multimedia.Camera.Core
3885     * @since 12
3886     */
3887    removeOutput(cameraOutput: CameraOutput): void;
3888
3889    /**
3890     * Starts capture session.
3891     *
3892     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3893     * @throws { BusinessError } 7400103 - Session not config.
3894     * @throws { BusinessError } 7400201 - Camera service fatal error.
3895     * @syscap SystemCapability.Multimedia.Camera.Core
3896     * @since 11
3897     */
3898    /**
3899     * Starts capture session.
3900     *
3901     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3902     * @throws { BusinessError } 7400102 - Operation not allowed.
3903     * @throws { BusinessError } 7400103 - Session not config.
3904     * @throws { BusinessError } 7400201 - Camera service fatal error.
3905     * @syscap SystemCapability.Multimedia.Camera.Core
3906     * @since 12
3907     */
3908    start(callback: AsyncCallback<void>): void;
3909
3910    /**
3911     * Starts capture session.
3912     *
3913     * @returns { Promise<void> } Promise used to return the result.
3914     * @throws { BusinessError } 7400103 - Session not config.
3915     * @throws { BusinessError } 7400201 - Camera service fatal error.
3916     * @syscap SystemCapability.Multimedia.Camera.Core
3917     * @since 11
3918     */
3919    /**
3920     * Starts capture session.
3921     *
3922     * @returns { Promise<void> } Promise used to return the result.
3923     * @throws { BusinessError } 7400102 - Operation not allowed.
3924     * @throws { BusinessError } 7400103 - Session not config.
3925     * @throws { BusinessError } 7400201 - Camera service fatal error.
3926     * @syscap SystemCapability.Multimedia.Camera.Core
3927     * @since 12
3928     */
3929    start(): Promise<void>;
3930
3931    /**
3932     * Stops capture session.
3933     *
3934     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3935     * @throws { BusinessError } 7400201 - Camera service fatal error.
3936     * @syscap SystemCapability.Multimedia.Camera.Core
3937     * @since 11
3938     */
3939    stop(callback: AsyncCallback<void>): void;
3940
3941    /**
3942     * Stops capture session.
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 11
3948     */
3949    stop(): Promise<void>;
3950
3951    /**
3952     * Release capture session instance.
3953     *
3954     * @param { AsyncCallback<void> } callback - Callback used to return the result.
3955     * @throws { BusinessError } 7400201 - Camera service fatal error.
3956     * @syscap SystemCapability.Multimedia.Camera.Core
3957     * @since 11
3958     */
3959    release(callback: AsyncCallback<void>): void;
3960
3961    /**
3962     * Release capture session instance.
3963     *
3964     * @returns { Promise<void> } Promise used to return the result.
3965     * @throws { BusinessError } 7400201 - Camera service fatal error.
3966     * @syscap SystemCapability.Multimedia.Camera.Core
3967     * @since 11
3968     */
3969    release(): Promise<void>;
3970
3971    /**
3972     * Set usage for the capture session.
3973     *
3974     * @param { UsageType } usage - The capture session usage.
3975     * @param { boolean } enabled - Enable usage for session if TRUE.
3976     * @throws { BusinessError } 202 - Not System Application.
3977     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3978     * @throws { BusinessError } 7400102 - Operation not allowed.
3979     * @throws { BusinessError } 7400103 - Session not config.
3980     * @throws { BusinessError } 7400201 - Camera service fatal error.
3981     * @syscap SystemCapability.Multimedia.Camera.Core
3982     * @systemapi
3983     * @since 13
3984     */
3985    setUsage(usage: UsageType, enabled: boolean): void;
3986
3987    /**
3988     * Get the supported camera output capability set.
3989     *
3990     * @param { CameraDevice } camera - Camera device.
3991     * @returns { Array<CameraOutputCapability> } The array of the output capability.
3992     * @throws { BusinessError } 202 - Not System Application.
3993     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
3994     * @throws { BusinessError } 7400201 - Camera service fatal error.
3995     * @syscap SystemCapability.Multimedia.Camera.Core
3996     * @systemapi
3997     * @since 13
3998     */
3999    getCameraOutputCapabilities(camera: CameraDevice): Array<CameraOutputCapability>;
4000  }
4001
4002  /**
4003   * Capture session object.
4004   *
4005   * @interface CaptureSession
4006   * @syscap SystemCapability.Multimedia.Camera.Core
4007   * @since 10
4008   * @deprecated since 11
4009   * @useinstead ohos.multimedia.camera.VideoSession
4010   */
4011  interface CaptureSession {
4012    /**
4013     * Begin capture session config.
4014     *
4015     * @throws { BusinessError } 7400105 - Session config locked.
4016     * @syscap SystemCapability.Multimedia.Camera.Core
4017     * @since 10
4018     * @deprecated since 11
4019     * @useinstead ohos.multimedia.camera.Session#beginConfig
4020     */
4021    beginConfig(): void;
4022
4023    /**
4024     * Commit capture session config.
4025     *
4026     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4027     * @throws { BusinessError } 7400102 - Operation not allowed.
4028     * @throws { BusinessError } 7400201 - Camera service fatal error.
4029     * @syscap SystemCapability.Multimedia.Camera.Core
4030     * @since 10
4031     * @deprecated since 11
4032     * @useinstead ohos.multimedia.camera.Session#commitConfig
4033     */
4034    commitConfig(callback: AsyncCallback<void>): void;
4035
4036    /**
4037     * Commit capture session config.
4038     *
4039     * @returns { Promise<void> } Promise used to return the result.
4040     * @throws { BusinessError } 7400102 - Operation not allowed.
4041     * @throws { BusinessError } 7400201 - Camera service fatal error.
4042     * @syscap SystemCapability.Multimedia.Camera.Core
4043     * @since 10
4044     * @deprecated since 11
4045     * @useinstead ohos.multimedia.camera.Session#commitConfig
4046     */
4047    commitConfig(): Promise<void>;
4048
4049    /**
4050     * Adds a camera input.
4051     *
4052     * @param { CameraInput } cameraInput - Target camera input to add.
4053     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4054     * @throws { BusinessError } 7400102 - Operation not allowed.
4055     * @syscap SystemCapability.Multimedia.Camera.Core
4056     * @since 10
4057     * @deprecated since 11
4058     * @useinstead ohos.multimedia.camera.Session#addInput
4059     */
4060    addInput(cameraInput: CameraInput): void;
4061
4062    /**
4063     * Removes a camera input.
4064     *
4065     * @param { CameraInput } cameraInput - Target camera input to remove.
4066     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4067     * @throws { BusinessError } 7400102 - Operation not allowed.
4068     * @syscap SystemCapability.Multimedia.Camera.Core
4069     * @since 10
4070     * @deprecated since 11
4071     * @useinstead ohos.multimedia.camera.Session#removeInput
4072     */
4073    removeInput(cameraInput: CameraInput): void;
4074
4075    /**
4076     * Adds a camera output.
4077     *
4078     * @param { CameraOutput } cameraOutput - Target camera output to add.
4079     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4080     * @throws { BusinessError } 7400102 - Operation not allowed.
4081     * @syscap SystemCapability.Multimedia.Camera.Core
4082     * @since 10
4083     * @deprecated since 11
4084     * @useinstead ohos.multimedia.camera.Session#addOutput
4085     */
4086    addOutput(cameraOutput: CameraOutput): void;
4087
4088    /**
4089     * Removes a camera output.
4090     *
4091     * @param { CameraOutput } cameraOutput - Target camera output to remove.
4092     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4093     * @throws { BusinessError } 7400102 - Operation not allowed.
4094     * @syscap SystemCapability.Multimedia.Camera.Core
4095     * @since 10
4096     * @deprecated since 11
4097     * @useinstead ohos.multimedia.camera.Session#removeOutput
4098     */
4099    removeOutput(cameraOutput: CameraOutput): void;
4100
4101    /**
4102     * Starts capture session.
4103     *
4104     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4105     * @throws { BusinessError } 7400103 - Session not config.
4106     * @throws { BusinessError } 7400201 - Camera service fatal error.
4107     * @syscap SystemCapability.Multimedia.Camera.Core
4108     * @since 10
4109     * @deprecated since 11
4110     * @useinstead ohos.multimedia.camera.Session#start
4111     */
4112    start(callback: AsyncCallback<void>): void;
4113
4114    /**
4115     * Starts capture session.
4116     *
4117     * @returns { Promise<void> } Promise used to return the result.
4118     * @throws { BusinessError } 7400103 - Session not config.
4119     * @throws { BusinessError } 7400201 - Camera service fatal error.
4120     * @syscap SystemCapability.Multimedia.Camera.Core
4121     * @since 10
4122     * @deprecated since 11
4123     * @useinstead ohos.multimedia.camera.Session#start
4124     */
4125    start(): Promise<void>;
4126
4127    /**
4128     * Stops capture session.
4129     *
4130     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4131     * @throws { BusinessError } 7400201 - Camera service fatal error.
4132     * @syscap SystemCapability.Multimedia.Camera.Core
4133     * @since 10
4134     * @deprecated since 11
4135     * @useinstead ohos.multimedia.camera.Session#stop
4136     */
4137    stop(callback: AsyncCallback<void>): void;
4138
4139    /**
4140     * Stops capture session.
4141     *
4142     * @returns { Promise<void> } Promise used to return the result.
4143     * @throws { BusinessError } 7400201 - Camera service fatal error.
4144     * @syscap SystemCapability.Multimedia.Camera.Core
4145     * @since 10
4146     * @deprecated since 11
4147     * @useinstead ohos.multimedia.camera.Session#stop
4148     */
4149    stop(): Promise<void>;
4150
4151    /**
4152     * Release capture session instance.
4153     *
4154     * @param { AsyncCallback<void> } callback - Callback used to return the result.
4155     * @throws { BusinessError } 7400201 - Camera service fatal error.
4156     * @syscap SystemCapability.Multimedia.Camera.Core
4157     * @since 10
4158     * @deprecated since 11
4159     * @useinstead ohos.multimedia.camera.Session#release
4160     */
4161    release(callback: AsyncCallback<void>): void;
4162
4163    /**
4164     * Release capture session instance.
4165     *
4166     * @returns { Promise<void> } Promise used to return the result.
4167     * @throws { BusinessError } 7400201 - Camera service fatal error.
4168     * @syscap SystemCapability.Multimedia.Camera.Core
4169     * @since 10
4170     * @deprecated since 11
4171     * @useinstead ohos.multimedia.camera.Session#release
4172     */
4173    release(): Promise<void>;
4174
4175    /**
4176     * Check if device has flash light.
4177     *
4178     * @returns { boolean } The flash light support status.
4179     * @throws { BusinessError } 7400103 - Session not config.
4180     * @syscap SystemCapability.Multimedia.Camera.Core
4181     * @since 10
4182     * @deprecated since 11
4183     * @useinstead ohos.multimedia.camera.Flash#hasFlash
4184     */
4185    hasFlash(): boolean;
4186
4187    /**
4188     * Checks whether a specified flash mode is supported.
4189     *
4190     * @param { FlashMode } flashMode - Flash mode
4191     * @returns { boolean } Is the flash mode supported.
4192     * @throws { BusinessError } 7400103 - Session not config.
4193     * @syscap SystemCapability.Multimedia.Camera.Core
4194     * @since 10
4195     * @deprecated since 11
4196     * @useinstead ohos.multimedia.camera.Flash#isFlashModeSupported
4197     */
4198    isFlashModeSupported(flashMode: FlashMode): boolean;
4199
4200    /**
4201     * Gets current flash mode.
4202     *
4203     * @returns { FlashMode } The current flash mode.
4204     * @throws { BusinessError } 7400103 - Session not config.
4205     * @syscap SystemCapability.Multimedia.Camera.Core
4206     * @since 10
4207     * @deprecated since 11
4208     * @useinstead ohos.multimedia.camera.Flash#getFlashMode
4209     */
4210    getFlashMode(): FlashMode;
4211
4212    /**
4213     * Sets flash mode.
4214     *
4215     * @param { FlashMode } flashMode - Target flash mode.
4216     * @throws { BusinessError } 7400103 - Session not config.
4217     * @syscap SystemCapability.Multimedia.Camera.Core
4218     * @since 10
4219     * @deprecated since 11
4220     * @useinstead ohos.multimedia.camera.Flash#setFlashMode
4221     */
4222    setFlashMode(flashMode: FlashMode): void;
4223
4224    /**
4225     * Checks whether a specified exposure mode is supported.
4226     *
4227     * @param { ExposureMode } aeMode - Exposure mode
4228     * @returns { boolean } Is the exposure mode supported.
4229     * @throws { BusinessError } 7400103 - Session not config.
4230     * @syscap SystemCapability.Multimedia.Camera.Core
4231     * @since 10
4232     * @deprecated since 11
4233     * @useinstead ohos.multimedia.camera.AutoExposure#isExposureModeSupported
4234     */
4235    isExposureModeSupported(aeMode: ExposureMode): boolean;
4236
4237    /**
4238     * Gets current exposure mode.
4239     *
4240     * @returns { ExposureMode } The current exposure mode.
4241     * @throws { BusinessError } 7400103 - Session not config.
4242     * @syscap SystemCapability.Multimedia.Camera.Core
4243     * @since 10
4244     * @deprecated since 11
4245     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureMode
4246     */
4247    getExposureMode(): ExposureMode;
4248
4249    /**
4250     * Sets Exposure mode.
4251     *
4252     * @param { ExposureMode } aeMode - Exposure mode
4253     * @throws { BusinessError } 7400103 - Session not config.
4254     * @syscap SystemCapability.Multimedia.Camera.Core
4255     * @since 10
4256     * @deprecated since 11
4257     * @useinstead ohos.multimedia.camera.AutoExposure#setExposureMode
4258     */
4259    setExposureMode(aeMode: ExposureMode): void;
4260
4261    /**
4262     * Gets current metering point.
4263     *
4264     * @returns { Point } The current metering point.
4265     * @throws { BusinessError } 7400103 - Session not config.
4266     * @syscap SystemCapability.Multimedia.Camera.Core
4267     * @since 10
4268     * @deprecated since 11
4269     * @useinstead ohos.multimedia.camera.AutoExposure#getMeteringPoint
4270     */
4271    getMeteringPoint(): Point;
4272
4273    /**
4274     * Set the center point of the metering area.
4275     *
4276     * @param { Point } point - metering point
4277     * @throws { BusinessError } 7400103 - Session not config.
4278     * @syscap SystemCapability.Multimedia.Camera.Core
4279     * @since 10
4280     * @deprecated since 11
4281     * @useinstead ohos.multimedia.camera.AutoExposure#setMeteringPoint
4282     */
4283    setMeteringPoint(point: Point): void;
4284
4285    /**
4286     * Query the exposure compensation range.
4287     *
4288     * @returns { Array<number> } The array of compensation range.
4289     * @throws { BusinessError } 7400103 - Session not config.
4290     * @syscap SystemCapability.Multimedia.Camera.Core
4291     * @since 10
4292     * @deprecated since 11
4293     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureBiasRange
4294     */
4295    getExposureBiasRange(): Array<number>;
4296
4297    /**
4298     * Set exposure compensation.
4299     *
4300     * @param { number } exposureBias - Exposure compensation
4301     * @throws { BusinessError } 7400103 - Session not config.
4302     * @syscap SystemCapability.Multimedia.Camera.Core
4303     * @since 10
4304     * @deprecated since 11
4305     * @useinstead ohos.multimedia.camera.AutoExposure#setExposureBias
4306     */
4307    setExposureBias(exposureBias: number): void;
4308
4309    /**
4310     * Query the exposure value.
4311     *
4312     * @returns { number } The exposure value.
4313     * @throws { BusinessError } 7400103 - Session not config.
4314     * @syscap SystemCapability.Multimedia.Camera.Core
4315     * @since 10
4316     * @deprecated since 11
4317     * @useinstead ohos.multimedia.camera.AutoExposure#getExposureValue
4318     */
4319    getExposureValue(): number;
4320
4321    /**
4322     * Checks whether a specified focus mode is supported.
4323     *
4324     * @param { FocusMode } afMode - Focus mode.
4325     * @returns { boolean } Is the focus mode supported.
4326     * @throws { BusinessError } 7400103 - Session not config.
4327     * @syscap SystemCapability.Multimedia.Camera.Core
4328     * @since 10
4329     * @deprecated since 11
4330     * @useinstead ohos.multimedia.camera.Focus#isFocusModeSupported
4331     */
4332    isFocusModeSupported(afMode: FocusMode): boolean;
4333
4334    /**
4335     * Gets current focus mode.
4336     *
4337     * @returns { FocusMode } The current focus mode.
4338     * @throws { BusinessError } 7400103 - Session not config.
4339     * @syscap SystemCapability.Multimedia.Camera.Core
4340     * @since 10
4341     * @deprecated since 11
4342     * @useinstead ohos.multimedia.camera.Focus#getFocusMode
4343     */
4344    getFocusMode(): FocusMode;
4345
4346    /**
4347     * Sets focus mode.
4348     *
4349     * @param { FocusMode } afMode - Target focus mode.
4350     * @throws { BusinessError } 7400103 - Session not config.
4351     * @syscap SystemCapability.Multimedia.Camera.Core
4352     * @since 10
4353     * @deprecated since 11
4354     * @useinstead ohos.multimedia.camera.Focus#setFocusMode
4355     */
4356    setFocusMode(afMode: FocusMode): void;
4357
4358    /**
4359     * Sets focus point.
4360     *
4361     * @param { Point } point - Target focus point.
4362     * @throws { BusinessError } 7400103 - Session not config.
4363     * @syscap SystemCapability.Multimedia.Camera.Core
4364     * @since 10
4365     * @deprecated since 11
4366     * @useinstead ohos.multimedia.camera.Focus#setFocusPoint
4367     */
4368    setFocusPoint(point: Point): void;
4369
4370    /**
4371     * Gets current focus point.
4372     *
4373     * @returns { Point } The current focus point.
4374     * @throws { BusinessError } 7400103 - Session not config.
4375     * @syscap SystemCapability.Multimedia.Camera.Core
4376     * @since 10
4377     * @deprecated since 11
4378     * @useinstead ohos.multimedia.camera.Focus#getFocusPoint
4379     */
4380    getFocusPoint(): Point;
4381
4382    /**
4383     * Gets current focal length.
4384     *
4385     * @returns { number } The current focal point.
4386     * @throws { BusinessError } 7400103 - Session not config.
4387     * @syscap SystemCapability.Multimedia.Camera.Core
4388     * @since 10
4389     * @deprecated since 11
4390     * @useinstead ohos.multimedia.camera.Focus#getFocalLength
4391     */
4392    getFocalLength(): number;
4393
4394    /**
4395     * Gets all supported zoom ratio range.
4396     *
4397     * @returns { Array<number> } The zoom ratio range.
4398     * @throws { BusinessError } 7400103 - Session not config.
4399     * @syscap SystemCapability.Multimedia.Camera.Core
4400     * @since 10
4401     * @deprecated since 11
4402     * @useinstead ohos.multimedia.camera.Zoom#getZoomRatioRange
4403     */
4404    getZoomRatioRange(): Array<number>;
4405
4406    /**
4407     * Gets zoom ratio.
4408     *
4409     * @returns { number } The zoom ratio value.
4410     * @throws { BusinessError } 7400103 - Session not config.
4411     * @syscap SystemCapability.Multimedia.Camera.Core
4412     * @since 10
4413     * @deprecated since 11
4414     * @useinstead ohos.multimedia.camera.Zoom#getZoomRatio
4415     */
4416    getZoomRatio(): number;
4417
4418    /**
4419     * Sets zoom ratio.
4420     *
4421     * @param { number } zoomRatio - Target zoom ratio.
4422     * @throws { BusinessError } 7400103 - Session not config.
4423     * @syscap SystemCapability.Multimedia.Camera.Core
4424     * @since 10
4425     * @deprecated since 11
4426     * @useinstead ohos.multimedia.camera.Zoom#setZoomRatio
4427     */
4428    setZoomRatio(zoomRatio: number): void;
4429
4430    /**
4431     * Check whether the specified video stabilization mode is supported.
4432     *
4433     * @param { VideoStabilizationMode } vsMode - Video Stabilization mode.
4434     * @returns { boolean } Is flash mode supported.
4435     * @throws { BusinessError } 7400103 - Session not config.
4436     * @syscap SystemCapability.Multimedia.Camera.Core
4437     * @since 10
4438     * @deprecated since 11
4439     * @useinstead ohos.multimedia.camera.Stabilization#isVideoStabilizationModeSupported
4440     */
4441    isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
4442
4443    /**
4444     * Query the video stabilization mode currently in use.
4445     *
4446     * @returns { VideoStabilizationMode } The current video stabilization mode.
4447     * @throws { BusinessError } 7400103 - Session not config.
4448     * @syscap SystemCapability.Multimedia.Camera.Core
4449     * @since 10
4450     * @deprecated since 11
4451     * @useinstead ohos.multimedia.camera.Stabilization#getActiveVideoStabilizationMode
4452     */
4453    getActiveVideoStabilizationMode(): VideoStabilizationMode;
4454
4455    /**
4456     * Set video stabilization mode.
4457     *
4458     * @param { VideoStabilizationMode } mode - video stabilization mode to set.
4459     * @throws { BusinessError } 7400103 - Session not config.
4460     * @syscap SystemCapability.Multimedia.Camera.Core
4461     * @since 10
4462     * @deprecated since 11
4463     * @useinstead ohos.multimedia.camera.Stabilization#setVideoStabilizationMode
4464     */
4465    setVideoStabilizationMode(mode: VideoStabilizationMode): void;
4466
4467    /**
4468     * Subscribes focus status change event callback.
4469     *
4470     * @param { 'focusStateChange' } type - Event type.
4471     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4472     * @syscap SystemCapability.Multimedia.Camera.Core
4473     * @since 10
4474     * @deprecated since 11
4475     * @useinstead ohos.multimedia.camera.VideoSession#on
4476     */
4477    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4478
4479    /**
4480     * Unsubscribes from focus status change event callback.
4481     *
4482     * @param { 'focusStateChange' } type - Event type.
4483     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4484     * @syscap SystemCapability.Multimedia.Camera.Core
4485     * @since 10
4486     * @deprecated since 11
4487     * @useinstead ohos.multimedia.camera.VideoSession#off
4488     */
4489    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4490
4491    /**
4492     * Subscribes to error events.
4493     *
4494     * @param { 'error' } type - Event type.
4495     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4496     * @syscap SystemCapability.Multimedia.Camera.Core
4497     * @since 10
4498     * @deprecated since 11
4499     * @useinstead ohos.multimedia.camera.VideoSession#on
4500     */
4501    on(type: 'error', callback: ErrorCallback): void;
4502
4503    /**
4504     * Unsubscribes from error events.
4505     *
4506     * @param { 'error' } type - Event type.
4507     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4508     * @syscap SystemCapability.Multimedia.Camera.Core
4509     * @since 10
4510     * @deprecated since 11
4511     * @useinstead ohos.multimedia.camera.VideoSession#off
4512     */
4513    off(type: 'error', callback?: ErrorCallback): void;
4514
4515    /**
4516     * Gets supported beauty effect types.
4517     *
4518     * @returns { Array<BeautyType> } List of beauty effect types.
4519     * @throws { BusinessError } 7400103 - Session not config.
4520     * @syscap SystemCapability.Multimedia.Camera.Core
4521     * @systemapi
4522     * @since 10
4523     * @deprecated since 11
4524     * @useinstead ohos.multimedia.camera.Beauty#getSupportedBeautyTypes
4525     */
4526    getSupportedBeautyTypes(): Array<BeautyType>;
4527
4528    /**
4529     * Gets the specific beauty effect type range.
4530     *
4531     * @param { BeautyType } type - The type of beauty effect.
4532     * @returns { Array<number> } The array of the specific beauty effect range.
4533     * @throws { BusinessError } 7400103 - Session not config.
4534     * @syscap SystemCapability.Multimedia.Camera.Core
4535     * @systemapi
4536     * @since 10
4537     * @deprecated since 11
4538     * @useinstead ohos.multimedia.camera.Beauty#getSupportedBeautyRange
4539     */
4540    getSupportedBeautyRange(type: BeautyType): Array<number>;
4541
4542    /**
4543     * Gets the beauty effect in use.
4544     *
4545     * @param { BeautyType } type - The type of beauty effect.
4546     * @returns { number } the beauty effect in use.
4547     * @throws { BusinessError } 7400103 - Session not config.
4548     * @syscap SystemCapability.Multimedia.Camera.Core
4549     * @systemapi
4550     * @since 10
4551     * @deprecated since 11
4552     * @useinstead ohos.multimedia.camera.Beauty#getBeauty
4553     */
4554    getBeauty(type: BeautyType): number;
4555
4556    /**
4557     * Sets a beauty effect for a camera device.
4558     *
4559     * @param { BeautyType } type - The type of beauty effect.
4560     * @param { number } value The number of beauty effect.
4561     * @throws { BusinessError } 7400103 - Session not config.
4562     * @syscap SystemCapability.Multimedia.Camera.Core
4563     * @systemapi
4564     * @since 10
4565     * @deprecated since 11
4566     * @useinstead ohos.multimedia.camera.Beauty#setBeauty
4567     */
4568    setBeauty(type: BeautyType, value: number): void;
4569  }
4570
4571  /**
4572   * Types of preconfig, which used to configure session conveniently.
4573   * Preconfig type contains common use cases of camera output.
4574   *
4575   * @enum { number }
4576   * @syscap SystemCapability.Multimedia.Camera.Core
4577   * @since 12
4578   */
4579  enum PreconfigType {
4580    /**
4581     * 720P output for preconfig.
4582     *
4583     * @syscap SystemCapability.Multimedia.Camera.Core
4584     * @since 12
4585     */
4586    PRECONFIG_720P = 0,
4587
4588    /**
4589     * 1080P output for preconfig.
4590     *
4591     * @syscap SystemCapability.Multimedia.Camera.Core
4592     * @since 12
4593     */
4594    PRECONFIG_1080P = 1,
4595
4596    /**
4597     * 4K output for preconfig.
4598     *
4599     * @syscap SystemCapability.Multimedia.Camera.Core
4600     * @since 12
4601     */
4602    PRECONFIG_4K = 2,
4603
4604    /**
4605     * high quality output for preconfig.
4606     *
4607     * @syscap SystemCapability.Multimedia.Camera.Core
4608     * @since 12
4609     */
4610    PRECONFIG_HIGH_QUALITY = 3
4611  }
4612
4613  /**
4614   * The aspect ratios of preconfig, which used to configure session conveniently.
4615   *
4616   * @enum { number }
4617   * @syscap SystemCapability.Multimedia.Camera.Core
4618   * @since 12
4619   */
4620  enum PreconfigRatio {
4621    /**
4622     * Aspect ratio 1:1 for preconfig.
4623     *
4624     * @syscap SystemCapability.Multimedia.Camera.Core
4625     * @since 12
4626     */
4627    PRECONFIG_RATIO_1_1 = 0,
4628
4629    /**
4630     * Aspect ratio 4:3 for preconfig.
4631     *
4632     * @syscap SystemCapability.Multimedia.Camera.Core
4633     * @since 12
4634     */
4635    PRECONFIG_RATIO_4_3 = 1,
4636
4637    /**
4638     * Aspect ratio 16:9 for preconfig.
4639     *
4640     * @syscap SystemCapability.Multimedia.Camera.Core
4641     * @since 12
4642     */
4643    PRECONFIG_RATIO_16_9 = 2
4644  }
4645
4646  /**
4647   * Enum for feature type used in scene detection.
4648   *
4649   * @enum { number }
4650   * @syscap SystemCapability.Multimedia.Camera.Core
4651   * @systemapi
4652   * @since 12
4653   */
4654  enum SceneFeatureType {
4655    /**
4656     * Feature for boost moon capture.
4657     *
4658     * @syscap SystemCapability.Multimedia.Camera.Core
4659     * @systemapi
4660     * @since 12
4661     */
4662    MOON_CAPTURE_BOOST = 0,
4663
4664    /**
4665     * Feature for tripod detection.
4666     *
4667     * @syscap SystemCapability.Multimedia.Camera.Core
4668     * @systemapi
4669     * @since 13
4670     */
4671    TRIPOD_DETECTION = 1,
4672
4673    /**
4674     * Feature for low light boost.
4675     *
4676     * @syscap SystemCapability.Multimedia.Camera.Core
4677     * @systemapi
4678     * @since 13
4679     */
4680    LOW_LIGHT_BOOST = 2
4681  }
4682
4683  /**
4684   * Feature Detection Result.
4685   *
4686   * @typedef SceneFeatureDetectionResult
4687   * @syscap SystemCapability.Multimedia.Camera.Core
4688   * @systemapi
4689   * @since 12
4690   */
4691  interface SceneFeatureDetectionResult {
4692    /**
4693     * Detected feature type.
4694     *
4695     * @type { SceneFeatureType }
4696     * @readonly
4697     * @syscap SystemCapability.Multimedia.Camera.Core
4698     * @systemapi
4699     * @since 12
4700     */
4701    readonly featureType: SceneFeatureType;
4702
4703    /**
4704     * Check whether feature is detected.
4705     *
4706     * @type { boolean }
4707     * @readonly
4708     * @syscap SystemCapability.Multimedia.Camera.Core
4709     * @systemapi
4710     * @since 12
4711     */
4712    readonly detected: boolean;
4713  }
4714
4715  /**
4716   * Enum for tripod status.
4717   *
4718   * @enum { number }
4719   * @syscap SystemCapability.Multimedia.Camera.Core
4720   * @systemapi
4721   * @since 13
4722   */
4723  enum TripodStatus {
4724    /**
4725     * Invalid tripod status.
4726     *
4727     * @syscap SystemCapability.Multimedia.Camera.Core
4728     * @systemapi
4729     * @since 13
4730     */
4731    INVALID = 0,
4732
4733    /**
4734     * Tripod is active.
4735     *
4736     * @syscap SystemCapability.Multimedia.Camera.Core
4737     * @systemapi
4738     * @since 13
4739     */
4740    ACTIVE = 1,
4741
4742    /**
4743     * Enter tripod stabilization state.
4744     *
4745     * @syscap SystemCapability.Multimedia.Camera.Core
4746     * @systemapi
4747     * @since 13
4748     */
4749    ENTERING = 2,
4750
4751    /**
4752     * Exit tripod stabilization state.
4753     *
4754     * @syscap SystemCapability.Multimedia.Camera.Core
4755     * @systemapi
4756     * @since 13
4757     */
4758    EXITING = 3,
4759  }
4760
4761   /**
4762   * Tripod detection result.
4763   *
4764   * @interface TripodDetectionResult
4765   * @extends SceneFeatureDetectionResult
4766   * @syscap SystemCapability.Multimedia.Camera.Core
4767   * @systemapi
4768   * @since 13
4769   */
4770  interface TripodDetectionResult extends SceneFeatureDetectionResult {
4771    /**
4772     * tripod status.
4773     *
4774     * @type { TripodStatus }
4775     * @readonly
4776     * @syscap SystemCapability.Multimedia.Camera.Core
4777     * @systemapi
4778     * @since 13
4779     */
4780    readonly tripodStatus: TripodStatus;
4781  }
4782
4783  /**
4784   * Scene detection query.
4785   *
4786   * @interface SceneDetectionQuery
4787   * @syscap SystemCapability.Multimedia.Camera.Core
4788   * @systemapi
4789   * @since 12
4790   */
4791  interface SceneDetectionQuery {
4792    /**
4793     * Check whether specified feature is supported.
4794     *
4795     * @param { SceneFeatureType } type - Specified feature type.
4796     * @returns { boolean } - Is specified feature supported.
4797     * @throws { BusinessError } 202 - Not System Application, only throw in session usage.
4798     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4799     * @syscap SystemCapability.Multimedia.Camera.Core
4800     * @systemapi
4801     * @since 12
4802     */
4803    isSceneFeatureSupported(type: SceneFeatureType): boolean;
4804  }
4805
4806  /**
4807   * Scene detection.
4808   *
4809   * @interface SceneDetection
4810   * @syscap SystemCapability.Multimedia.Camera.Core
4811   * @systemapi
4812   * @since 12
4813   */
4814  interface SceneDetection extends SceneDetectionQuery {
4815    /**
4816     * Enable specified feature.
4817     *
4818     * @param { SceneFeatureType } type - Specified feature type.
4819     * @param { boolean } enabled - Target feature status.
4820     * @throws { BusinessError } 202 - Not System Application.
4821     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
4822     * @syscap SystemCapability.Multimedia.Camera.Core
4823     * @systemapi
4824     * @since 12
4825     */
4826    enableSceneFeature(type: SceneFeatureType, enabled: boolean): void;
4827  }
4828
4829  /**
4830   * Photo session object for system hap.
4831   *
4832   * @extends PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion
4833   * @interface PhotoSessionForSys
4834   * @syscap SystemCapability.Multimedia.Camera.Core
4835   * @systemapi
4836   * @since 11
4837   */
4838  /**
4839   * Photo session object for system hap.
4840   *
4841   * @extends PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion, DepthFusion
4842   * @interface PhotoSessionForSys
4843   * @syscap SystemCapability.Multimedia.Camera.Core
4844   * @systemapi
4845   * @since 14
4846   */
4847  interface PhotoSessionForSys extends PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion, DepthFusion {
4848  }
4849
4850  /**
4851   * Photo session object.
4852   *
4853   * @interface PhotoSession
4854   * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement
4855   * @syscap SystemCapability.Multimedia.Camera.Core
4856   * @since 11
4857   */
4858  /**
4859   * Photo session object.
4860   *
4861   * @interface PhotoSession
4862   * @extends AutoDeviceSwitch
4863   * @syscap SystemCapability.Multimedia.Camera.Core
4864   * @since 13
4865   */
4866  interface PhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch {
4867    /**
4868     * Gets whether the choosed preconfig type can be used to configure photo session.
4869     * Must choose preconfig type from {@link PreconfigType}.
4870     *
4871     * @param { PreconfigType } preconfigType - preconfig type.
4872     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4873     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_4_3}.
4874     * @returns { boolean } Whether the choosed preconfig type can be used.
4875     * @throws { BusinessError } 7400201 - Camera service fatal error.
4876     * @syscap SystemCapability.Multimedia.Camera.Core
4877     * @since 12
4878     */
4879    canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean;
4880
4881    /**
4882     * Configure photo session with the preconfig type.
4883     * Must choose preconfig type from {@link PreconfigType}.
4884     *
4885     * @param { PreconfigType } preconfigType - preconfig type.
4886     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
4887     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_4_3}
4888     * @throws { BusinessError } 7400201 - Camera service fatal error.
4889     * @syscap SystemCapability.Multimedia.Camera.Core
4890     * @since 12
4891     */
4892    preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void;
4893
4894    /**
4895     * Subscribes to error events.
4896     *
4897     * @param { 'error' } type - Event type.
4898     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4899     * @syscap SystemCapability.Multimedia.Camera.Core
4900     * @since 11
4901     */
4902    on(type: 'error', callback: ErrorCallback): void;
4903
4904    /**
4905     * Unsubscribes from error events.
4906     *
4907     * @param { 'error' } type - Event type.
4908     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
4909     * @syscap SystemCapability.Multimedia.Camera.Core
4910     * @since 11
4911     */
4912    off(type: 'error', callback?: ErrorCallback): void;
4913
4914    /**
4915     * Subscribes focus state change event callback.
4916     *
4917     * @param { 'focusStateChange' } type - Event type.
4918     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4919     * @syscap SystemCapability.Multimedia.Camera.Core
4920     * @since 11
4921     */
4922    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
4923
4924    /**
4925     * Unsubscribes from focus state change event callback.
4926     *
4927     * @param { 'focusStateChange' } type - Event type.
4928     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
4929     * @syscap SystemCapability.Multimedia.Camera.Core
4930     * @since 11
4931     */
4932    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
4933
4934    /**
4935     * Subscribes zoom info event callback.
4936     *
4937     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4938     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4939     * @syscap SystemCapability.Multimedia.Camera.Core
4940     * @since 11
4941     */
4942    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
4943
4944    /**
4945     * Unsubscribes from zoom info event callback.
4946     *
4947     * @param { 'smoothZoomInfoAvailable' } type - Event type.
4948     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
4949     * @syscap SystemCapability.Multimedia.Camera.Core
4950     * @since 11
4951     */
4952    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
4953
4954    /**
4955     * Subscribes camera macro status event callback.
4956     *
4957     * @param { 'macroStatusChanged' } type - Event type.
4958     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4959     * @throws { BusinessError } 202 - Not System Application.
4960     * @syscap SystemCapability.Multimedia.Camera.Core
4961     * @systemapi
4962     * @since 11
4963     */
4964    on(type: 'macroStatusChanged', callback: AsyncCallback<boolean>): void;
4965
4966    /**
4967     * Unsubscribes camera macro status event callback.
4968     *
4969     * @param { 'macroStatusChanged' } type - Event type.
4970     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
4971     * @throws { BusinessError } 202 - Not System Application.
4972     * @syscap SystemCapability.Multimedia.Camera.Core
4973     * @systemapi
4974     * @since 11
4975     */
4976    off(type: 'macroStatusChanged', callback?: AsyncCallback<boolean>): void;
4977
4978    /**
4979     * Subscribes to feature detection results.
4980     *
4981     * @param { 'featureDetection' } type - Event type.
4982     * @param { SceneFeatureType } featureType - Feature type.
4983     * @param { AsyncCallback<SceneFeatureDetectionResult> } callback - Callback used to get the detection result.
4984     * @throws { BusinessError } 202 - Not System Application.
4985     * @syscap SystemCapability.Multimedia.Camera.Core
4986     * @systemapi
4987     * @since 12
4988     */
4989    on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback<SceneFeatureDetectionResult>): void;
4990
4991    /**
4992     * Unsubscribes from feature detection result.
4993     *
4994     * @param { 'featureDetection' } type - Event type.
4995     * @param { SceneFeatureType } featureType - Feature type.
4996     * @param { AsyncCallback<SceneFeatureDetectionResult> } callback - Callback used to get the detection result.
4997     * @throws { BusinessError } 202 - Not System Application.
4998     * @syscap SystemCapability.Multimedia.Camera.Core
4999     * @systemapi
5000     * @since 12
5001     */
5002    off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback<SceneFeatureDetectionResult>): void;
5003
5004    /**
5005     * Subscribes to effect suggestion event callback.
5006     *
5007     * @param { 'effectSuggestionChange' } type - Event type.
5008     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
5009     * @syscap SystemCapability.Multimedia.Camera.Core
5010     * @systemapi
5011     * @since 12
5012     */
5013    on(type: 'effectSuggestionChange', callback: AsyncCallback<EffectSuggestionType>): void;
5014
5015    /**
5016     * Unsubscribes from effect suggestion event callback.
5017     *
5018     * @param { 'effectSuggestionChange' } type - Event type.
5019     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
5020     * @syscap SystemCapability.Multimedia.Camera.Core
5021     * @systemapi
5022     * @since 12
5023     */
5024    off(type: 'effectSuggestionChange', callback?: AsyncCallback<EffectSuggestionType>): void;
5025
5026    /**
5027     * Subscribes to auto device switch status event callback.
5028     *
5029     * @param { 'autoDeviceSwitchStatusChange' } type - Event type.
5030     * @param { AsyncCallback<AutoDeviceSwitchStatus> } callback - Callback used to return the result.
5031     * @syscap SystemCapability.Multimedia.Camera.Core
5032     * @since 13
5033     */
5034    on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback<AutoDeviceSwitchStatus>): void;
5035
5036    /**
5037     * Unsubscribes to auto device switch status event callback.
5038     *
5039     * @param { 'autoDeviceSwitchStatusChange' } type - Event type.
5040     * @param { AsyncCallback<AutoDeviceSwitchStatus> } callback - Callback used to return the result.
5041     * @syscap SystemCapability.Multimedia.Camera.Core
5042     * @since 13
5043     */
5044    off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback<AutoDeviceSwitchStatus>): void;
5045
5046    /**
5047     * Subscribes to lcd flash status.
5048     *
5049     * @param { 'lcdFlashStatus' } type - Event type.
5050     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5051     * @throws { BusinessError } 202 - Not System Application.
5052     * @syscap SystemCapability.Multimedia.Camera.Core
5053     * @systemapi
5054     * @since 13
5055     */
5056    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
5057
5058     /**
5059      * Unsubscribes from lcd flash status.
5060      *
5061      * @param { 'lcdFlashStatus' } type - Event type.
5062      * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5063      * @throws { BusinessError } 202 - Not System Application.
5064      * @syscap SystemCapability.Multimedia.Camera.Core
5065      * @systemapi
5066      * @since 13
5067      */
5068    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
5069
5070    /**
5071     * Gets session functions.
5072     *
5073     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set.
5074     * @returns { Array<PhotoFunctions> } List of session functions.
5075     * @throws { BusinessError } 202 - Not System Application.
5076     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
5077     * @syscap SystemCapability.Multimedia.Camera.Core
5078     * @systemapi
5079     * @since 13
5080     */
5081    getSessionFunctions(outputCapability: CameraOutputCapability): Array<PhotoFunctions>;
5082
5083    /**
5084     * Gets session conflict functions.
5085     *
5086     * @returns { Array<PhotoConflictFunctions> } List of session conflict functions.
5087     * @throws { BusinessError } 202 - Not System Application.
5088     * @syscap SystemCapability.Multimedia.Camera.Core
5089     * @systemapi
5090     * @since 13
5091     */
5092    getSessionConflictFunctions(): Array<PhotoConflictFunctions>;
5093  }
5094
5095  /**
5096   * Video session object for system hap.
5097   *
5098   * @interface VideoSessionForSys
5099   * @syscap SystemCapability.Multimedia.Camera.Core
5100   * @systemapi
5101   * @since 11
5102   */
5103  interface VideoSessionForSys extends VideoSession, Beauty, ColorEffect, ColorManagement, Macro {
5104  }
5105
5106  /**
5107   * Enum for quality prioritization.
5108   *
5109   * @enum { number }
5110   * @syscap SystemCapability.Multimedia.Camera.Core
5111   * @since 14
5112   */
5113  enum QualityPrioritization {
5114    /**
5115     * High quality priority.
5116     *
5117     * @syscap SystemCapability.Multimedia.Camera.Core
5118     * @since 14
5119     */
5120    HIGH_QUALITY = 0,
5121
5122    /**
5123     * Power balance priority.
5124     *
5125     * @syscap SystemCapability.Multimedia.Camera.Core
5126     * @since 14
5127     */
5128    POWER_BALANCE = 1
5129  }
5130
5131  /**
5132   * Video session object.
5133   *
5134   * @interface VideoSession
5135   * @extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement
5136   * @syscap SystemCapability.Multimedia.Camera.Core
5137   * @since 11
5138   */
5139  /**
5140   * Video session object.
5141   *
5142   * @interface VideoSession
5143   * @extends AutoDeviceSwitch
5144   * @syscap SystemCapability.Multimedia.Camera.Core
5145   * @since 13
5146   */
5147  interface VideoSession extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch {
5148    /**
5149     * Gets whether the choosed preconfig type can be used to configure video session.
5150     * Must choose preconfig type from {@link PreconfigType}.
5151     *
5152     * @param { PreconfigType } preconfigType - preconfig type.
5153     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
5154     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
5155     * @returns { boolean } Whether the choosed preconfig type can be used.
5156     * @throws { BusinessError } 7400201 - Camera service fatal error.
5157     * @syscap SystemCapability.Multimedia.Camera.Core
5158     * @since 12
5159     */
5160    canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean;
5161
5162    /**
5163     * Configure video session with the preconfig type.
5164     * Must choose preconfig type from {@link PreconfigType}.
5165     *
5166     * @param { PreconfigType } preconfigType - preconfig type.
5167     * @param { PreconfigRatio } preconfigRatio - the aspect ratio of surface for preconfig,
5168     *                                            default value {@link PreconfigRatio#PRECONFIG_RATIO_16_9}.
5169     * @throws { BusinessError } 7400201 - Camera service fatal error.
5170     * @syscap SystemCapability.Multimedia.Camera.Core
5171     * @since 12
5172     */
5173    preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void;
5174
5175    /**
5176     * Subscribes to error events.
5177     *
5178     * @param { 'error' } type - Event type.
5179     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5180     * @syscap SystemCapability.Multimedia.Camera.Core
5181     * @since 11
5182     */
5183    on(type: 'error', callback: ErrorCallback): void;
5184
5185    /**
5186     * Unsubscribes from error events.
5187     *
5188     * @param { 'error' } type - Event type.
5189     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5190     * @syscap SystemCapability.Multimedia.Camera.Core
5191     * @since 11
5192     */
5193    off(type: 'error', callback?: ErrorCallback): void;
5194
5195    /**
5196     * Subscribes focus state change event callback.
5197     *
5198     * @param { 'focusStateChange' } type - Event type.
5199     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5200     * @syscap SystemCapability.Multimedia.Camera.Core
5201     * @since 11
5202     */
5203    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5204
5205    /**
5206     * Unsubscribes from focus state change event callback.
5207     *
5208     * @param { 'focusStateChange' } type - Event type.
5209     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5210     * @syscap SystemCapability.Multimedia.Camera.Core
5211     * @since 11
5212     */
5213    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5214
5215    /**
5216     * Subscribes zoom info event callback.
5217     *
5218     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5219     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5220     * @syscap SystemCapability.Multimedia.Camera.Core
5221     * @since 11
5222     */
5223    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5224
5225    /**
5226     * Unsubscribes from zoom info event callback.
5227     *
5228     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5229     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5230     * @syscap SystemCapability.Multimedia.Camera.Core
5231     * @since 11
5232     */
5233    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5234
5235    /**
5236     * Subscribes camera macro status event callback.
5237     *
5238     * @param { 'macroStatusChanged' } type - Event type.
5239     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
5240     * @throws { BusinessError } 202 - Not System Application.
5241     * @syscap SystemCapability.Multimedia.Camera.Core
5242     * @systemapi
5243     * @since 11
5244     */
5245    on(type: 'macroStatusChanged', callback: AsyncCallback<boolean>): void;
5246
5247    /**
5248     * Unsubscribes camera macro status event callback.
5249     *
5250     * @param { 'macroStatusChanged' } type - Event type.
5251     * @param { AsyncCallback<boolean> } callback - Callback used to return the result.
5252     * @throws { BusinessError } 202 - Not System Application.
5253     * @syscap SystemCapability.Multimedia.Camera.Core
5254     * @systemapi
5255     * @since 11
5256     */
5257    off(type: 'macroStatusChanged', callback?: AsyncCallback<boolean>): void;
5258
5259    /**
5260     * Subscribes to lcd flash status.
5261     *
5262     * @param { 'lcdFlashStatus' } type - Event type.
5263     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5264     * @throws { BusinessError } 202 - Not System Application.
5265     * @syscap SystemCapability.Multimedia.Camera.Core
5266     * @systemapi
5267     * @since 13
5268     */
5269    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
5270
5271     /**
5272      * Unsubscribes from lcd flash status.
5273      *
5274      * @param { 'lcdFlashStatus' } type - Event type.
5275      * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5276      * @throws { BusinessError } 202 - Not System Application.
5277      * @syscap SystemCapability.Multimedia.Camera.Core
5278      * @systemapi
5279      * @since 13
5280      */
5281    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
5282
5283    /**
5284     * Subscribes to auto device switch status event callback.
5285     *
5286     * @param { 'autoDeviceSwitchStatusChange' } type - Event type.
5287     * @param { AsyncCallback<AutoDeviceSwitchStatus> } callback - Callback used to return the result.
5288     * @syscap SystemCapability.Multimedia.Camera.Core
5289     * @since 13
5290     */
5291    on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback<AutoDeviceSwitchStatus>): void;
5292
5293    /**
5294     * Unsubscribes to auto device switch status event callback.
5295     *
5296     * @param { 'autoDeviceSwitchStatusChange' } type - Event type.
5297     * @param { AsyncCallback<AutoDeviceSwitchStatus> } callback - Callback used to return the result.
5298     * @syscap SystemCapability.Multimedia.Camera.Core
5299     * @since 13
5300     */
5301    off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback<AutoDeviceSwitchStatus>): void;
5302
5303    /**
5304     * Gets session functions.
5305     *
5306     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set.
5307     * @returns { Array<VideoFunctions> } List of session functions.
5308     * @throws { BusinessError } 202 - Not System Application.
5309     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
5310     * @syscap SystemCapability.Multimedia.Camera.Core
5311     * @systemapi
5312     * @since 13
5313     */
5314    getSessionFunctions(outputCapability: CameraOutputCapability): Array<VideoFunctions>;
5315
5316    /**
5317     * Gets session conflict functions.
5318     *
5319     * @returns { Array<VideoConflictFunctions> } List of session conflict functions.
5320     * @throws { BusinessError } 202 - Not System Application.
5321     * @syscap SystemCapability.Multimedia.Camera.Core
5322     * @systemapi
5323     * @since 13
5324     */
5325    getSessionConflictFunctions(): Array<VideoConflictFunctions>;
5326
5327    /**
5328     * Sets quality prioritization.
5329     *
5330     * @param { QualityPrioritization } quality - Target quality prioritization.
5331     * @throws { BusinessError } 401 - Parameter error. Possible causes:
5332     * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types;
5333     * 3. Parameter verification failed.
5334     * @throws { BusinessError } 7400103 - Session not config.
5335     * @syscap SystemCapability.Multimedia.Camera.Core
5336     * @since 14
5337     */
5338    setQualityPrioritization(quality : QualityPrioritization) : void;
5339  }
5340
5341  /**
5342   * Enumerates the camera portrait effects.
5343   *
5344   * @enum { number }
5345   * @syscap SystemCapability.Multimedia.Camera.Core
5346   * @systemapi
5347   * @since 10
5348   */
5349  enum PortraitEffect {
5350    /**
5351     * portrait effect off.
5352     *
5353     * @syscap SystemCapability.Multimedia.Camera.Core
5354     * @systemapi
5355     * @since 10
5356     */
5357    OFF = 0,
5358
5359    /**
5360     * circular blurring for portrait.
5361     *
5362     * @syscap SystemCapability.Multimedia.Camera.Core
5363     * @systemapi
5364     * @since 10
5365     */
5366    CIRCLES = 1,
5367
5368    /**
5369     * heart blurring for portrait.
5370     *
5371     * @syscap SystemCapability.Multimedia.Camera.Core
5372     * @systemapi
5373     * @since 11
5374     */
5375    HEART = 2,
5376
5377    /**
5378     * rotated blurring for portrait.
5379     *
5380     * @syscap SystemCapability.Multimedia.Camera.Core
5381     * @systemapi
5382     * @since 11
5383     */
5384    ROTATED = 3,
5385
5386    /**
5387     * studio blurring for portrait.
5388     *
5389     * @syscap SystemCapability.Multimedia.Camera.Core
5390     * @systemapi
5391     * @since 11
5392     */
5393    STUDIO = 4,
5394
5395    /**
5396     * theater blurring for portrait.
5397     *
5398     * @syscap SystemCapability.Multimedia.Camera.Core
5399     * @systemapi
5400     * @since 11
5401     */
5402    THEATER = 5
5403  }
5404
5405  /**
5406   * Portrait Query object.
5407   *
5408   * @interface PortraitQuery
5409   * @syscap SystemCapability.Multimedia.Camera.Core
5410   * @systemapi
5411   * @since 12
5412   */
5413  interface PortraitQuery {
5414    /**
5415     * Gets supported portrait effect.
5416     *
5417     * @returns { Array<PortraitEffect> } List of portrait effect.
5418     * @throws { BusinessError } 7400103 - Session not config.
5419     * @syscap SystemCapability.Multimedia.Camera.Core
5420     * @systemapi
5421     * @since 10
5422     */
5423    /**
5424     * Gets supported portrait effect.
5425     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5426     *
5427     * @returns { Array<PortraitEffect> } List of portrait effect.
5428     * @throws { BusinessError } 202 - Not System Application.
5429     * @throws { BusinessError } 7400103 - Session not config.
5430     * @syscap SystemCapability.Multimedia.Camera.Core
5431     * @systemapi
5432     * @since 11
5433     */
5434    /**
5435     * Gets supported portrait effect.
5436     * Move to PortraitQuery interface from Portrait interface since 12.
5437     *
5438     * @returns { Array<PortraitEffect> } List of portrait effect.
5439     * @throws { BusinessError } 202 - Not System Application.
5440     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5441     * @syscap SystemCapability.Multimedia.Camera.Core
5442     * @systemapi
5443     * @since 12
5444     */
5445    getSupportedPortraitEffects(): Array<PortraitEffect>;
5446  }
5447
5448  /**
5449   * Portrait object.
5450   *
5451   * @interface Portrait
5452   * @syscap SystemCapability.Multimedia.Camera.Core
5453   * @systemapi
5454   * @since 11
5455   */
5456  interface Portrait extends PortraitQuery {
5457    /**
5458     * Gets the portrait effect in use.
5459     *
5460     * @returns { PortraitEffect } The portrait effect in use.
5461     * @throws { BusinessError } 7400103 - Session not config.
5462     * @syscap SystemCapability.Multimedia.Camera.Core
5463     * @systemapi
5464     * @since 10
5465     */
5466    /**
5467     * Gets the portrait effect in use.
5468     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5469     *
5470     * @returns { PortraitEffect } The portrait effect in use.
5471     * @throws { BusinessError } 202 - Not System Application.
5472     * @throws { BusinessError } 7400103 - Session not config.
5473     * @syscap SystemCapability.Multimedia.Camera.Core
5474     * @systemapi
5475     * @since 11
5476     */
5477    getPortraitEffect(): PortraitEffect;
5478
5479    /**
5480     * Sets a portrait effect for a camera device.
5481     *
5482     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5483     * @throws { BusinessError } 7400103 - Session not config.
5484     * @syscap SystemCapability.Multimedia.Camera.Core
5485     * @systemapi
5486     * @since 10
5487     */
5488    /**
5489     * Sets a portrait effect for a camera device.
5490     * Move to Portrait interface from PortraitPhotoSession interface since 11.
5491     *
5492     * @param { PortraitEffect } effect - Effect Portrait effect to set.
5493     * @throws { BusinessError } 202 - Not System Application.
5494     * @throws { BusinessError } 7400103 - Session not config.
5495     * @syscap SystemCapability.Multimedia.Camera.Core
5496     * @systemapi
5497     * @since 11
5498     */
5499    setPortraitEffect(effect: PortraitEffect): void;
5500  }
5501
5502  /**
5503   * Zoom range.
5504   *
5505   * @typedef ZoomRange
5506   * @syscap SystemCapability.Multimedia.Camera.Core
5507   * @systemapi
5508   * @since 11
5509   */
5510  interface ZoomRange {
5511    /**
5512     * Min zoom value.
5513     *
5514     * @type { number }
5515     * @readonly
5516     * @syscap SystemCapability.Multimedia.Camera.Core
5517     * @systemapi
5518     * @since 11
5519     */
5520    readonly min: number;
5521
5522    /**
5523     * Max zoom value.
5524     *
5525     * @type { number }
5526     * @readonly
5527     * @syscap SystemCapability.Multimedia.Camera.Core
5528     * @systemapi
5529     * @since 11
5530     */
5531    readonly max: number;
5532  }
5533
5534  /**
5535   * Physical Aperture object
5536   *
5537   * @typedef PhysicalAperture
5538   * @syscap SystemCapability.Multimedia.Camera.Core
5539   * @systemapi
5540   * @since 11
5541   */
5542  interface PhysicalAperture {
5543    /**
5544     * Zoom Range of the specific physical aperture.
5545     *
5546     * @type { ZoomRange }
5547     * @syscap SystemCapability.Multimedia.Camera.Core
5548     * @systemapi
5549     * @since 11
5550     */
5551    zoomRange: ZoomRange;
5552
5553    /**
5554     * The supported physical apertures.
5555     *
5556     * @type { Array<number> }
5557     * @syscap SystemCapability.Multimedia.Camera.Core
5558     * @systemapi
5559     * @since 11
5560     */
5561    apertures: Array<number>;
5562  }
5563
5564  /**
5565   * Aperture Query object.
5566   *
5567   * @interface ApertureQuery
5568   * @syscap SystemCapability.Multimedia.Camera.Core
5569   * @systemapi
5570   * @since 12
5571   */
5572  interface ApertureQuery {
5573    /**
5574     * Gets the supported virtual apertures.
5575     *
5576     * @returns { Array<number> } The array of supported virtual apertures.
5577     * @throws { BusinessError } 202 - Not System Application.
5578     * @throws { BusinessError } 7400103 - Session not config.
5579     * @syscap SystemCapability.Multimedia.Camera.Core
5580     * @systemapi
5581     * @since 11
5582     */
5583    /**
5584     * Gets the supported virtual apertures.
5585     * Move to ApertureQuery interface from Aperture since 12.
5586     *
5587     * @returns { Array<number> } The array of supported virtual apertures.
5588     * @throws { BusinessError } 202 - Not System Application.
5589     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5590     * @syscap SystemCapability.Multimedia.Camera.Core
5591     * @systemapi
5592     * @since 12
5593     */
5594    getSupportedVirtualApertures(): Array<number>;
5595
5596    /**
5597     * Gets the supported physical apertures.
5598     *
5599     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5600     * @throws { BusinessError } 202 - Not System Application.
5601     * @throws { BusinessError } 7400103 - Session not config.
5602     * @syscap SystemCapability.Multimedia.Camera.Core
5603     * @systemapi
5604     * @since 11
5605     */
5606     /**
5607     * Gets the supported physical apertures.
5608     * Move to ApertureQuery interface from Aperture since 12.
5609     *
5610     * @returns { Array<PhysicalAperture> } The array of supported physical apertures.
5611     * @throws { BusinessError } 202 - Not System Application.
5612     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5613     * @syscap SystemCapability.Multimedia.Camera.Core
5614     * @systemapi
5615     * @since 12
5616     */
5617    getSupportedPhysicalApertures(): Array<PhysicalAperture>;
5618  }
5619
5620  /**
5621   * Aperture object.
5622   *
5623   * @interface Aperture
5624   * @syscap SystemCapability.Multimedia.Camera.Core
5625   * @systemapi
5626   * @since 11
5627   */
5628  interface Aperture extends ApertureQuery {
5629    /**
5630     * Gets current virtual aperture value.
5631     *
5632     * @returns { number } The current virtual aperture value.
5633     * @throws { BusinessError } 202 - Not System Application.
5634     * @throws { BusinessError } 7400103 - Session not config.
5635     * @syscap SystemCapability.Multimedia.Camera.Core
5636     * @systemapi
5637     * @since 11
5638     */
5639    getVirtualAperture(): number;
5640
5641    /**
5642     * Sets virtual aperture value.
5643     *
5644     * @param { number } aperture - virtual aperture value
5645     * @throws { BusinessError } 202 - Not System Application.
5646     * @throws { BusinessError } 7400103 - Session not config.
5647     * @syscap SystemCapability.Multimedia.Camera.Core
5648     * @systemapi
5649     * @since 11
5650     */
5651    setVirtualAperture(aperture: number): void;
5652
5653    /**
5654     * Gets current physical aperture value.
5655     *
5656     * @returns { number } The current physical aperture value.
5657     * @throws { BusinessError } 202 - Not System Application.
5658     * @throws { BusinessError } 7400103 - Session not config.
5659     * @syscap SystemCapability.Multimedia.Camera.Core
5660     * @systemapi
5661     * @since 11
5662     */
5663    getPhysicalAperture(): number;
5664
5665    /**
5666     * Sets physical aperture value.
5667     *
5668     * @param { number } aperture - physical aperture value
5669     * @throws { BusinessError } 202 - Not System Application.
5670     * @throws { BusinessError } 7400103 - Session not config.
5671     * @syscap SystemCapability.Multimedia.Camera.Core
5672     * @systemapi
5673     * @since 11
5674     */
5675    setPhysicalAperture(aperture: number): void;
5676  }
5677
5678  /**
5679     * Portrait Photo session object.
5680     *
5681     * @interface PortraitPhotoSession
5682     * @syscap SystemCapability.Multimedia.Camera.Core
5683     * @systemapi
5684     * @since 11
5685     */
5686  interface PortraitPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, Beauty, ColorEffect, ColorManagement, Portrait, Aperture {
5687    /**
5688     * Subscribes to error events.
5689     *
5690     * @param { 'error' } type - Event type.
5691     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5692     * @syscap SystemCapability.Multimedia.Camera.Core
5693     * @systemapi
5694     * @since 11
5695     */
5696    on(type: 'error', callback: ErrorCallback): void;
5697
5698    /**
5699     * Unsubscribes from error events.
5700     *
5701     * @param { 'error' } type - Event type.
5702     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5703     * @syscap SystemCapability.Multimedia.Camera.Core
5704     * @systemapi
5705     * @since 11
5706     */
5707    off(type: 'error', callback?: ErrorCallback): void;
5708
5709    /**
5710     * Subscribes focus state change event callback.
5711     *
5712     * @param { 'focusStateChange' } type - Event type.
5713     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5714     * @syscap SystemCapability.Multimedia.Camera.Core
5715     * @systemapi
5716     * @since 11
5717     */
5718    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5719
5720    /**
5721     * Unsubscribes from focus state change event callback.
5722     *
5723     * @param { 'focusStateChange' } type - Event type.
5724     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5725     * @syscap SystemCapability.Multimedia.Camera.Core
5726     * @systemapi
5727     * @since 11
5728     */
5729    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5730
5731    /**
5732     * Subscribes zoom info event callback.
5733     *
5734     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5735     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5736     * @syscap SystemCapability.Multimedia.Camera.Core
5737     * @systemapi
5738     * @since 11
5739     */
5740    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5741
5742    /**
5743     * Unsubscribes from zoom info event callback.
5744     *
5745     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5746     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5747     * @syscap SystemCapability.Multimedia.Camera.Core
5748     * @systemapi
5749     * @since 11
5750     */
5751    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5752
5753    /**
5754     * Subscribes to lcd flash status.
5755     *
5756     * @param { 'lcdFlashStatus' } type - Event type.
5757     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5758     * @throws { BusinessError } 202 - Not System Application.
5759     * @syscap SystemCapability.Multimedia.Camera.Core
5760     * @systemapi
5761     * @since 13
5762     */
5763    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
5764
5765    /**
5766     * Unsubscribes from lcd flash status.
5767     *
5768     * @param { 'lcdFlashStatus' } type - Event type.
5769     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
5770     * @throws { BusinessError } 202 - Not System Application.
5771     * @syscap SystemCapability.Multimedia.Camera.Core
5772     * @systemapi
5773     * @since 13
5774     */
5775    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
5776
5777    /**
5778     * Gets session functions.
5779     *
5780     * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set.
5781     * @returns { Array<PortraitPhotoFunctions> } List of session functions.
5782     * @throws { BusinessError } 202 - Not System Application.
5783     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
5784     * @syscap SystemCapability.Multimedia.Camera.Core
5785     * @systemapi
5786     * @since 13
5787     */
5788    getSessionFunctions(outputCapability: CameraOutputCapability): Array<PortraitPhotoFunctions>;
5789
5790    /**
5791     * Gets session conflict functions.
5792     *
5793     * @returns { Array<PortraitPhotoConflictFunctions> } List of session conflict functions.
5794     * @throws { BusinessError } 202 - Not System Application.
5795     * @syscap SystemCapability.Multimedia.Camera.Core
5796     * @systemapi
5797     * @since 13
5798     */
5799    getSessionConflictFunctions(): Array<PortraitPhotoConflictFunctions>;
5800  }
5801
5802  /**
5803     * Aperture video session object.
5804     *
5805     * @interface ApertureVideoSession
5806     * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture
5807     * @syscap SystemCapability.Multimedia.Camera.Core
5808     * @systemapi
5809     * @since 12
5810     */
5811  interface ApertureVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture {
5812    /**
5813     * Subscribes to error events.
5814     *
5815     * @param { 'error' } type - Event type.
5816     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5817     * @throws { BusinessError } 202 - Not System Application.
5818     * @syscap SystemCapability.Multimedia.Camera.Core
5819     * @systemapi
5820     * @since 12
5821     */
5822    on(type: 'error', callback: ErrorCallback): void;
5823
5824    /**
5825     * Unsubscribes from error events.
5826     *
5827     * @param { 'error' } type - Event type.
5828     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5829     * @throws { BusinessError } 202 - Not System Application.
5830     * @syscap SystemCapability.Multimedia.Camera.Core
5831     * @systemapi
5832     * @since 12
5833     */
5834    off(type: 'error', callback?: ErrorCallback): void;
5835
5836    /**
5837     * Subscribes focus state change event callback.
5838     *
5839     * @param { 'focusStateChange' } type - Event type.
5840     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5841     * @throws { BusinessError } 202 - Not System Application.
5842     * @syscap SystemCapability.Multimedia.Camera.Core
5843     * @systemapi
5844     * @since 12
5845     */
5846    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
5847
5848    /**
5849     * Unsubscribes from focus state change event callback.
5850     *
5851     * @param { 'focusStateChange' } type - Event type.
5852     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
5853     * @throws { BusinessError } 202 - Not System Application.
5854     * @syscap SystemCapability.Multimedia.Camera.Core
5855     * @systemapi
5856     * @since 12
5857     */
5858    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
5859
5860    /**
5861     * Subscribes zoom info event callback.
5862     *
5863     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5864     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5865     * @throws { BusinessError } 202 - Not System Application.
5866     * @syscap SystemCapability.Multimedia.Camera.Core
5867     * @systemapi
5868     * @since 12
5869     */
5870    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
5871
5872    /**
5873     * Unsubscribes from zoom info event callback.
5874     *
5875     * @param { 'smoothZoomInfoAvailable' } type - Event type.
5876     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
5877     * @throws { BusinessError } 202 - Not System Application.
5878     * @syscap SystemCapability.Multimedia.Camera.Core
5879     * @systemapi
5880     * @since 12
5881     */
5882    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
5883  }
5884
5885  /**
5886   * ManualExposure Query object.
5887   *
5888   * @interface ManualExposureQuery
5889   * @syscap SystemCapability.Multimedia.Camera.Core
5890   * @systemapi
5891   * @since 12
5892   */
5893  interface ManualExposureQuery {
5894    /**
5895     * Gets the supported manual exposure range.
5896     *
5897     * @returns { Array<number> } The array of manual exposure range.
5898     * @throws { BusinessError } 202 - Not System Application.
5899     * @throws { BusinessError } 7400103 - Session not config.
5900     * @syscap SystemCapability.Multimedia.Camera.Core
5901     * @systemapi
5902     * @since 11
5903     */
5904    /**
5905     * Gets the supported manual exposure range.
5906     * Move to ManualExposureQuery from ManualExposure since 12.
5907     *
5908     * @returns { Array<number> } The array of manual exposure range.
5909     * @throws { BusinessError } 202 - Not System Application.
5910     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5911     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
5912     * @syscap SystemCapability.Multimedia.Camera.Core
5913     * @systemapi
5914     * @since 12
5915     */
5916    getSupportedExposureRange(): Array<number>;
5917  }
5918
5919  /**
5920   * ManualExposure object.
5921   *
5922   * @interface ManualExposure
5923   * @syscap SystemCapability.Multimedia.Camera.Core
5924   * @systemapi
5925   * @since 11
5926   */
5927  interface ManualExposure extends ManualExposureQuery {
5928    /**
5929     * Gets current exposure value.
5930     *
5931     * @returns { number } The current exposure value.
5932     * @throws { BusinessError } 202 - Not System Application.
5933     * @throws { BusinessError } 7400103 - Session not config.
5934     * @syscap SystemCapability.Multimedia.Camera.Core
5935     * @systemapi
5936     * @since 11
5937     */
5938    /**
5939     * Gets current exposure value.
5940     *
5941     * @returns { number } The current exposure value.
5942     * @throws { BusinessError } 202 - Not System Application.
5943     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
5944     * @throws { BusinessError } 7400103 - Session not config.
5945     * @syscap SystemCapability.Multimedia.Camera.Core
5946     * @systemapi
5947     * @since 12
5948     */
5949    getExposure(): number;
5950
5951    /**
5952     * Sets Exposure value.
5953     *
5954     * @param { number } exposure - Exposure value
5955     * @throws { BusinessError } 202 - Not System Application.
5956     * @throws { BusinessError } 7400103 - Session not config.
5957     * @syscap SystemCapability.Multimedia.Camera.Core
5958     * @systemapi
5959     * @since 11
5960     */
5961    /**
5962     * Sets Exposure value.
5963     *
5964     * @param { number } exposure - Exposure value
5965     * @throws { BusinessError } 202 - Not System Application.
5966     * @throws { BusinessError } 7400102 - Operation not allowed.
5967     * @throws { BusinessError } 7400103 - Session not config.
5968     * @syscap SystemCapability.Multimedia.Camera.Core
5969     * @systemapi
5970     * @since 12
5971     */
5972    setExposure(exposure: number): void;
5973  }
5974
5975  /**
5976   * Night photo session object.
5977   *
5978   * @interface NightPhotoSession
5979   * @syscap SystemCapability.Multimedia.Camera.Core
5980   * @systemapi
5981   * @since 11
5982   */
5983  interface NightPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Beauty, ColorManagement, ManualExposure {
5984    /**
5985     * Subscribes to error events.
5986     *
5987     * @param { 'error' } type - Event type.
5988     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
5989     * @syscap SystemCapability.Multimedia.Camera.Core
5990     * @systemapi
5991     * @since 11
5992     */
5993    on(type: 'error', callback: ErrorCallback): void;
5994
5995    /**
5996     * Unsubscribes from error events.
5997     *
5998     * @param { 'error' } type - Event type.
5999     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6000     * @syscap SystemCapability.Multimedia.Camera.Core
6001     * @systemapi
6002     * @since 11
6003     */
6004    off(type: 'error', callback?: ErrorCallback): void;
6005
6006    /**
6007     * Subscribes focus state change event callback.
6008     *
6009     * @param { 'focusStateChange' } type - Event type.
6010     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6011     * @syscap SystemCapability.Multimedia.Camera.Core
6012     * @systemapi
6013     * @since 11
6014     */
6015    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6016
6017    /**
6018     * Unsubscribes from focus state change event callback.
6019     *
6020     * @param { 'focusStateChange' } type - Event type.
6021     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6022     * @syscap SystemCapability.Multimedia.Camera.Core
6023     * @systemapi
6024     * @since 11
6025     */
6026    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6027
6028    /**
6029     * Subscribes zoom info event callback.
6030     *
6031     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6032     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6033     * @syscap SystemCapability.Multimedia.Camera.Core
6034     * @systemapi
6035     * @since 11
6036     */
6037    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6038
6039    /**
6040     * Unsubscribes from zoom info event callback.
6041     *
6042     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6043     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6044     * @syscap SystemCapability.Multimedia.Camera.Core
6045     * @systemapi
6046     * @since 11
6047     */
6048    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6049
6050    /**
6051     * Subscribes to lcd flash status.
6052     *
6053     * @param { 'lcdFlashStatus' } type - Event type.
6054     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
6055     * @throws { BusinessError } 202 - Not System Application.
6056     * @syscap SystemCapability.Multimedia.Camera.Core
6057     * @systemapi
6058     * @since 12
6059     */
6060    on(type: 'lcdFlashStatus', callback: AsyncCallback<LcdFlashStatus>): void;
6061
6062    /**
6063     * Unsubscribes from lcd flash status.
6064     *
6065     * @param { 'lcdFlashStatus' } type - Event type.
6066     * @param { AsyncCallback<LcdFlashStatus> } callback - Callback used to get the lcd flash status.
6067     * @throws { BusinessError } 202 - Not System Application.
6068     * @syscap SystemCapability.Multimedia.Camera.Core
6069     * @systemapi
6070     * @since 12
6071     */
6072    off(type: 'lcdFlashStatus', callback?: AsyncCallback<LcdFlashStatus>): void;
6073  }
6074
6075  /**
6076   * ISO info object
6077   *
6078   * @typedef IsoInfo
6079   * @syscap SystemCapability.Multimedia.Camera.Core
6080   * @systemapi
6081   * @since 12
6082   */
6083  interface IsoInfo {
6084    /**
6085     * ISO value.
6086     *
6087     * @type { ?number }
6088     * @readonly
6089     * @syscap SystemCapability.Multimedia.Camera.Core
6090     * @systemapi
6091     * @since 12
6092     */
6093    readonly iso?: number;
6094  }
6095
6096  /**
6097   * Exposure info object
6098   *
6099   * @typedef ExposureInfo
6100   * @syscap SystemCapability.Multimedia.Camera.Core
6101   * @systemapi
6102   * @since 12
6103   */
6104  interface ExposureInfo {
6105    /**
6106     * Exposure time value.
6107     *
6108     * @type { ?number }
6109     * @readonly
6110     * @syscap SystemCapability.Multimedia.Camera.Core
6111     * @systemapi
6112     * @since 12
6113     */
6114    readonly exposureTime?: number;
6115  }
6116
6117  /**
6118   * Aperture info object
6119   *
6120   * @typedef ApertureInfo
6121   * @syscap SystemCapability.Multimedia.Camera.Core
6122   * @systemapi
6123   * @since 12
6124   */
6125  interface ApertureInfo {
6126    /**
6127     * Aperture value.
6128     *
6129     * @type { ?number }
6130     * @readonly
6131     * @syscap SystemCapability.Multimedia.Camera.Core
6132     * @systemapi
6133     * @since 12
6134     */
6135    readonly aperture?: number;
6136  }
6137
6138  /**
6139   * Lumination info object
6140   *
6141   * @typedef LuminationInfo
6142   * @syscap SystemCapability.Multimedia.Camera.Core
6143   * @systemapi
6144   * @since 12
6145   */
6146  interface LuminationInfo {
6147    /**
6148     * Lumination value.
6149     *
6150     * @type { ?number }
6151     * @readonly
6152     * @syscap SystemCapability.Multimedia.Camera.Core
6153     * @systemapi
6154     * @since 12
6155     */
6156    readonly lumination?: number;
6157  }
6158
6159  /**
6160   * Professional photo session object.
6161   *
6162   * @interface ProfessionalPhotoSession
6163   * @syscap SystemCapability.Multimedia.Camera.Core
6164   * @systemapi
6165   * @since 12
6166   */
6167  interface ProfessionalPhotoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
6168    /**
6169     * Subscribes to error events.
6170     *
6171     * @param { 'error' } type - Event type.
6172     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6173     * @throws { BusinessError } 202 - Not System Application.
6174     * @syscap SystemCapability.Multimedia.Camera.Core
6175     * @systemapi
6176     * @since 12
6177     */
6178    on(type: 'error', callback: ErrorCallback): void;
6179
6180    /**
6181     * Unsubscribes from error events.
6182     *
6183     * @param { 'error' } type - Event type.
6184     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6185     * @throws { BusinessError } 202 - Not System Application.
6186     * @syscap SystemCapability.Multimedia.Camera.Core
6187     * @systemapi
6188     * @since 12
6189     */
6190    off(type: 'error', callback?: ErrorCallback): void;
6191
6192    /**
6193     * Subscribes focus state change event callback.
6194     *
6195     * @param { 'focusStateChange' } type - Event type.
6196     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6197     * @throws { BusinessError } 202 - Not System Application.
6198     * @syscap SystemCapability.Multimedia.Camera.Core
6199     * @systemapi
6200     * @since 12
6201     */
6202    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6203
6204    /**
6205     * Unsubscribes from focus state change event callback.
6206     *
6207     * @param { 'focusStateChange' } type - Event type.
6208     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6209     * @throws { BusinessError } 202 - Not System Application.
6210     * @syscap SystemCapability.Multimedia.Camera.Core
6211     * @systemapi
6212     * @since 12
6213     */
6214    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6215
6216    /**
6217     * Subscribes zoom info event callback.
6218     *
6219     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6220     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6221     * @throws { BusinessError } 202 - Not System Application.
6222     * @syscap SystemCapability.Multimedia.Camera.Core
6223     * @systemapi
6224     * @since 12
6225     */
6226    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6227
6228    /**
6229     * Unsubscribes from zoom info event callback.
6230     *
6231     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6232     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6233     * @throws { BusinessError } 202 - Not System Application.
6234     * @syscap SystemCapability.Multimedia.Camera.Core
6235     * @systemapi
6236     * @since 12
6237     */
6238    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6239
6240    /**
6241     * Subscribes ISO info event callback.
6242     *
6243     * @param { 'isoInfoChange' } type - Event type.
6244     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
6245     * @throws { BusinessError } 202 - Not System Application.
6246     * @syscap SystemCapability.Multimedia.Camera.Core
6247     * @systemapi
6248     * @since 12
6249     */
6250    on(type: 'isoInfoChange', callback: AsyncCallback<IsoInfo>): void;
6251
6252    /**
6253     * Unsubscribes from ISO info event callback.
6254     *
6255     * @param { 'isoInfoChange' } type - Event type.
6256     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
6257     * @throws { BusinessError } 202 - Not System Application.
6258     * @syscap SystemCapability.Multimedia.Camera.Core
6259     * @systemapi
6260     * @since 12
6261     */
6262    off(type: 'isoInfoChange', callback?: AsyncCallback<IsoInfo>): void;
6263
6264    /**
6265     * Subscribes exposure info event callback.
6266     *
6267     * @param { 'exposureInfoChange' } type - Event type.
6268     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6269     * @throws { BusinessError } 202 - Not System Application.
6270     * @syscap SystemCapability.Multimedia.Camera.Core
6271     * @systemapi
6272     * @since 12
6273     */
6274    on(type: 'exposureInfoChange', callback: AsyncCallback<ExposureInfo>): void;
6275
6276    /**
6277     * Unsubscribes from exposure info event callback.
6278     *
6279     * @param { 'exposureInfoChange' } type - Event type.
6280     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6281     * @throws { BusinessError } 202 - Not System Application.
6282     * @syscap SystemCapability.Multimedia.Camera.Core
6283     * @systemapi
6284     * @since 12
6285     */
6286    off(type: 'exposureInfoChange', callback?: AsyncCallback<ExposureInfo>): void;
6287
6288    /**
6289     * Subscribes aperture info event callback.
6290     *
6291     * @param { 'apertureInfoChange' } type - Event type.
6292     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6293     * @throws { BusinessError } 202 - Not System Application.
6294     * @syscap SystemCapability.Multimedia.Camera.Core
6295     * @systemapi
6296     * @since 12
6297     */
6298    on(type: 'apertureInfoChange', callback: AsyncCallback<ApertureInfo>): void;
6299
6300    /**
6301     * Unsubscribes from aperture info event callback.
6302     *
6303     * @param { 'apertureInfoChange' } type - Event type.
6304     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6305     * @throws { BusinessError } 202 - Not System Application.
6306     * @syscap SystemCapability.Multimedia.Camera.Core
6307     * @systemapi
6308     * @since 12
6309     */
6310    off(type: 'apertureInfoChange', callback?: AsyncCallback<ApertureInfo>): void;
6311
6312    /**
6313     * Subscribes lumination info event callback.
6314     *
6315     * @param { 'luminationInfoChange' } type - Event type.
6316     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6317     * @throws { BusinessError } 202 - Not System Application.
6318     * @syscap SystemCapability.Multimedia.Camera.Core
6319     * @systemapi
6320     * @since 12
6321     */
6322    on(type: 'luminationInfoChange', callback: AsyncCallback<LuminationInfo>): void;
6323
6324    /**
6325     * Unsubscribes from lumination info event callback.
6326     *
6327     * @param { 'luminationInfoChange' } type - Event type.
6328     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6329     * @throws { BusinessError } 202 - Not System Application.
6330     * @syscap SystemCapability.Multimedia.Camera.Core
6331     * @systemapi
6332     * @since 12
6333     */
6334    off(type: 'luminationInfoChange', callback?: AsyncCallback<LuminationInfo>): void;
6335  }
6336
6337  /**
6338   * Professional video session object.
6339   *
6340   * @interface ProfessionalVideoSession
6341   * @syscap SystemCapability.Multimedia.Camera.Core
6342   * @systemapi
6343   * @since 12
6344   */
6345  interface ProfessionalVideoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture {
6346    /**
6347     * Subscribes to error events.
6348     *
6349     * @param { 'error' } type - Event type.
6350     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6351     * @throws { BusinessError } 202 - Not System Application.
6352     * @syscap SystemCapability.Multimedia.Camera.Core
6353     * @systemapi
6354     * @since 12
6355     */
6356    on(type: 'error', callback: ErrorCallback): void;
6357
6358    /**
6359     * Unsubscribes from error events.
6360     *
6361     * @param { 'error' } type - Event type.
6362     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6363     * @throws { BusinessError } 202 - Not System Application.
6364     * @syscap SystemCapability.Multimedia.Camera.Core
6365     * @systemapi
6366     * @since 12
6367     */
6368    off(type: 'error', callback?: ErrorCallback): void;
6369
6370    /**
6371     * Subscribes focus state change event callback.
6372     *
6373     * @param { 'focusStateChange' } type - Event type.
6374     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6375     * @throws { BusinessError } 202 - Not System Application.
6376     * @syscap SystemCapability.Multimedia.Camera.Core
6377     * @systemapi
6378     * @since 12
6379     */
6380    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6381
6382    /**
6383     * Unsubscribes from focus state change event callback.
6384     *
6385     * @param { 'focusStateChange' } type - Event type.
6386     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6387     * @throws { BusinessError } 202 - Not System Application.
6388     * @syscap SystemCapability.Multimedia.Camera.Core
6389     * @systemapi
6390     * @since 12
6391     */
6392    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6393
6394    /**
6395     * Subscribes zoom info event callback.
6396     *
6397     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6398     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6399     * @throws { BusinessError } 202 - Not System Application.
6400     * @syscap SystemCapability.Multimedia.Camera.Core
6401     * @systemapi
6402     * @since 12
6403     */
6404    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6405
6406    /**
6407     * Unsubscribes from zoom info event callback.
6408     *
6409     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6410     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6411     * @throws { BusinessError } 202 - Not System Application.
6412     * @syscap SystemCapability.Multimedia.Camera.Core
6413     * @systemapi
6414     * @since 12
6415     */
6416    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6417
6418    /**
6419     * Subscribes ISO info event callback.
6420     *
6421     * @param { 'isoInfoChange' } type - Event type.
6422     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
6423     * @throws { BusinessError } 202 - Not System Application.
6424     * @syscap SystemCapability.Multimedia.Camera.Core
6425     * @systemapi
6426     * @since 12
6427     */
6428    on(type: 'isoInfoChange', callback: AsyncCallback<IsoInfo>): void;
6429
6430    /**
6431     * Unsubscribes from ISO info event callback.
6432     *
6433     * @param { 'isoInfoChange' } type - Event type.
6434     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
6435     * @throws { BusinessError } 202 - Not System Application.
6436     * @syscap SystemCapability.Multimedia.Camera.Core
6437     * @systemapi
6438     * @since 12
6439     */
6440    off(type: 'isoInfoChange', callback?: AsyncCallback<IsoInfo>): void;
6441
6442    /**
6443     * Subscribes exposure info event callback.
6444     *
6445     * @param { 'exposureInfoChange' } type - Event type.
6446     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6447     * @throws { BusinessError } 202 - Not System Application.
6448     * @syscap SystemCapability.Multimedia.Camera.Core
6449     * @systemapi
6450     * @since 12
6451     */
6452    on(type: 'exposureInfoChange', callback: AsyncCallback<ExposureInfo>): void;
6453
6454    /**
6455     * Unsubscribes from exposure info event callback.
6456     *
6457     * @param { 'exposureInfoChange' } type - Event type.
6458     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
6459     * @throws { BusinessError } 202 - Not System Application.
6460     * @syscap SystemCapability.Multimedia.Camera.Core
6461     * @systemapi
6462     * @since 12
6463     */
6464    off(type: 'exposureInfoChange', callback?: AsyncCallback<ExposureInfo>): void;
6465
6466    /**
6467     * Subscribes aperture info event callback.
6468     *
6469     * @param { 'apertureInfoChange' } type - Event type.
6470     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6471     * @throws { BusinessError } 202 - Not System Application.
6472     * @syscap SystemCapability.Multimedia.Camera.Core
6473     * @systemapi
6474     * @since 12
6475     */
6476    on(type: 'apertureInfoChange', callback: AsyncCallback<ApertureInfo>): void;
6477
6478    /**
6479     * Unsubscribes from aperture info event callback.
6480     *
6481     * @param { 'apertureInfoChange' } type - Event type.
6482     * @param { AsyncCallback<ApertureInfo> } callback - Callback used to get the aperture info.
6483     * @throws { BusinessError } 202 - Not System Application.
6484     * @syscap SystemCapability.Multimedia.Camera.Core
6485     * @systemapi
6486     * @since 12
6487     */
6488    off(type: 'apertureInfoChange', callback?: AsyncCallback<ApertureInfo>): void;
6489
6490    /**
6491     * Subscribes lumination info event callback.
6492     *
6493     * @param { 'luminationInfoChange' } type - Event type.
6494     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6495     * @throws { BusinessError } 202 - Not System Application.
6496     * @syscap SystemCapability.Multimedia.Camera.Core
6497     * @systemapi
6498     * @since 12
6499     */
6500    on(type: 'luminationInfoChange', callback: AsyncCallback<LuminationInfo>): void;
6501
6502    /**
6503     * Unsubscribes from lumination info event callback.
6504     *
6505     * @param { 'luminationInfoChange' } type - Event type.
6506     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
6507     * @throws { BusinessError } 202 - Not System Application.
6508     * @syscap SystemCapability.Multimedia.Camera.Core
6509     * @systemapi
6510     * @since 12
6511     */
6512    off(type: 'luminationInfoChange', callback?: AsyncCallback<LuminationInfo>): void;
6513  }
6514
6515  /**
6516   * Enum for slow motion status.
6517   *
6518   * @enum { number }
6519   * @syscap SystemCapability.Multimedia.Camera.Core
6520   * @systemapi
6521   * @since 12
6522   */
6523  enum SlowMotionStatus {
6524    /**
6525     * Slow motion disabled.
6526     *
6527     * @syscap SystemCapability.Multimedia.Camera.Core
6528     * @systemapi
6529     * @since 12
6530     */
6531    DISABLED = 0,
6532
6533    /**
6534     * Slow motion ready.
6535     *
6536     * @syscap SystemCapability.Multimedia.Camera.Core
6537     * @systemapi
6538     * @since 12
6539     */
6540    READY = 1,
6541
6542    /**
6543     * Slow motion video start.
6544     *
6545     * @syscap SystemCapability.Multimedia.Camera.Core
6546     * @systemapi
6547     * @since 12
6548     */
6549    VIDEO_START = 2,
6550
6551    /**
6552     * Slow motion video done.
6553     *
6554     * @syscap SystemCapability.Multimedia.Camera.Core
6555     * @systemapi
6556     * @since 12
6557     */
6558    VIDEO_DONE = 3,
6559
6560    /**
6561     * Slow motion finished.
6562     *
6563     * @syscap SystemCapability.Multimedia.Camera.Core
6564     * @systemapi
6565     * @since 12
6566     */
6567    FINISHED = 4
6568  }
6569
6570  /**
6571   * Slow motion video session object.
6572   *
6573   * @interface SlowMotionVideoSession
6574   * @syscap SystemCapability.Multimedia.Camera.Core
6575   * @systemapi
6576   * @since 12
6577   */
6578  interface SlowMotionVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect {
6579    /**
6580     * Subscribes to error events.
6581     *
6582     * @param { 'error' } type - Event type.
6583     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6584     * @throws { BusinessError } 202 - Not System Application.
6585     * @syscap SystemCapability.Multimedia.Camera.Core
6586     * @systemapi
6587     * @since 12
6588     */
6589    on(type: 'error', callback: ErrorCallback): void;
6590
6591    /**
6592     * Unsubscribes from error events.
6593     *
6594     * @param { 'error' } type - Event type.
6595     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6596     * @throws { BusinessError } 202 - Not System Application.
6597     * @syscap SystemCapability.Multimedia.Camera.Core
6598     * @systemapi
6599     * @since 12
6600     */
6601    off(type: 'error', callback?: ErrorCallback): void;
6602
6603    /**
6604     * Subscribes focus state change event callback.
6605     *
6606     * @param { 'focusStateChange' } type - Event type.
6607     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6608     * @throws { BusinessError } 202 - Not System Application.
6609     * @syscap SystemCapability.Multimedia.Camera.Core
6610     * @systemapi
6611     * @since 12
6612     */
6613    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6614
6615    /**
6616     * Unsubscribes from focus state change event callback.
6617     *
6618     * @param { 'focusStateChange' } type - Event type.
6619     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6620     * @throws { BusinessError } 202 - Not System Application.
6621     * @syscap SystemCapability.Multimedia.Camera.Core
6622     * @systemapi
6623     * @since 12
6624     */
6625    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6626
6627    /**
6628     * Subscribes zoom info event callback.
6629     *
6630     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6631     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6632     * @throws { BusinessError } 202 - Not System Application.
6633     * @syscap SystemCapability.Multimedia.Camera.Core
6634     * @systemapi
6635     * @since 12
6636     */
6637    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6638
6639    /**
6640     * Unsubscribes from zoom info event callback.
6641     *
6642     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6643     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6644     * @throws { BusinessError } 202 - Not System Application.
6645     * @syscap SystemCapability.Multimedia.Camera.Core
6646     * @systemapi
6647     * @since 12
6648     */
6649    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6650
6651    /**
6652     * Determine whether camera slow motion detection is supported.
6653     *
6654     * @returns { boolean } Is camera slow motion detection supported.
6655     * @throws { BusinessError } 202 - Not System Application.
6656     * @throws { BusinessError } 7400103 - Session not config.
6657     * @syscap SystemCapability.Multimedia.Camera.Core
6658     * @systemapi
6659     * @since 12
6660     */
6661    isSlowMotionDetectionSupported(): boolean;
6662
6663    /**
6664     * Set slow motion detection area.
6665     *
6666     * @param { Rect } area - Detection area.
6667     * @throws { BusinessError } 202 - Not System Application.
6668     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6669     * @throws { BusinessError } 7400103 - Session not config.
6670     * @syscap SystemCapability.Multimedia.Camera.Core
6671     * @systemapi
6672     * @since 12
6673     */
6674    setSlowMotionDetectionArea(area: Rect): void;
6675
6676    /**
6677     * Subscribes slow motion status callback.
6678     *
6679     * @param { 'slowMotionStatus' } type - Event type.
6680     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6681     * @throws { BusinessError } 202 - Not System Application.
6682     * @syscap SystemCapability.Multimedia.Camera.Core
6683     * @systemapi
6684     * @since 12
6685     */
6686    on(type: 'slowMotionStatus', callback: AsyncCallback<SlowMotionStatus>): void;
6687
6688    /**
6689     * Unsubscribes slow motion status callback.
6690     *
6691     * @param { 'slowMotionStatus' } type - Event type.
6692     * @param { AsyncCallback<SlowMotionStatus> } callback - Callback used to get the slow motion status.
6693     * @throws { BusinessError } 202 - Not System Application.
6694     * @syscap SystemCapability.Multimedia.Camera.Core
6695     * @systemapi
6696     * @since 12
6697     */
6698    off(type: 'slowMotionStatus', callback?: AsyncCallback<SlowMotionStatus>): void;
6699  }
6700
6701  /**
6702   * High resolution session object.
6703   *
6704   * @interface HighResolutionPhotoSession
6705   * @syscap SystemCapability.Multimedia.Camera.Core
6706   * @systemapi
6707   * @since 12
6708   */
6709  interface HighResolutionPhotoSession extends Session, AutoExposure, Focus {
6710    /**
6711     * Subscribes to error events.
6712     *
6713     * @param { 'error' } type - Event type.
6714     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6715     * @throws { BusinessError } 202 - Not System Application.
6716     * @syscap SystemCapability.Multimedia.Camera.Core
6717     * @systemapi
6718     * @since 12
6719     */
6720    on(type: 'error', callback: ErrorCallback): void;
6721
6722    /**
6723     * Unsubscribes from error events.
6724     *
6725     * @param { 'error' } type - Event type.
6726     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6727     * @throws { BusinessError } 202 - Not System Application.
6728     * @syscap SystemCapability.Multimedia.Camera.Core
6729     * @systemapi
6730     * @since 12
6731     */
6732    off(type: 'error', callback?: ErrorCallback): void;
6733
6734    /**
6735     * Subscribes focus state change event callback.
6736     *
6737     * @param { 'focusStateChange' } type - Event type.
6738     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6739     * @throws { BusinessError } 202 - Not System Application.
6740     * @syscap SystemCapability.Multimedia.Camera.Core
6741     * @systemapi
6742     * @since 12
6743     */
6744    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6745
6746    /**
6747     * Unsubscribes from focus state change event callback.
6748     *
6749     * @param { 'focusStateChange' } type - Event type.
6750     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6751     * @throws { BusinessError } 202 - Not System Application.
6752     * @syscap SystemCapability.Multimedia.Camera.Core
6753     * @systemapi
6754     * @since 12
6755     */
6756    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6757  }
6758
6759  /**
6760   * Macro photo session object.
6761   *
6762   * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus
6763   * @interface MacroPhotoSession
6764   * @syscap SystemCapability.Multimedia.Camera.Core
6765   * @systemapi
6766   * @since 12
6767   */
6768  /**
6769   * Macro photo session object.
6770   *
6771   * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion
6772   * @interface MacroPhotoSession
6773   * @syscap SystemCapability.Multimedia.Camera.Core
6774   * @systemapi
6775   * @since 14
6776   */
6777  interface MacroPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion {
6778    /**
6779     * Subscribes to error events.
6780     *
6781     * @param { 'error' } type - Event type.
6782     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6783     * @throws { BusinessError } 202 - Not System Application.
6784     * @syscap SystemCapability.Multimedia.Camera.Core
6785     * @systemapi
6786     * @since 12
6787     */
6788    on(type: 'error', callback: ErrorCallback): void;
6789
6790    /**
6791     * Unsubscribes from error events.
6792     *
6793     * @param { 'error' } type - Event type.
6794     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6795     * @throws { BusinessError } 202 - Not System Application.
6796     * @syscap SystemCapability.Multimedia.Camera.Core
6797     * @systemapi
6798     * @since 12
6799     */
6800    off(type: 'error', callback?: ErrorCallback): void;
6801
6802    /**
6803     * Subscribes focus state change event callback.
6804     *
6805     * @param { 'focusStateChange' } type - Event type.
6806     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6807     * @throws { BusinessError } 202 - Not System Application.
6808     * @syscap SystemCapability.Multimedia.Camera.Core
6809     * @systemapi
6810     * @since 12
6811     */
6812    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6813
6814    /**
6815     * Unsubscribes from focus state change event callback.
6816     *
6817     * @param { 'focusStateChange' } type - Event type.
6818     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6819     * @throws { BusinessError } 202 - Not System Application.
6820     * @syscap SystemCapability.Multimedia.Camera.Core
6821     * @systemapi
6822     * @since 12
6823     */
6824    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6825
6826    /**
6827     * Subscribes zoom info event callback.
6828     *
6829     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6830     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6831     * @throws { BusinessError } 202 - Not System Application.
6832     * @syscap SystemCapability.Multimedia.Camera.Core
6833     * @systemapi
6834     * @since 12
6835     */
6836    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6837
6838    /**
6839     * Unsubscribes from zoom info event callback.
6840     *
6841     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6842     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6843     * @throws { BusinessError } 202 - Not System Application.
6844     * @syscap SystemCapability.Multimedia.Camera.Core
6845     * @systemapi
6846     * @since 12
6847     */
6848    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6849  }
6850
6851  /**
6852   * Macro video session object.
6853   *
6854   * @interface MacroVideoSession
6855   * @syscap SystemCapability.Multimedia.Camera.Core
6856   * @systemapi
6857   * @since 12
6858   */
6859  interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus {
6860    /**
6861     * Subscribes to error events.
6862     *
6863     * @param { 'error' } type - Event type.
6864     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6865     * @throws { BusinessError } 202 - Not System Application.
6866     * @syscap SystemCapability.Multimedia.Camera.Core
6867     * @systemapi
6868     * @since 12
6869     */
6870    on(type: 'error', callback: ErrorCallback): void;
6871
6872    /**
6873     * Unsubscribes from error events.
6874     *
6875     * @param { 'error' } type - Event type.
6876     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6877     * @throws { BusinessError } 202 - Not System Application.
6878     * @syscap SystemCapability.Multimedia.Camera.Core
6879     * @systemapi
6880     * @since 12
6881     */
6882    off(type: 'error', callback?: ErrorCallback): void;
6883
6884    /**
6885     * Subscribes focus state change event callback.
6886     *
6887     * @param { 'focusStateChange' } type - Event type.
6888     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6889     * @throws { BusinessError } 202 - Not System Application.
6890     * @syscap SystemCapability.Multimedia.Camera.Core
6891     * @systemapi
6892     * @since 12
6893     */
6894    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6895
6896    /**
6897     * Unsubscribes from focus state change event callback.
6898     *
6899     * @param { 'focusStateChange' } type - Event type.
6900     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6901     * @throws { BusinessError } 202 - Not System Application.
6902     * @syscap SystemCapability.Multimedia.Camera.Core
6903     * @systemapi
6904     * @since 12
6905     */
6906    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6907
6908    /**
6909     * Subscribes zoom info event callback.
6910     *
6911     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6912     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6913     * @throws { BusinessError } 202 - Not System Application.
6914     * @syscap SystemCapability.Multimedia.Camera.Core
6915     * @systemapi
6916     * @since 12
6917     */
6918    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
6919
6920    /**
6921     * Unsubscribes from zoom info event callback.
6922     *
6923     * @param { 'smoothZoomInfoAvailable' } type - Event type.
6924     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
6925     * @throws { BusinessError } 202 - Not System Application.
6926     * @syscap SystemCapability.Multimedia.Camera.Core
6927     * @systemapi
6928     * @since 12
6929     */
6930    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
6931  }
6932
6933  /**
6934   * Secure camera session object.
6935   *
6936   * @interface SecureSession
6937   * @syscap SystemCapability.Multimedia.Camera.Core
6938   * @since 12
6939   */
6940  interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom {
6941    /**
6942     * Add Secure output for camera.
6943     *
6944     * @param { PreviewOutput } previewOutput - Specify the output as a secure flow.
6945     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
6946     * @throws { BusinessError } 7400102 - Operation not allowed.
6947     * @throws { BusinessError } 7400103 - Session not config.
6948     * @syscap SystemCapability.Multimedia.Camera.Core
6949     * @since 12
6950     */
6951    addSecureOutput(previewOutput: PreviewOutput): void;
6952
6953    /**
6954     * Subscribes to error events.
6955     *
6956     * @param { 'error' } type - Event type.
6957     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6958     * @syscap SystemCapability.Multimedia.Camera.Core
6959     * @since 12
6960     */
6961    on(type: 'error', callback: ErrorCallback): void;
6962
6963    /**
6964     * Unsubscribes from error events.
6965     *
6966     * @param { 'error' } type - Event type.
6967     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
6968     * @syscap SystemCapability.Multimedia.Camera.Core
6969     * @since 12
6970     */
6971    off(type: 'error', callback?: ErrorCallback): void;
6972
6973    /**
6974     * Subscribes focus status change event callback.
6975     *
6976     * @param { 'focusStateChange' } type - Event type.
6977     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6978     * @syscap SystemCapability.Multimedia.Camera.Core
6979     * @since 12
6980     */
6981    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
6982
6983    /**
6984     * Unsubscribes from focus status change event callback.
6985     *
6986     * @param { 'focusStateChange' } type - Event type.
6987     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
6988     * @syscap SystemCapability.Multimedia.Camera.Core
6989     * @since 12
6990     */
6991    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
6992  }
6993
6994  /**
6995   * Light painting photo session object.
6996   *
6997   * @interface LightPaintingPhotoSession
6998   * @extends Session, Flash, Focus, Zoom, ColorEffect
6999   * @syscap SystemCapability.Multimedia.Camera.Core
7000   * @systemapi
7001   * @since 12
7002   */
7003  interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect {
7004    /**
7005     * Subscribes to error events.
7006     *
7007     * @param { 'error' } type - Event type.
7008     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7009     * @throws { BusinessError } 202 - Not System Application.
7010     * @syscap SystemCapability.Multimedia.Camera.Core
7011     * @systemapi
7012     * @since 12
7013     */
7014    on(type: 'error', callback: ErrorCallback): void;
7015
7016    /**
7017     * Unsubscribes from error events.
7018     *
7019     * @param { 'error' } type - Event type.
7020     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7021     * @throws { BusinessError } 202 - Not System Application.
7022     * @syscap SystemCapability.Multimedia.Camera.Core
7023     * @systemapi
7024     * @since 12
7025     */
7026    off(type: 'error', callback?: ErrorCallback): void;
7027
7028    /**
7029     * Subscribes focus state change event callback.
7030     *
7031     * @param { 'focusStateChange' } type - Event type.
7032     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7033     * @throws { BusinessError } 202 - Not System Application.
7034     * @syscap SystemCapability.Multimedia.Camera.Core
7035     * @systemapi
7036     * @since 12
7037     */
7038    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
7039
7040    /**
7041     * Unsubscribes from focus state change event callback.
7042     *
7043     * @param { 'focusStateChange' } type - Event type.
7044     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7045     * @throws { BusinessError } 202 - Not System Application.
7046     * @syscap SystemCapability.Multimedia.Camera.Core
7047     * @systemapi
7048     * @since 12
7049     */
7050    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
7051
7052    /**
7053     * Subscribes zoom info event callback.
7054     *
7055     * @param { 'smoothZoomInfoAvailable' } type - Event type.
7056     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
7057     * @throws { BusinessError } 202 - Not System Application.
7058     * @syscap SystemCapability.Multimedia.Camera.Core
7059     * @systemapi
7060     * @since 12
7061     */
7062    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
7063
7064    /**
7065     * Unsubscribes from zoom info event callback.
7066     *
7067     * @param { 'smoothZoomInfoAvailable' } type - Event type.
7068     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
7069     * @throws { BusinessError } 202 - Not System Application.
7070     * @syscap SystemCapability.Multimedia.Camera.Core
7071     * @systemapi
7072     * @since 12
7073     */
7074    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
7075
7076    /**
7077     * Gets the light painting type in use.
7078     *
7079     * @returns { LightPaintingType } The light painting type in use.
7080     * @throws { BusinessError } 202 - Not System Application.
7081     * @throws { BusinessError } 7400103 - Session not config.
7082     * @syscap SystemCapability.Multimedia.Camera.Core
7083     * @systemapi
7084     * @since 12
7085     */
7086    getLightPaintingType(): LightPaintingType;
7087
7088    /**
7089     * Sets a light painting type for a camera device.
7090     *
7091     * @param { LightPaintingType } type - Light painting type to set.
7092     * @throws { BusinessError } 202 - Not System Application.
7093     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7094     * @throws { BusinessError } 7400103 - Session not config.
7095     * @syscap SystemCapability.Multimedia.Camera.Core
7096     * @systemapi
7097     * @since 12
7098     */
7099    setLightPaintingType(type: LightPaintingType): void;
7100
7101    /**
7102     * Gets supported light painting types.
7103     *
7104     * @returns { Array<LightPaintingType> } List of light painting types.
7105     * @throws { BusinessError } 202 - Not System Application.
7106     * @throws { BusinessError } 7400103 - Session not config.
7107     * @syscap SystemCapability.Multimedia.Camera.Core
7108     * @systemapi
7109     * @since 12
7110     */
7111    getSupportedLightPaintingTypes(): Array<LightPaintingType>;
7112  }
7113
7114  /**
7115   * Quick shot photo session object.
7116   *
7117   * @interface QuickShotPhotoSession
7118   * @extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom
7119   * @syscap SystemCapability.Multimedia.Camera.Core
7120   * @systemapi
7121   * @since 12
7122   */
7123  interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom {
7124    /**
7125     * Subscribes to error events.
7126     *
7127     * @param { 'error' } type - Event type.
7128     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7129     * @throws { BusinessError } 202 - Not System Application.
7130     * @syscap SystemCapability.Multimedia.Camera.Core
7131     * @systemapi
7132     * @since 12
7133     */
7134    on(type: 'error', callback: ErrorCallback): void;
7135
7136    /**
7137     * Unsubscribes from error events.
7138     *
7139     * @param { 'error' } type - Event type.
7140     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7141     * @throws { BusinessError } 202 - Not System Application.
7142     * @syscap SystemCapability.Multimedia.Camera.Core
7143     * @systemapi
7144     * @since 12
7145     */
7146    off(type: 'error', callback?: ErrorCallback): void;
7147
7148    /**
7149     * Subscribes to effect suggestion event callback.
7150     *
7151     * @param { 'effectSuggestionChange' } type - Event type.
7152     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
7153     * @throws { BusinessError } 202 - Not System Application.
7154     * @syscap SystemCapability.Multimedia.Camera.Core
7155     * @systemapi
7156     * @since 12
7157     */
7158    on(type: 'effectSuggestionChange', callback: AsyncCallback<EffectSuggestionType>): void;
7159
7160    /**
7161     * Unsubscribes from effect suggestion event callback.
7162     *
7163     * @param { 'effectSuggestionChange' } type - Event type.
7164     * @param { AsyncCallback<EffectSuggestionType> } callback - Callback used to return the result.
7165     * @throws { BusinessError } 202 - Not System Application.
7166     * @syscap SystemCapability.Multimedia.Camera.Core
7167     * @systemapi
7168     * @since 12
7169     */
7170    off(type: 'effectSuggestionChange', callback?: AsyncCallback<EffectSuggestionType>): void;
7171
7172    /**
7173     * Subscribes focus state change event callback.
7174     *
7175     * @param { 'focusStateChange' } type - Event type.
7176     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7177     * @throws { BusinessError } 202 - Not System Application.
7178     * @syscap SystemCapability.Multimedia.Camera.Core
7179     * @systemapi
7180     * @since 12
7181     */
7182    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
7183
7184    /**
7185     * Unsubscribes from focus state change event callback.
7186     *
7187     * @param { 'focusStateChange' } type - Event type.
7188     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7189     * @throws { BusinessError } 202 - Not System Application.
7190     * @syscap SystemCapability.Multimedia.Camera.Core
7191     * @systemapi
7192     * @since 12
7193     */
7194    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
7195
7196    /**
7197     * Subscribes zoom info event callback.
7198     *
7199     * @param { 'smoothZoomInfoAvailable' } type - Event type.
7200     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
7201     * @throws { BusinessError } 202 - Not System Application.
7202     * @syscap SystemCapability.Multimedia.Camera.Core
7203     * @systemapi
7204     * @since 12
7205     */
7206    on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback<SmoothZoomInfo>): void;
7207
7208    /**
7209     * Unsubscribes from zoom info event callback.
7210     *
7211     * @param { 'smoothZoomInfoAvailable' } type - Event type.
7212     * @param { AsyncCallback<SmoothZoomInfo> } callback - Callback used to get the zoom info.
7213     * @throws { BusinessError } 202 - Not System Application.
7214     * @syscap SystemCapability.Multimedia.Camera.Core
7215     * @systemapi
7216     * @since 12
7217     */
7218    off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback<SmoothZoomInfo>): void;
7219  }
7220
7221  /**
7222   * Panorama photo session object.
7223   *
7224   * @interface PanoramaPhotoSession
7225   * @extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect
7226   * @syscap SystemCapability.Multimedia.Camera.Core
7227   * @systemapi
7228   * @since 12
7229   */
7230  interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect {
7231    /**
7232     * Subscribes to error events.
7233     *
7234     * @param { 'error' } type - Event type.
7235     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7236     * @throws { BusinessError } 202 - Not System Application.
7237     * @syscap SystemCapability.Multimedia.Camera.Core
7238     * @systemapi
7239     * @since 12
7240     */
7241    on(type: 'error', callback: ErrorCallback): void;
7242
7243    /**
7244     * Unsubscribes from error events.
7245     *
7246     * @param { 'error' } type - Event type.
7247     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7248     * @throws { BusinessError } 202 - Not System Application.
7249     * @syscap SystemCapability.Multimedia.Camera.Core
7250     * @systemapi
7251     * @since 12
7252     */
7253    off(type: 'error', callback?: ErrorCallback): void;
7254
7255    /**
7256     * Subscribes focus state change event callback.
7257     *
7258     * @param { 'focusStateChange' } type - Event type.
7259     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7260     * @throws { BusinessError } 202 - Not System Application.
7261     * @syscap SystemCapability.Multimedia.Camera.Core
7262     * @systemapi
7263     * @since 12
7264     */
7265    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
7266
7267    /**
7268     * Unsubscribes from focus state change event callback.
7269     *
7270     * @param { 'focusStateChange' } type - Event type.
7271     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7272     * @throws { BusinessError } 202 - Not System Application.
7273     * @syscap SystemCapability.Multimedia.Camera.Core
7274     * @systemapi
7275     * @since 12
7276     */
7277    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
7278  }
7279
7280  /**
7281   * Fluorescence photo session object.
7282   *
7283   * @interface FluorescencePhotoSession
7284   * @syscap SystemCapability.Multimedia.Camera.Core
7285   * @systemapi
7286   * @since 13
7287   */
7288  interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom {
7289    /**
7290     * Subscribes to error events.
7291     *
7292     * @param { 'error' } type - Event type.
7293     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7294     * @throws { BusinessError } 202 - Not System Application.
7295     * @syscap SystemCapability.Multimedia.Camera.Core
7296     * @systemapi
7297     * @since 13
7298     */
7299    on(type: 'error', callback: ErrorCallback): void;
7300
7301    /**
7302     * Unsubscribes from error events.
7303     *
7304     * @param { 'error' } type - Event type.
7305     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
7306     * @throws { BusinessError } 202 - Not System Application.
7307     * @syscap SystemCapability.Multimedia.Camera.Core
7308     * @systemapi
7309     * @since 13
7310     */
7311    off(type: 'error', callback?: ErrorCallback): void;
7312
7313    /**
7314     * Subscribes focus state change event callback.
7315     *
7316     * @param { 'focusStateChange' } type - Event type.
7317     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7318     * @throws { BusinessError } 202 - Not System Application.
7319     * @syscap SystemCapability.Multimedia.Camera.Core
7320     * @systemapi
7321     * @since 13
7322     */
7323    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
7324
7325    /**
7326     * Unsubscribes from focus state change event callback.
7327     *
7328     * @param { 'focusStateChange' } type - Event type.
7329     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
7330     * @throws { BusinessError } 202 - Not System Application.
7331     * @syscap SystemCapability.Multimedia.Camera.Core
7332     * @systemapi
7333     * @since 13
7334     */
7335    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
7336  }
7337
7338  /**
7339   * Photo Functions object.
7340   *
7341   * @interface PhotoFunctions
7342   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
7343   * @syscap SystemCapability.Multimedia.Camera.Core
7344   * @systemapi
7345   * @since 13
7346   */
7347  interface PhotoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
7348  }
7349
7350  /**
7351   * Video Functions object.
7352   *
7353   * @interface VideoFunctions
7354   * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery
7355   * @syscap SystemCapability.Multimedia.Camera.Core
7356   * @systemapi
7357   * @since 13
7358   */
7359  interface VideoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery {
7360  }
7361
7362  /**
7363   * Portrait Photo Functions object.
7364   *
7365   * @interface PortraitPhotoFunctions
7366   * @extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery
7367   * @syscap SystemCapability.Multimedia.Camera.Core
7368   * @systemapi
7369   * @since 13
7370   */
7371  interface PortraitPhotoFunctions extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery {
7372  }
7373
7374  /**
7375   * Photo Conflict Functions object.
7376   *
7377   * @interface PhotoConflictFunctions
7378   * @extends ZoomQuery, MacroQuery
7379   * @syscap SystemCapability.Multimedia.Camera.Core
7380   * @systemapi
7381   * @since 13
7382   */
7383  interface PhotoConflictFunctions extends ZoomQuery, MacroQuery {
7384  }
7385
7386  /**
7387   * Video Conflict Functions object.
7388   *
7389   * @interface VideoConflictFunctions
7390   * @extends ZoomQuery, MacroQuery
7391   * @syscap SystemCapability.Multimedia.Camera.Core
7392   * @systemapi
7393   * @since 13
7394   */
7395  interface VideoConflictFunctions extends ZoomQuery, MacroQuery {
7396  }
7397
7398  /**
7399   * Portrait Photo Conflict Functions object.
7400   *
7401   * @interface PortraitPhotoFunctions
7402   * @extends ZoomQuery, PortraitQuery, ApertureQuery
7403   * @syscap SystemCapability.Multimedia.Camera.Core
7404   * @systemapi
7405   * @since 13
7406   */
7407  interface PortraitPhotoConflictFunctions extends ZoomQuery, PortraitQuery, ApertureQuery {
7408  }
7409
7410  /**
7411   * Camera output object.
7412   *
7413   * @interface CameraOutput
7414   * @syscap SystemCapability.Multimedia.Camera.Core
7415   * @since 10
7416   */
7417  interface CameraOutput {
7418    /**
7419     * Release output instance.
7420     *
7421     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7422     * @throws { BusinessError } 7400201 - Camera service fatal error.
7423     * @syscap SystemCapability.Multimedia.Camera.Core
7424     * @since 10
7425     */
7426    release(callback: AsyncCallback<void>): void;
7427
7428    /**
7429     * Release output instance.
7430     *
7431     * @returns { Promise<void> } Promise used to return the result.
7432     * @throws { BusinessError } 7400201 - Camera service fatal error.
7433     * @syscap SystemCapability.Multimedia.Camera.Core
7434     * @since 10
7435     */
7436    release(): Promise<void>;
7437  }
7438
7439  /**
7440   * SketchStatusData object
7441   *
7442   * @typedef SketchStatusData
7443   * @syscap SystemCapability.Multimedia.Camera.Core
7444   * @systemapi
7445   * @since 11
7446   */
7447  interface SketchStatusData {
7448    /**
7449     * Status of the sketch stream.
7450     * 0 is stop, and 1 is start.
7451     *
7452     * @type { number }
7453     * @syscap SystemCapability.Multimedia.Camera.Core
7454     * @systemapi
7455     * @since 11
7456     */
7457    status: number;
7458
7459    /**
7460     * The zoom ratio of the sketch stream.
7461     *
7462     * @type { number }
7463     * @syscap SystemCapability.Multimedia.Camera.Core
7464     * @systemapi
7465     * @since 11
7466     */
7467    sketchRatio: number;
7468  }
7469
7470  /**
7471   * Preview output object.
7472   *
7473   * @interface PreviewOutput
7474   * @syscap SystemCapability.Multimedia.Camera.Core
7475   * @since 10
7476   */
7477  interface PreviewOutput extends CameraOutput {
7478    /**
7479     * Start output instance.
7480     *
7481     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7482     * @throws { BusinessError } 7400103 - Session not config.
7483     * @syscap SystemCapability.Multimedia.Camera.Core
7484     * @since 10
7485     * @deprecated since 11
7486     * @useinstead ohos.multimedia.camera.Session#start
7487     */
7488    start(callback: AsyncCallback<void>): void;
7489
7490    /**
7491     * Start output instance.
7492     *
7493     * @returns { Promise<void> } Promise used to return the result.
7494     * @throws { BusinessError } 7400103 - Session not config.
7495     * @syscap SystemCapability.Multimedia.Camera.Core
7496     * @since 10
7497     * @deprecated since 11
7498     * @useinstead ohos.multimedia.camera.Session#start
7499     */
7500    start(): Promise<void>;
7501
7502    /**
7503     * Stop output instance.
7504     *
7505     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7506     * @syscap SystemCapability.Multimedia.Camera.Core
7507     * @since 10
7508     * @deprecated since 11
7509     * @useinstead ohos.multimedia.camera.Session#stop
7510     */
7511    stop(callback: AsyncCallback<void>): void;
7512
7513    /**
7514     * Stop output instance.
7515     *
7516     * @returns { Promise<void> } Promise used to return the result.
7517     * @syscap SystemCapability.Multimedia.Camera.Core
7518     * @since 10
7519     * @deprecated since 11
7520     * @useinstead ohos.multimedia.camera.Session#stop
7521     */
7522    stop(): Promise<void>;
7523
7524    /**
7525     * Subscribes frame start event callback.
7526     *
7527     * @param { 'frameStart' } type - Event type.
7528     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7529     * @syscap SystemCapability.Multimedia.Camera.Core
7530     * @since 10
7531     */
7532    on(type: 'frameStart', callback: AsyncCallback<void>): void;
7533
7534    /**
7535     * Unsubscribes from frame start event callback.
7536     *
7537     * @param { 'frameStart' } type - Event type.
7538     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7539     * @syscap SystemCapability.Multimedia.Camera.Core
7540     * @since 10
7541     */
7542    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
7543
7544    /**
7545     * Subscribes frame end event callback.
7546     *
7547     * @param { 'frameEnd' } type - Event type.
7548     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7549     * @syscap SystemCapability.Multimedia.Camera.Core
7550     * @since 10
7551     */
7552    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
7553
7554    /**
7555     * Unsubscribes from frame end event callback.
7556     *
7557     * @param { 'frameEnd' } type - Event type.
7558     * @param { AsyncCallback<void> } callback - Callback used to return the result.
7559     * @syscap SystemCapability.Multimedia.Camera.Core
7560     * @since 10
7561     */
7562    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
7563
7564    /**
7565     * Subscribes to error events.
7566     *
7567     * @param { 'error' } type - Event type.
7568     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7569     * @syscap SystemCapability.Multimedia.Camera.Core
7570     * @since 10
7571     */
7572    on(type: 'error', callback: ErrorCallback): void;
7573
7574    /**
7575     * Unsubscribes from error events.
7576     *
7577     * @param { 'error' } type - Event type.
7578     * @param { ErrorCallback } callback - Callback used to get the preview output errors.
7579     * @syscap SystemCapability.Multimedia.Camera.Core
7580     * @since 10
7581     */
7582    off(type: 'error', callback?: ErrorCallback): void;
7583
7584    /**
7585     * Get supported frame rates which can be set during session running.
7586     *
7587     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
7588     * @syscap SystemCapability.Multimedia.Camera.Core
7589     * @since 12
7590     */
7591    getSupportedFrameRates(): Array<FrameRateRange>
7592
7593    /**
7594     * Set a frame rate range.
7595     *
7596     * @param { number } minFps - Minimum frame rate per second.
7597     * @param { number } maxFps - Maximum frame rate per second.
7598     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7599     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
7600     * @syscap SystemCapability.Multimedia.Camera.Core
7601     * @since 12
7602     */
7603    setFrameRate(minFps: number, maxFps: number): void
7604
7605    /**
7606     * Get active frame rate range which has been set before.
7607     *
7608     * @returns { FrameRateRange } The active frame rate range.
7609     * @syscap SystemCapability.Multimedia.Camera.Core
7610     * @since 12
7611     */
7612    getActiveFrameRate(): FrameRateRange;
7613
7614    /**
7615     * Gets the current preconfig type if you had already call preconfig interface.
7616     *
7617     * @returns { Profile } The current preconfig type.
7618     * @throws { BusinessError } 7400201 - Camera service fatal error.
7619     * @syscap SystemCapability.Multimedia.Camera.Core
7620     * @since 12
7621     */
7622    getActiveProfile(): Profile;
7623
7624    /**
7625     * Gets the preview rotation angle.
7626     *
7627     * @param { number } displayRotation - The current display rotation angle.
7628     * @returns { ImageRotation } The preview rotation angle.
7629     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7630     * @throws { BusinessError } 7400201 - Camera service fatal error.
7631     * @syscap SystemCapability.Multimedia.Camera.Core
7632     * @since 12
7633     */
7634    getPreviewRotation(displayRotation: number): ImageRotation;
7635
7636     /**
7637      * Sets the preview rotation angle.
7638      *
7639      * @param { ImageRotation } previewRotation - Preview display rotation angle.
7640      * @param { boolean } isDisplayLocked - TRUE means the display is locked, if not set, the default is FALSE.
7641      * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7642      * @throws { BusinessError } 7400201 - Camera service fatal error.
7643      * @syscap SystemCapability.Multimedia.Camera.Core
7644      * @since 12
7645      */
7646    setPreviewRotation(previewRotation: ImageRotation, isDisplayLocked?: boolean): void;
7647
7648    /**
7649     * Adds a deferred surface.
7650     *
7651     * @param { string } surfaceId - Surface object id used in camera photo output.
7652     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7653     * @syscap SystemCapability.Multimedia.Camera.Core
7654     * @systemapi
7655     * @since 10
7656     */
7657    /**
7658     * Adds a deferred surface.
7659     *
7660     * @param { string } surfaceId - Surface object id used in camera photo output.
7661     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
7662     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7663     * @syscap SystemCapability.Multimedia.Camera.Core
7664     * @systemapi
7665     * @since 13
7666     */
7667    addDeferredSurface(surfaceId: string): void;
7668
7669    /**
7670     * Determine whether camera sketch is supported.
7671     *
7672     * @returns { boolean } Is camera sketch supported.
7673     * @throws { BusinessError } 202 - Not System Application.
7674     * @syscap SystemCapability.Multimedia.Camera.Core
7675     * @systemapi
7676     * @since 11
7677     */
7678    isSketchSupported(): boolean;
7679
7680    /**
7681     * Gets the specific zoom ratio when sketch stream open.
7682     *
7683     * @returns { number } The specific zoom ratio of sketch.
7684     * @throws { BusinessError } 202 - Not System Application.
7685     * @throws { BusinessError } 7400103 - Session not config.
7686     * @syscap SystemCapability.Multimedia.Camera.Core
7687     * @systemapi
7688     * @since 11
7689     */
7690    getSketchRatio(): number;
7691
7692    /**
7693     * Enable sketch for camera.
7694     *
7695     * @param { boolean } enabled - enable sketch for camera if TRUE.
7696     * @throws { BusinessError } 202 - Not System Application.
7697     * @throws { BusinessError } 7400103 - Session not config.
7698     * @syscap SystemCapability.Multimedia.Camera.Core
7699     * @systemapi
7700     * @since 11
7701     */
7702    /**
7703     * Enable sketch for camera.
7704     *
7705     * @param { boolean } enabled - enable sketch for camera if TRUE.
7706     * @throws { BusinessError } 202 - Not System Application.
7707     * @throws { BusinessError } 7400102 - Operation not allowed.
7708     * @throws { BusinessError } 7400103 - Session not config.
7709     * @throws { BusinessError } 7400201 - Camera service fatal error.
7710     * @syscap SystemCapability.Multimedia.Camera.Core
7711     * @systemapi
7712     * @since 12
7713     */
7714    enableSketch(enabled: boolean): void;
7715
7716    /**
7717     * Attach surface to the sketch stream.
7718     *
7719     * @param { string } surfaceId - Surface object id used in sketch stream.
7720     * @throws { BusinessError } 202 - Not System Application.
7721     * @throws { BusinessError } 7400103 - Session not config.
7722     * @syscap SystemCapability.Multimedia.Camera.Core
7723     * @systemapi
7724     * @since 11
7725     */
7726    /**
7727     * Attach surface to the sketch stream.
7728     *
7729     * @param { string } surfaceId - Surface object id used in sketch stream.
7730     * @throws { BusinessError } 202 - Not System Application.
7731     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
7732     * @throws { BusinessError } 7400103 - Session not config.
7733     * @throws { BusinessError } 7400201 - Camera service fatal error.
7734     * @syscap SystemCapability.Multimedia.Camera.Core
7735     * @systemapi
7736     * @since 12
7737     */
7738    attachSketchSurface(surfaceId: string): void;
7739
7740    /**
7741     * Subscribes sketch status changed event callback.
7742     *
7743     * @param { 'sketchStatusChanged' } type - Event type.
7744     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to sketch status data.
7745     * @throws { BusinessError } 202 - Not System Application.
7746     * @syscap SystemCapability.Multimedia.Camera.Core
7747     * @systemapi
7748     * @since 11
7749     */
7750    on(type: 'sketchStatusChanged', callback: AsyncCallback<SketchStatusData>): void;
7751
7752    /**
7753     * Unsubscribes sketch status changed event callback.
7754     *
7755     * @param { 'sketchStatusChanged' } type - Event type.
7756     * @param { AsyncCallback<SketchStatusData> } callback - Callback used to get sketch status data.
7757     * @throws { BusinessError } 202 - Not System Application.
7758     * @syscap SystemCapability.Multimedia.Camera.Core
7759     * @systemapi
7760     * @since 11
7761     */
7762    off(type: 'sketchStatusChanged', callback?: AsyncCallback<SketchStatusData>): void;
7763  }
7764
7765  /**
7766   * Enum for effect suggestion.
7767   *
7768   * @enum { number }
7769   * @syscap SystemCapability.Multimedia.Camera.Core
7770   * @systemapi
7771   * @since 12
7772   */
7773  enum EffectSuggestionType {
7774    /**
7775     * None.
7776     *
7777     * @syscap SystemCapability.Multimedia.Camera.Core
7778     * @systemapi
7779     * @since 12
7780     */
7781    EFFECT_SUGGESTION_NONE = 0,
7782    /**
7783     * Portrait.
7784     *
7785     * @syscap SystemCapability.Multimedia.Camera.Core
7786     * @systemapi
7787     * @since 12
7788     */
7789    EFFECT_SUGGESTION_PORTRAIT = 1,
7790    /**
7791     * Food.
7792     *
7793     * @syscap SystemCapability.Multimedia.Camera.Core
7794     * @systemapi
7795     * @since 12
7796     */
7797    EFFECT_SUGGESTION_FOOD = 2,
7798
7799    /**
7800     * Sky.
7801     *
7802     * @syscap SystemCapability.Multimedia.Camera.Core
7803     * @systemapi
7804     * @since 12
7805     */
7806    EFFECT_SUGGESTION_SKY = 3,
7807
7808    /**
7809     * Sunrise and sunset.
7810     *
7811     * @syscap SystemCapability.Multimedia.Camera.Core
7812     * @systemapi
7813     * @since 12
7814     */
7815    EFFECT_SUGGESTION_SUNRISE_SUNSET = 4
7816  }
7817
7818  /**
7819   * Effect suggestion status
7820   *
7821   * @syscap SystemCapability.Multimedia.Camera.Core
7822   * @systemapi
7823   * @since 12
7824   */
7825  class EffectSuggestionStatus {
7826    /**
7827     * Effect Suggestion type.
7828     *
7829     * @type { EffectSuggestionType }
7830     * @syscap SystemCapability.Multimedia.Camera.Core
7831     * @systemapi
7832     * @since 12
7833     */
7834    type: EffectSuggestionType;
7835    /**
7836     * Effect Suggestion type status.
7837     *
7838     * @type { boolean }
7839     * @syscap SystemCapability.Multimedia.Camera.Core
7840     * @systemapi
7841     * @since 12
7842     */
7843    status: boolean;
7844  }
7845
7846  /**
7847   * Enumerates the image rotation angles.
7848   *
7849   * @enum { number }
7850   * @syscap SystemCapability.Multimedia.Camera.Core
7851   * @since 10
7852   */
7853  enum ImageRotation {
7854    /**
7855     * The capture image rotates 0 degrees.
7856     *
7857     * @syscap SystemCapability.Multimedia.Camera.Core
7858     * @since 10
7859     */
7860    ROTATION_0 = 0,
7861
7862    /**
7863     * The capture image rotates 90 degrees.
7864     *
7865     * @syscap SystemCapability.Multimedia.Camera.Core
7866     * @since 10
7867     */
7868    ROTATION_90 = 90,
7869
7870    /**
7871     * The capture image rotates 180 degrees.
7872     *
7873     * @syscap SystemCapability.Multimedia.Camera.Core
7874     * @since 10
7875     */
7876    ROTATION_180 = 180,
7877
7878    /**
7879     * The capture image rotates 270 degrees.
7880     *
7881     * @syscap SystemCapability.Multimedia.Camera.Core
7882     * @since 10
7883     */
7884    ROTATION_270 = 270
7885  }
7886
7887  /**
7888   * Photo capture location
7889   *
7890   * @typedef Location
7891   * @syscap SystemCapability.Multimedia.Camera.Core
7892   * @since 10
7893   */
7894  interface Location {
7895    /**
7896     * Latitude.
7897     *
7898     * @type { number }
7899     * @syscap SystemCapability.Multimedia.Camera.Core
7900     * @since 10
7901     */
7902    latitude: number;
7903
7904    /**
7905     * Longitude.
7906     *
7907     * @type { number }
7908     * @syscap SystemCapability.Multimedia.Camera.Core
7909     * @since 10
7910     */
7911    longitude: number;
7912
7913    /**
7914     * Altitude.
7915     *
7916     * @type { number }
7917     * @syscap SystemCapability.Multimedia.Camera.Core
7918     * @since 10
7919     */
7920    altitude: number;
7921  }
7922
7923  /**
7924   * Enumerates the image quality levels.
7925   *
7926   * @enum { number }
7927   * @syscap SystemCapability.Multimedia.Camera.Core
7928   * @since 10
7929   */
7930  enum QualityLevel {
7931    /**
7932     * High image quality.
7933     *
7934     * @syscap SystemCapability.Multimedia.Camera.Core
7935     * @since 10
7936     */
7937    QUALITY_LEVEL_HIGH = 0,
7938
7939    /**
7940     * Medium image quality.
7941     *
7942     * @syscap SystemCapability.Multimedia.Camera.Core
7943     * @since 10
7944     */
7945    QUALITY_LEVEL_MEDIUM = 1,
7946
7947    /**
7948     * Low image quality.
7949     *
7950     * @syscap SystemCapability.Multimedia.Camera.Core
7951     * @since 10
7952     */
7953    QUALITY_LEVEL_LOW = 2
7954  }
7955
7956  /**
7957   * Photo capture options to set.
7958   *
7959   * @typedef PhotoCaptureSetting
7960   * @syscap SystemCapability.Multimedia.Camera.Core
7961   * @since 10
7962   */
7963  interface PhotoCaptureSetting {
7964    /**
7965     * Photo image quality.
7966     *
7967     * @type { ?QualityLevel }
7968     * @syscap SystemCapability.Multimedia.Camera.Core
7969     * @since 10
7970     */
7971    quality?: QualityLevel;
7972
7973    /**
7974     * Photo rotation.
7975     *
7976     * @type { ?ImageRotation }
7977     * @syscap SystemCapability.Multimedia.Camera.Core
7978     * @since 10
7979     */
7980    rotation?: ImageRotation;
7981
7982    /**
7983     * Photo location.
7984     *
7985     * @type { ?Location }
7986     * @syscap SystemCapability.Multimedia.Camera.Core
7987     * @since 10
7988     */
7989    location?: Location;
7990
7991    /**
7992     * Set the mirror photo function switch, default to false.
7993     *
7994     * @type { ?boolean }
7995     * @syscap SystemCapability.Multimedia.Camera.Core
7996     * @since 10
7997     */
7998    mirror?: boolean;
7999  }
8000
8001  /**
8002   * Enumerates the delivery image types.
8003   *
8004   * @enum { number }
8005   * @syscap SystemCapability.Multimedia.Camera.Core
8006   * @systemapi
8007   * @since 11
8008   */
8009  enum DeferredDeliveryImageType {
8010    /**
8011     * Undefer image delivery.
8012     *
8013     * @syscap SystemCapability.Multimedia.Camera.Core
8014     * @systemapi
8015     * @since 11
8016     */
8017    NONE = 0,
8018
8019    /**
8020     * Defer photo delivery when capturing photos.
8021     *
8022     * @syscap SystemCapability.Multimedia.Camera.Core
8023     * @systemapi
8024     * @since 11
8025     */
8026    PHOTO = 1,
8027
8028    /**
8029     * Defer video delivery when capturing videos.
8030     *
8031     * @syscap SystemCapability.Multimedia.Camera.Core
8032     * @systemapi
8033     * @since 11
8034     */
8035    VIDEO = 2
8036  }
8037
8038  /**
8039   * Photo object
8040   *
8041   * @typedef Photo
8042   * @syscap SystemCapability.Multimedia.Camera.Core
8043   * @since 11
8044   */
8045  interface Photo {
8046    /**
8047     * Main image.
8048     *
8049     * @type { image.Image }
8050     * @syscap SystemCapability.Multimedia.Camera.Core
8051     * @since 11
8052     */
8053    main: image.Image;
8054
8055    /**
8056     * Raw image.
8057     *
8058     * @type { ?image.Image }
8059     * @syscap SystemCapability.Multimedia.Camera.Core
8060     * @systemapi
8061     * @since 12
8062     */
8063    raw?: image.Image;
8064
8065    /**
8066     * Depth data.
8067     *
8068     * @type { DepthData }
8069     * @syscap SystemCapability.Multimedia.Camera.Core
8070     * @systemapi
8071     * @since 13
8072     */
8073    depthData?: DepthData;
8074
8075    /**
8076     * Release Photo object.
8077     *
8078     * @returns { Promise<void> } Promise used to return the result.
8079     * @syscap SystemCapability.Multimedia.Camera.Core
8080     * @since 11
8081     */
8082    release(): Promise<void>;
8083  }
8084
8085  /**
8086   * DeferredPhotoProxy object
8087   *
8088   * @typedef DeferredPhotoProxy
8089   * @syscap SystemCapability.Multimedia.Camera.Core
8090   * @systemapi
8091   * @since 11
8092   */
8093  interface DeferredPhotoProxy {
8094    /**
8095     * Thumbnail image.
8096     *
8097     * @returns { Promise<image.PixelMap> } Promise used to return the result.
8098     * @throws { BusinessError } 202 - Not System Application.
8099     * @syscap SystemCapability.Multimedia.Camera.Core
8100     * @systemapi
8101     * @since 11
8102     */
8103    getThumbnail(): Promise<image.PixelMap>;
8104
8105    /**
8106     * Release DeferredPhotoProxy object.
8107     *
8108     * @returns { Promise<void> } Promise used to return the result.
8109     * @throws { BusinessError } 202 - Not System Application.
8110     * @syscap SystemCapability.Multimedia.Camera.Core
8111     * @systemapi
8112     * @since 11
8113     */
8114    release(): Promise<void>;
8115  }
8116
8117  /**
8118   * Enumerates the camera video codec type.
8119   *
8120   * @enum { number }
8121   * @syscap SystemCapability.Multimedia.Camera.Core
8122   * @since 13
8123   */
8124  enum VideoCodecType {
8125    /**
8126     * Codec type AVC.
8127     *
8128     * @syscap SystemCapability.Multimedia.Camera.Core
8129     * @since 13
8130     */
8131    AVC = 0,
8132
8133    /**
8134     * Codec type HEVC.
8135     *
8136     * @syscap SystemCapability.Multimedia.Camera.Core
8137     * @since 13
8138     */
8139    HEVC = 1
8140  }
8141
8142  /**
8143   * Photo output object.
8144   *
8145   * @interface PhotoOutput
8146   * @syscap SystemCapability.Multimedia.Camera.Core
8147   * @since 10
8148   */
8149  interface PhotoOutput extends CameraOutput {
8150    /**
8151     * Start capture output.
8152     *
8153     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8154     * @throws { BusinessError } 7400104 - Session not running.
8155     * @throws { BusinessError } 7400201 - Camera service fatal error.
8156     * @syscap SystemCapability.Multimedia.Camera.Core
8157     * @since 10
8158     */
8159    capture(callback: AsyncCallback<void>): void;
8160
8161    /**
8162     * Start capture output.
8163     *
8164     * @returns { Promise<void> } Promise used to return the result.
8165     * @throws { BusinessError } 7400104 - Session not running.
8166     * @throws { BusinessError } 7400201 - Camera service fatal error.
8167     * @syscap SystemCapability.Multimedia.Camera.Core
8168     * @since 10
8169     */
8170    capture(): Promise<void>;
8171
8172    /**
8173     * Start capture output.
8174     *
8175     * @param { PhotoCaptureSetting } setting - Photo capture settings.
8176     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8177     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8178     * @throws { BusinessError } 7400104 - Session not running.
8179     * @throws { BusinessError } 7400201 - Camera service fatal error.
8180     * @syscap SystemCapability.Multimedia.Camera.Core
8181     * @since 10
8182     */
8183    capture(setting: PhotoCaptureSetting, callback: AsyncCallback<void>): void;
8184
8185    /**
8186     * Start capture output.
8187     *
8188     * @param { PhotoCaptureSetting } setting - Photo capture settings.
8189     * @returns { Promise<void> } Promise used to return the result.
8190     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8191     * @throws { BusinessError } 7400104 - Session not running.
8192     * @throws { BusinessError } 7400201 - Camera service fatal error.
8193     * @syscap SystemCapability.Multimedia.Camera.Core
8194     * @since 10
8195     */
8196    /**
8197     * Start capture output.
8198     * Remove optional param.
8199     *
8200     * @param { PhotoCaptureSetting } setting - Photo capture settings.
8201     * @returns { Promise<void> } Promise used to return the result.
8202     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8203     * @throws { BusinessError } 7400104 - Session not running.
8204     * @throws { BusinessError } 7400201 - Camera service fatal error.
8205     * @syscap SystemCapability.Multimedia.Camera.Core
8206     * @since 11
8207     */
8208    capture(setting: PhotoCaptureSetting): Promise<void>;
8209
8210    /**
8211     * Start burst capture.
8212     *
8213     * @param { PhotoCaptureSetting } setting - Photo capture settings.
8214     * @returns { Promise<void> } Promise used to return the result.
8215     * @throws { BusinessError } 202 - Not System Application.
8216     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8217     * @throws { BusinessError } 7400104 - Session not running.
8218     * @throws { BusinessError } 7400201 - Camera service fatal error.
8219     * @syscap SystemCapability.Multimedia.Camera.Core
8220     * @systemapi
8221     * @since 12
8222     */
8223    burstCapture(setting: PhotoCaptureSetting): Promise<void>;
8224
8225    /**
8226     * Confirm capture in Night mode or end burst capture.
8227     *
8228     * @throws { BusinessError } 202 - Not System Application.
8229     * @throws { BusinessError } 7400104 - Session not running.
8230     * @throws { BusinessError } 7400201 - Camera service fatal error.
8231     * @syscap SystemCapability.Multimedia.Camera.Core
8232     * @systemapi
8233     * @since 11
8234     */
8235    confirmCapture();
8236
8237    /**
8238     * Confirm if the raw image delivery is supported
8239     *
8240     * @returns { boolean } TRUE if the type of delivery image is support.
8241     * @throws { BusinessError } 202 - Not System Application.
8242     * @throws { BusinessError } 7400104 - Session not running.
8243     * @throws { BusinessError } 7400201 - Camera service fatal error.
8244     * @syscap SystemCapability.Multimedia.Camera.Core
8245     * @systemapi
8246     * @since 13
8247     */
8248    isRawDeliverySupported(): boolean;
8249
8250    /**
8251     * Enable raw image image delivery.
8252     *
8253     * @param { boolean } enabled - Target state for raw image delivery.
8254     * @throws { BusinessError } 202 - Not System Application.
8255     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8256     * @throws { BusinessError } 7400104 - Session not running.
8257     * @throws { BusinessError } 7400201 - Camera service fatal error.
8258     * @syscap SystemCapability.Multimedia.Camera.Core
8259     * @systemapi
8260     * @since 13
8261     */
8262    enableRawDelivery(enabled: boolean): void;
8263
8264    /**
8265     * Confirm if the deferred image delivery supported in the specific device.
8266     *
8267     * @param { DeferredDeliveryImageType } type - Type of delivery image.
8268     * @returns { boolean } TRUE if the type of delivery image is support.
8269     * @throws { BusinessError } 202 - Not System Application.
8270     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8271     * @throws { BusinessError } 7400104 - Session not running.
8272     * @throws { BusinessError } 7400201 - Camera service fatal error.
8273     * @syscap SystemCapability.Multimedia.Camera.Core
8274     * @systemapi
8275     * @since 11
8276     */
8277    isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean;
8278
8279    /**
8280     * Confirm if the deferred image delivery enabled.
8281     *
8282     * @param { DeferredDeliveryImageType } type - Type of delivery image.
8283     * @returns { boolean } TRUE if the type of delivery image is enable.
8284     * @throws { BusinessError } 202 - Not System Application.
8285     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8286     * @throws { BusinessError } 7400104 - Session not running.
8287     * @throws { BusinessError } 7400201 - Camera service fatal error.
8288     * @syscap SystemCapability.Multimedia.Camera.Core
8289     * @systemapi
8290     * @since 11
8291     */
8292    isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean;
8293
8294    /**
8295     * Sets the image type for deferred image delivery.
8296     *
8297     * @param { DeferredDeliveryImageType } type - Type of delivery image.
8298     * @throws { BusinessError } 202 - Not System Application.
8299     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8300     * @throws { BusinessError } 7400104 - Session not running.
8301     * @throws { BusinessError } 7400201 - Camera service fatal error.
8302     * @syscap SystemCapability.Multimedia.Camera.Core
8303     * @systemapi
8304     * @since 11
8305     */
8306    deferImageDelivery(type: DeferredDeliveryImageType): void;
8307
8308    /**
8309     * Check if the depth data delivery is supported.
8310     *
8311     * @returns { boolean } TRUE if the type of delivery image is enabled.
8312     * @throws { BusinessError } 202 - Not System Application.
8313     * @throws { BusinessError } 7400104 - Session not running.
8314     * @throws { BusinessError } 7400201 - Camera service fatal error.
8315     * @syscap SystemCapability.Multimedia.Camera.Core
8316     * @systemapi
8317     * @since 13
8318     */
8319    isDepthDataDeliverySupported(): boolean;
8320
8321    /**
8322     * Enable depth data delivery.
8323     *
8324     * @param { boolean } enabled - Target state for depth data delivery.
8325     * @throws { BusinessError } 202 - Not System Application.
8326     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8327     * @throws { BusinessError } 7400104 - Session not running.
8328     * @throws { BusinessError } 7400201 - Camera service fatal error.
8329     * @syscap SystemCapability.Multimedia.Camera.Core
8330     * @systemapi
8331     * @since 13
8332     */
8333    enableDepthDataDelivery(enabled: boolean): void;
8334
8335    /**
8336     * Get supported moving photo video codec types.
8337     *
8338     * @returns { Array<VideoCodecType> } An array of supported video codec types for moving photo.
8339     * @throws { BusinessError } 7400201 - Camera service fatal error.
8340     * @syscap SystemCapability.Multimedia.Camera.Core
8341     * @since 13
8342     */
8343    getSupportedMovingPhotoVideoCodecTypes(): Array<VideoCodecType>;
8344
8345    /**
8346     * Sets codec type for moving photo, default to AVC.
8347     *
8348     * @param { VideoCodecType } codecType - Codec type for moving photo.
8349     * @throws { BusinessError } 7400201 - Camera service fatal error.
8350     * @syscap SystemCapability.Multimedia.Camera.Core
8351     * @since 13
8352     */
8353    setMovingPhotoVideoCodecType(codecType: VideoCodecType): void;
8354
8355    /**
8356     * Subscribes photo available event callback.
8357     *
8358     * @param { 'photoAvailable' } type - Event type.
8359     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
8360     * @syscap SystemCapability.Multimedia.Camera.Core
8361     * @since 11
8362     */
8363    on(type: 'photoAvailable', callback: AsyncCallback<Photo>): void;
8364
8365    /**
8366     * Unsubscribes photo available event callback.
8367     *
8368     * @param { 'photoAvailable' } type - Event type.
8369     * @param { AsyncCallback<Photo> } callback - Callback used to get the Photo.
8370     * @syscap SystemCapability.Multimedia.Camera.Core
8371     * @since 11
8372     */
8373    off(type: 'photoAvailable', callback?: AsyncCallback<Photo>): void;
8374
8375    /**
8376     * Subscribes deferred photo proxy available event callback.
8377     *
8378     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
8379     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
8380     * @throws { BusinessError } 202 - Not System Application.
8381     * @syscap SystemCapability.Multimedia.Camera.Core
8382     * @systemapi
8383     * @since 11
8384     */
8385    on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback<DeferredPhotoProxy>): void;
8386
8387    /**
8388     * Unsubscribes deferred photo proxy available event callback.
8389     *
8390     * @param { 'deferredPhotoProxyAvailable' } type - Event type.
8391     * @param { AsyncCallback<DeferredPhotoProxy> } callback - Callback used to get the DeferredPhotoProxy.
8392     * @throws { BusinessError } 202 - Not System Application.
8393     * @syscap SystemCapability.Multimedia.Camera.Core
8394     * @systemapi
8395     * @since 11
8396     */
8397    off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback<DeferredPhotoProxy>): void;
8398
8399    /**
8400     * Subscribes photo asset event callback.
8401     *
8402     * @param { 'photoAssetAvailable' } type - Event type.
8403     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
8404     * @syscap SystemCapability.Multimedia.Camera.Core
8405     * @since 12
8406     */
8407    on(type: 'photoAssetAvailable', callback: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
8408
8409    /**
8410     * Unsubscribes photo asset event callback.
8411     *
8412     * @param { 'photoAssetAvailable' } type - Event type.
8413     * @param { AsyncCallback<photoAccessHelper.PhotoAsset> } callback - Callback used to get the asset.
8414     * @syscap SystemCapability.Multimedia.Camera.Core
8415     * @since 12
8416     */
8417     off(type: 'photoAssetAvailable', callback?: AsyncCallback<photoAccessHelper.PhotoAsset>): void;
8418
8419    /**
8420     * Check whether to support mirror photo.
8421     *
8422     * @returns { boolean } Is the mirror supported.
8423     * @syscap SystemCapability.Multimedia.Camera.Core
8424     * @since 10
8425     */
8426    isMirrorSupported(): boolean;
8427
8428    /**
8429     * Enable mirror for photo capture.
8430     *
8431     * @param { boolean } enabled - enable photo mirror if TRUE.
8432     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8433     * @throws { BusinessError } 7400103 - Session not config.
8434     * @throws { BusinessError } 7400201 - Camera service fatal error.
8435     * @syscap SystemCapability.Multimedia.Camera.Core
8436     * @since 13
8437     */
8438    enableMirror(enabled: boolean): void;
8439
8440    /**
8441     * Subscribes capture start event callback.
8442     *
8443     * @param { 'captureStart' } type - Event type.
8444     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
8445     * @syscap SystemCapability.Multimedia.Camera.Core
8446     * @since 10
8447     * @deprecated since 11
8448     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
8449     */
8450    on(type: 'captureStart', callback: AsyncCallback<number>): void;
8451
8452    /**
8453     * Unsubscribes from capture start event callback.
8454     *
8455     * @param { 'captureStart' } type - Event type.
8456     * @param { AsyncCallback<number> } callback - Callback used to get the capture ID.
8457     * @syscap SystemCapability.Multimedia.Camera.Core
8458     * @since 10
8459     * @deprecated since 11
8460     * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo
8461     */
8462    off(type: 'captureStart', callback?: AsyncCallback<number>): void;
8463
8464    /**
8465     * Subscribes capture start event callback.
8466     *
8467     * @param { 'captureStartWithInfo' } type - Event type.
8468     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
8469     * @syscap SystemCapability.Multimedia.Camera.Core
8470     * @since 11
8471     */
8472    on(type: 'captureStartWithInfo', callback: AsyncCallback<CaptureStartInfo>): void;
8473
8474    /**
8475     * Unsubscribes from capture start event callback.
8476     *
8477     * @param { 'captureStartWithInfo' } type - Event type.
8478     * @param { AsyncCallback<CaptureStartInfo> } callback - Callback used to get the capture start info.
8479     * @syscap SystemCapability.Multimedia.Camera.Core
8480     * @since 11
8481     */
8482    off(type: 'captureStartWithInfo', callback?: AsyncCallback<CaptureStartInfo>): void;
8483
8484    /**
8485     * Subscribes frame shutter event callback.
8486     *
8487     * @param { 'frameShutter' } type - Event type.
8488     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
8489     * @syscap SystemCapability.Multimedia.Camera.Core
8490     * @since 10
8491     */
8492    on(type: 'frameShutter', callback: AsyncCallback<FrameShutterInfo>): void;
8493
8494    /**
8495     * Unsubscribes from frame shutter event callback.
8496     *
8497     * @param { 'frameShutter' } type - Event type.
8498     * @param { AsyncCallback<FrameShutterInfo> } callback - Callback used to get the frame shutter information.
8499     * @syscap SystemCapability.Multimedia.Camera.Core
8500     * @since 10
8501     */
8502    off(type: 'frameShutter', callback?: AsyncCallback<FrameShutterInfo>): void;
8503
8504    /**
8505     * Subscribes frame shutter end event callback.
8506     *
8507     * @param { 'frameShutterEnd' } type - Event type.
8508     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
8509     * @syscap SystemCapability.Multimedia.Camera.Core
8510     * @since 12
8511     */
8512    on(type: 'frameShutterEnd', callback: AsyncCallback<FrameShutterEndInfo>): void;
8513
8514    /**
8515     * Unsubscribes from frame shutter end event callback.
8516     *
8517     * @param { 'frameShutterEnd' } type - Event type.
8518     * @param { AsyncCallback<FrameShutterEndInfo> } callback - Callback used to get the frame shutter end information.
8519     * @syscap SystemCapability.Multimedia.Camera.Core
8520     * @since 12
8521     */
8522    off(type: 'frameShutterEnd', callback?: AsyncCallback<FrameShutterEndInfo>): void;
8523
8524    /**
8525     * Subscribes capture end event callback.
8526     *
8527     * @param { 'captureEnd' } type - Event type.
8528     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
8529     * @syscap SystemCapability.Multimedia.Camera.Core
8530     * @since 10
8531     */
8532    on(type: 'captureEnd', callback: AsyncCallback<CaptureEndInfo>): void;
8533
8534    /**
8535     * Unsubscribes from capture end event callback.
8536     *
8537     * @param { 'captureEnd' } type - Event type.
8538     * @param { AsyncCallback<CaptureEndInfo> } callback - Callback used to get the capture end information.
8539     * @syscap SystemCapability.Multimedia.Camera.Core
8540     * @since 10
8541     */
8542    off(type: 'captureEnd', callback?: AsyncCallback<CaptureEndInfo>): void;
8543
8544    /**
8545     * Subscribes capture ready event callback. After receiving the callback, can proceed to the next capture
8546     *
8547     * @param { 'captureReady' } type - Event type.
8548     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
8549     * @syscap SystemCapability.Multimedia.Camera.Core
8550     * @since 12
8551     */
8552    on(type: 'captureReady', callback: AsyncCallback<void>): void;
8553
8554    /**
8555     * Unsubscribes from capture ready event callback.
8556     *
8557     * @param { 'captureReady' } type - Event type.
8558     * @param { AsyncCallback<void> } callback - Callback used to notice capture ready.
8559     * @syscap SystemCapability.Multimedia.Camera.Core
8560     * @since 12
8561     */
8562    off(type: 'captureReady', callback?: AsyncCallback<void>): void;
8563
8564    /**
8565     * Subscribes estimated capture duration event callback.
8566     *
8567     * @param { 'estimatedCaptureDuration' } type - Event type.
8568     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
8569     * @syscap SystemCapability.Multimedia.Camera.Core
8570     * @since 12
8571     */
8572    on(type: 'estimatedCaptureDuration', callback: AsyncCallback<number>): void;
8573
8574    /**
8575     * Unsubscribes from estimated capture duration event callback.
8576     *
8577     * @param { 'estimatedCaptureDuration' } type - Event type.
8578     * @param { AsyncCallback<number> } callback - Callback used to notify the estimated capture duration (in milliseconds).
8579     * @syscap SystemCapability.Multimedia.Camera.Core
8580     * @since 12
8581     */
8582    off(type: 'estimatedCaptureDuration', callback?: AsyncCallback<number>): void;
8583
8584    /**
8585     * Subscribes to error events.
8586     *
8587     * @param { 'error' } type - Event type.
8588     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
8589     * @syscap SystemCapability.Multimedia.Camera.Core
8590     * @since 10
8591     */
8592    on(type: 'error', callback: ErrorCallback): void;
8593
8594    /**
8595     * Unsubscribes from error events.
8596     *
8597     * @param { 'error' } type - Event type.
8598     * @param { ErrorCallback } callback - Callback used to get the photo output errors.
8599     * @syscap SystemCapability.Multimedia.Camera.Core
8600     * @since 10
8601     */
8602    off(type: 'error', callback?: ErrorCallback): void;
8603
8604    /**
8605     * Gets the current preconfig type if you had already call preconfig interface.
8606     *
8607     * @returns { Profile } The current preconfig type.
8608     * @throws { BusinessError } 7400201 - Camera service fatal error.
8609     * @syscap SystemCapability.Multimedia.Camera.Core
8610     * @since 12
8611     */
8612    getActiveProfile(): Profile;
8613
8614    /**
8615     * Checks whether PhotoOutput supports quick thumbnail.
8616     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
8617     *
8618     * @returns { boolean } Whether quick thumbnail is supported.
8619     * @throws { BusinessError } 7400104 - session is not running.
8620     * @syscap SystemCapability.Multimedia.Camera.Core
8621     * @systemapi
8622     * @since 10
8623     */
8624    /**
8625     * Checks whether PhotoOutput supports quick thumbnail.
8626     * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called.
8627     *
8628     * @returns { boolean } Whether quick thumbnail is supported.
8629     * @throws { BusinessError } 202 - Not System Application.
8630     * @throws { BusinessError } 7400104 - session is not running.
8631     * @syscap SystemCapability.Multimedia.Camera.Core
8632     * @systemapi
8633     * @since 12
8634     */
8635    isQuickThumbnailSupported(): boolean;
8636
8637    /**
8638     * Enables or disables quick thumbnail.
8639     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8640     * To avoid stream reconfiguration and performance loss,
8641     * you are advised to call the method before Session.commitConfig().
8642     *
8643     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8644     * @throws { BusinessError } 7400104 - session is not running.
8645     * @syscap SystemCapability.Multimedia.Camera.Core
8646     * @systemapi
8647     * @since 10
8648     */
8649    /**
8650     * Enables or disables quick thumbnail.
8651     * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called.
8652     * To avoid stream reconfiguration and performance loss,
8653     * you are advised to call the method before Session.commitConfig().
8654     *
8655     * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite.
8656     * @throws { BusinessError } 202 - Not System Application.
8657     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8658     * @throws { BusinessError } 7400104 - session is not running.
8659     * @throws { BusinessError } 7400201 - Camera service fatal error.
8660     * @syscap SystemCapability.Multimedia.Camera.Core
8661     * @systemapi
8662     * @since 12
8663     */
8664    enableQuickThumbnail(enabled: boolean): void;
8665
8666    /**
8667     * Subscribes to camera thumbnail events.
8668     * This method is valid only after enableQuickThumbnail(true) is called.
8669     *
8670     * @param { 'quickThumbnail' } type - Event type.
8671     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8672     * @syscap SystemCapability.Multimedia.Camera.Core
8673     * @systemapi
8674     * @since 10
8675     */
8676    on(type: 'quickThumbnail', callback: AsyncCallback<image.PixelMap>): void;
8677
8678    /**
8679     * Unsubscribes from camera thumbnail events.
8680     * This method is valid only after enableQuickThumbnail(true) is called.
8681     *
8682     * @param { 'quickThumbnail' } type - Event type.
8683     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail.
8684     * @syscap SystemCapability.Multimedia.Camera.Core
8685     * @systemapi
8686     * @since 10
8687     */
8688    off(type: 'quickThumbnail', callback?: AsyncCallback<image.PixelMap>): void;
8689
8690    /**
8691     * Confirm if the auto high quality photo supported.
8692     *
8693     * @returns { boolean } TRUE if the auto high quality photo is supported.
8694     * @throws { BusinessError } 202 - Not System Application.
8695     * @throws { BusinessError } 7400104 - session is not running.
8696     * @throws { BusinessError } 7400201 - Camera service fatal error.
8697     * @syscap SystemCapability.Multimedia.Camera.Core
8698     * @systemapi
8699     * @since 13
8700     */
8701    isAutoHighQualityPhotoSupported(): boolean;
8702
8703    /**
8704     * Enable auto high quality photo.
8705     *
8706     * @param { boolean } enabled - Target state for auto high quality photo.
8707     * @throws { BusinessError } 202 - Not System Application.
8708     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8709     * @throws { BusinessError } 7400104 - session is not running.
8710     * @throws { BusinessError } 7400201 - Camera service fatal error.
8711     * @syscap SystemCapability.Multimedia.Camera.Core
8712     * @systemapi
8713     * @since 13
8714     */
8715    enableAutoHighQualityPhoto(enabled: boolean): void;
8716
8717    /**
8718     * Confirm if the auto cloud image enhancement is supported.
8719     *
8720     * @returns { boolean } TRUE if the auto cloud image enhancement is supported.
8721     * @throws { BusinessError } 202 - Not System Application.
8722     * @throws { BusinessError } 7400201 - Camera service fatal error.
8723     * @syscap SystemCapability.Multimedia.Camera.Core
8724     * @systemapi
8725     * @since 13
8726     */
8727    isAutoCloudImageEnhancementSupported(): boolean;
8728
8729    /**
8730     * Enable auto cloud image enhancement
8731     *
8732     * @param { boolean } enabled - Target state for auto cloud image enhancement.
8733     * @throws { BusinessError } 202 - Not System Application.
8734     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8735     * @throws { BusinessError } 7400201 - Camera service fatal error.
8736     * @syscap SystemCapability.Multimedia.Camera.Core
8737     * @systemapi
8738     * @since 13
8739     */
8740    enableAutoCloudImageEnhancement(enabled: boolean): void;
8741
8742    /**
8743     * Confirm if moving photo supported.
8744     *
8745     * @returns { boolean } TRUE if the moving photo is supported.
8746     * @throws { BusinessError } 7400201 - Camera service fatal error.
8747     * @syscap SystemCapability.Multimedia.Camera.Core
8748     * @since 12
8749     */
8750    isMovingPhotoSupported(): boolean;
8751
8752    /**
8753     * Enable moving photo.
8754     *
8755     * @permission ohos.permission.MICROPHONE
8756     * @param { boolean } enabled - Target state for moving photo.
8757     * @throws { BusinessError } 201 - permission denied.
8758     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8759     * @throws { BusinessError } 7400201 - Camera service fatal error.
8760     * @syscap SystemCapability.Multimedia.Camera.Core
8761     * @since 12
8762     */
8763    enableMovingPhoto(enabled: boolean): void;
8764
8765    /**
8766     * Gets the photo rotation angle.
8767     *
8768     * @param { number } deviceDegree - The current device rotation degree.
8769     * @returns { ImageRotation } The photo rotation angle.
8770     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8771     * @throws { BusinessError } 7400201 - Camera service fatal error.
8772     * @syscap SystemCapability.Multimedia.Camera.Core
8773     * @since 12
8774     */
8775    getPhotoRotation(deviceDegree: number): ImageRotation;
8776  }
8777
8778  /**
8779   * Frame shutter callback info.
8780   *
8781   * @typedef FrameShutterInfo
8782   * @syscap SystemCapability.Multimedia.Camera.Core
8783   * @since 10
8784   */
8785  interface FrameShutterInfo {
8786    /**
8787     * Capture id.
8788     *
8789     * @type { number }
8790     * @syscap SystemCapability.Multimedia.Camera.Core
8791     * @since 10
8792     */
8793    captureId: number;
8794    /**
8795     * Timestamp for frame.
8796     *
8797     * @type { number }
8798     * @syscap SystemCapability.Multimedia.Camera.Core
8799     * @since 10
8800     */
8801    timestamp: number;
8802  }
8803
8804  /**
8805   * Frame shutter end callback info.
8806   *
8807   * @typedef FrameShutterEndInfo
8808   * @syscap SystemCapability.Multimedia.Camera.Core
8809   * @since 12
8810   */
8811  interface FrameShutterEndInfo {
8812    /**
8813     * Capture id.
8814     *
8815     * @type { number }
8816     * @syscap SystemCapability.Multimedia.Camera.Core
8817     * @since 12
8818     */
8819    captureId: number;
8820  }
8821
8822  /**
8823   * Capture start info.
8824   *
8825   * @typedef CaptureStartInfo
8826   * @syscap SystemCapability.Multimedia.Camera.Core
8827   * @since 11
8828   */
8829  interface CaptureStartInfo {
8830    /**
8831     * Capture id.
8832     *
8833     * @type { number }
8834     * @syscap SystemCapability.Multimedia.Camera.Core
8835     * @since 11
8836     */
8837    captureId: number;
8838    /**
8839     * Time(in milliseconds) is the shutter time for the photo.
8840     *
8841     * @type { number }
8842     * @syscap SystemCapability.Multimedia.Camera.Core
8843     * @since 11
8844     */
8845    time: number;
8846  }
8847
8848  /**
8849   * Capture end info.
8850   *
8851   * @typedef CaptureEndInfo
8852   * @syscap SystemCapability.Multimedia.Camera.Core
8853   * @since 10
8854   */
8855  interface CaptureEndInfo {
8856    /**
8857     * Capture id.
8858     *
8859     * @type { number }
8860     * @syscap SystemCapability.Multimedia.Camera.Core
8861     * @since 10
8862     */
8863    captureId: number;
8864    /**
8865     * Frame count.
8866     *
8867     * @type { number }
8868     * @syscap SystemCapability.Multimedia.Camera.Core
8869     * @since 10
8870     */
8871    frameCount: number;
8872  }
8873
8874  /**
8875   * Deferred video enhancement info.
8876   *
8877   * @typedef DeferredVideoEnhancementInfo
8878   * @syscap SystemCapability.Multimedia.Camera.Core
8879   * @systemapi
8880   * @since 13
8881   */
8882  interface DeferredVideoEnhancementInfo {
8883    /**
8884     * Check whether deferred video enhancement available.
8885     *
8886     * @type { boolean }
8887     * @readonly
8888     * @syscap SystemCapability.Multimedia.Camera.Core
8889     * @systemapi
8890     * @since 13
8891     */
8892    readonly isDeferredVideoEnhancementAvailable: boolean;
8893    /**
8894     * Video identifier.
8895     *
8896     * @type { ?string }
8897     * @readonly
8898     * @syscap SystemCapability.Multimedia.Camera.Core
8899     * @systemapi
8900     * @since 13
8901     */
8902    readonly videoId?: string;
8903  }
8904
8905  /**
8906   * Video output object.
8907   *
8908   * @interface VideoOutput
8909   * @syscap SystemCapability.Multimedia.Camera.Core
8910   * @since 10
8911   */
8912  interface VideoOutput extends CameraOutput {
8913    /**
8914     * Start video output.
8915     *
8916     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8917     * @throws { BusinessError } 7400103 - Session not config.
8918     * @throws { BusinessError } 7400201 - Camera service fatal error.
8919     * @syscap SystemCapability.Multimedia.Camera.Core
8920     * @since 10
8921     */
8922    start(callback: AsyncCallback<void>): void;
8923
8924    /**
8925     * Start video output.
8926     *
8927     * @returns { Promise<void> } Promise used to return the result.
8928     * @throws { BusinessError } 7400103 - Session not config.
8929     * @throws { BusinessError } 7400201 - Camera service fatal error.
8930     * @syscap SystemCapability.Multimedia.Camera.Core
8931     * @since 10
8932     */
8933    start(): Promise<void>;
8934
8935    /**
8936     * Stop video output.
8937     *
8938     * @param { AsyncCallback<void> } callback - Callback used to return the result.
8939     * @syscap SystemCapability.Multimedia.Camera.Core
8940     * @since 10
8941     */
8942    stop(callback: AsyncCallback<void>): void;
8943
8944    /**
8945     * Stop video output.
8946     *
8947     * @returns { Promise<void> } Promise used to return the result.
8948     * @syscap SystemCapability.Multimedia.Camera.Core
8949     * @since 10
8950     */
8951    stop(): Promise<void>;
8952
8953    /**
8954     * Determine whether video mirror is supported.
8955     *
8956     * @returns { boolean } Is video mirror supported.
8957     * @throws { BusinessError } 202 - Not System Application.
8958     * @syscap SystemCapability.Multimedia.Camera.Core
8959     * @systemapi
8960     * @since 12
8961     */
8962    isMirrorSupported(): boolean;
8963
8964    /**
8965     * Enable mirror for video capture.
8966     *
8967     * @param { boolean } enabled - enable video mirror if TRUE.
8968     * @throws { BusinessError } 202 - Not System Application.
8969     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8970     * @throws { BusinessError } 7400103 - Session not config.
8971     * @syscap SystemCapability.Multimedia.Camera.Core
8972     * @systemapi
8973     * @since 12
8974     */
8975    enableMirror(enabled: boolean): void;
8976
8977    /**
8978     * Get supported frame rates which can be set during session running.
8979     *
8980     * @returns { Array<FrameRateRange> } The array of supported frame rate range.
8981     * @syscap SystemCapability.Multimedia.Camera.Core
8982     * @since 12
8983     */
8984    getSupportedFrameRates(): Array<FrameRateRange>
8985
8986    /**
8987     * Set a frame rate range.
8988     *
8989     * @param { number } minFps - Minimum frame rate per second.
8990     * @param { number } maxFps - Maximum frame rate per second.
8991     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
8992     * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations.
8993     * @syscap SystemCapability.Multimedia.Camera.Core
8994     * @since 12
8995     */
8996    setFrameRate(minFps: number, maxFps: number): void
8997
8998    /**
8999     * Get active frame rate range which has been set before.
9000     *
9001     * @returns { FrameRateRange } The active frame rate range.
9002     * @syscap SystemCapability.Multimedia.Camera.Core
9003     * @since 12
9004     */
9005    getActiveFrameRate(): FrameRateRange;
9006
9007    /**
9008     * Gets the video rotation angle.
9009     *
9010     * @param { number } deviceDegree - The current device rotation degree.
9011     * @returns { ImageRotation } The video rotation angle.
9012     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9013     * @throws { BusinessError } 7400201 - Camera service fatal error.
9014     * @syscap SystemCapability.Multimedia.Camera.Core
9015     * @since 12
9016     */
9017    getVideoRotation(deviceDegree: number): ImageRotation;
9018
9019    /**
9020     * Confirm if auto deferred video enhancement is supported in the specific device.
9021     *
9022     * @returns { boolean } TRUE if auto deferred video enhancement is supported.
9023     * @throws { BusinessError } 202 - Not System Application.
9024     * @throws { BusinessError } 7400201 - Camera service fatal error.
9025     * @syscap SystemCapability.Multimedia.Camera.Core
9026     * @systemapi
9027     * @since 13
9028     */
9029    isAutoDeferredVideoEnhancementSupported(): boolean;
9030
9031    /**
9032     * Confirm if auto deferred video enhancement is enabled.
9033     *
9034     * @returns { boolean } TRUE if auto deferred video enhancement is enabled.
9035     * @throws { BusinessError } 202 - Not System Application.
9036     * @throws { BusinessError } 7400201 - Camera service fatal error.
9037     * @syscap SystemCapability.Multimedia.Camera.Core
9038     * @systemapi
9039     * @since 13
9040     */
9041    isAutoDeferredVideoEnhancementEnabled(): boolean;
9042
9043    /**
9044     * Enable auto deferred video enhancement if needed.
9045     *
9046     * @param { boolean } enabled - Status of auto deferred video enhancement.
9047     * @throws { BusinessError } 202 - Not System Application.
9048     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9049     * @throws { BusinessError } 7400201 - Camera service fatal error.
9050     * @syscap SystemCapability.Multimedia.Camera.Core
9051     * @systemapi
9052     * @since 13
9053     */
9054    enableAutoDeferredVideoEnhancement(enabled: boolean): void;
9055
9056    /**
9057     * Get supported video rotations.
9058     *
9059     * @returns { Array<ImageRotation> } The array of supported video rotations.
9060     * @throws { BusinessError } 202 - Not System Application.
9061     * @syscap SystemCapability.Multimedia.Camera.Core
9062     * @systemapi
9063     * @since 14
9064     */
9065    getSupportedRotations(): Array<ImageRotation>;
9066
9067    /**
9068     * Determine whether video rotation is supported.
9069     *
9070     * @returns { boolean } Is video rotation supported.
9071     * @throws { BusinessError } 202 - Not System Application.
9072     * @syscap SystemCapability.Multimedia.Camera.Core
9073     * @systemapi
9074     * @since 14
9075     */
9076    isRotationSupported(): boolean;
9077
9078    /**
9079     * Set a video rotation.
9080     *
9081     * @param { ImageRotation } rotation - The rotation angle.
9082     * @throws { BusinessError } 202 - Not System Application.
9083     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9084     * @syscap SystemCapability.Multimedia.Camera.Core
9085     * @systemapi
9086     * @since 14
9087     */
9088    setRotation(rotation: ImageRotation): void;
9089
9090    /**
9091     * Subscribes deferred video enhancement info callback.
9092     *
9093     * @param { 'deferredVideoEnhancementInfo' } type - Event type.
9094     * @param { AsyncCallback<DeferredVideoEnhanceInfo> } callback - Callback used to return the result.
9095     * @throws { BusinessError } 202 - Not System Application.
9096     * @syscap SystemCapability.Multimedia.Camera.Core
9097     * @systemapi
9098     * @since 13
9099     */
9100    on(type: 'deferredVideoEnhancementInfo', callback: AsyncCallback<DeferredVideoEnhancementInfo>): void;
9101
9102    /**
9103     * Unsubscribes from deferred video enhancement info callback.
9104     *
9105     * @param { 'deferredVideoEnhancementInfo' } type - Event type.
9106     * @param { AsyncCallback<DeferredVideoEnhancementInfo> } callback - Callback used to return the result.
9107     * @throws { BusinessError } 202 - Not System Application.
9108     * @syscap SystemCapability.Multimedia.Camera.Core
9109     * @systemapi
9110     * @since 13
9111     */
9112    off(type: 'deferredVideoEnhancementInfo', callback?: AsyncCallback<DeferredVideoEnhancementInfo>): void;
9113
9114    /**
9115     * Subscribes frame start event callback.
9116     *
9117     * @param { 'frameStart' } type - Event type.
9118     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9119     * @syscap SystemCapability.Multimedia.Camera.Core
9120     * @since 10
9121     */
9122    on(type: 'frameStart', callback: AsyncCallback<void>): void;
9123
9124    /**
9125     * Unsubscribes from frame start event callback.
9126     *
9127     * @param { 'frameStart' } type - Event type.
9128     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9129     * @syscap SystemCapability.Multimedia.Camera.Core
9130     * @since 10
9131     */
9132    off(type: 'frameStart', callback?: AsyncCallback<void>): void;
9133
9134    /**
9135     * Subscribes frame end event callback.
9136     *
9137     * @param { 'frameEnd' } type - Event type.
9138     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9139     * @syscap SystemCapability.Multimedia.Camera.Core
9140     * @since 10
9141     */
9142    on(type: 'frameEnd', callback: AsyncCallback<void>): void;
9143
9144    /**
9145     * Unsubscribes from frame end event callback.
9146     *
9147     * @param { 'frameEnd' } type - Event type.
9148     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9149     * @syscap SystemCapability.Multimedia.Camera.Core
9150     * @since 10
9151     */
9152    off(type: 'frameEnd', callback?: AsyncCallback<void>): void;
9153
9154    /**
9155     * Subscribes to error events.
9156     *
9157     * @param { 'error' } type - Event type.
9158     * @param { ErrorCallback } callback - Callback used to get the video output errors.
9159     * @syscap SystemCapability.Multimedia.Camera.Core
9160     * @since 10
9161     */
9162    on(type: 'error', callback: ErrorCallback): void;
9163
9164    /**
9165     * Unsubscribes from error events.
9166     *
9167     * @param { 'error' } type - Event type.
9168     * @param { ErrorCallback } callback - Callback used to get the video output errors.
9169     * @syscap SystemCapability.Multimedia.Camera.Core
9170     * @since 10
9171     */
9172    off(type: 'error', callback?: ErrorCallback): void;
9173
9174    /**
9175     * Gets the current preconfig type if you had already call preconfig interface.
9176     *
9177     * @returns { VideoProfile } The current preconfig type.
9178     * @throws { BusinessError } 7400201 - Camera service fatal error.
9179     * @syscap SystemCapability.Multimedia.Camera.Core
9180     * @since 12
9181     */
9182    getActiveProfile(): VideoProfile;
9183
9184    /**
9185     * Get supported video meta types.
9186     * @returns { Array<VideoMetaType> } The array of supported video meta type.
9187     * @throws { BusinessError } 202 - Not System Application.
9188     * @throws { BusinessError } 7400201 - Camera service fatal error.
9189     * @syscap SystemCapability.Multimedia.Camera.Core
9190     * @systemapi
9191     * @since 12
9192     */
9193    getSupportedVideoMetaTypes(): Array<VideoMetaType>;
9194
9195    /**
9196     * Attach a meta surface to VideoOutput.
9197     * @param { string } surfaceId - Surface object id used for receiving meta infos.
9198     * @param { VideoMetaType } type - Video meta type.
9199     * @throws { BusinessError } 202 - Not System Application.
9200     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9201     * @throws { BusinessError } 7400201 - Camera service fatal error.
9202     * @syscap SystemCapability.Multimedia.Camera.Core
9203     * @systemapi
9204     * @since 12
9205     */
9206    attachMetaSurface(surfaceId: string, type: VideoMetaType): void;
9207  }
9208
9209  /**
9210   * Video meta type.
9211   *
9212   * @enum { number }
9213   * @syscap SystemCapability.Multimedia.Camera.Core
9214   * @systemapi
9215   * @since 12
9216   */
9217  enum VideoMetaType {
9218    /**
9219     * Video meta type for storing maker info.
9220     * @syscap SystemCapability.Multimedia.Camera.Core
9221     * @systemapi
9222     * @since 12
9223     */
9224    VIDEO_META_MAKER_INFO = 0,
9225  }
9226
9227  /**
9228   * Metadata object type.
9229   *
9230   * @enum { number }
9231   * @syscap SystemCapability.Multimedia.Camera.Core
9232   * @since 10
9233   */
9234  enum MetadataObjectType {
9235    /**
9236     * Face detection type.
9237     *
9238     * @syscap SystemCapability.Multimedia.Camera.Core
9239     * @since 10
9240     */
9241    FACE_DETECTION = 0,
9242
9243    /**
9244     * Human body detection type.
9245     *
9246     * @syscap SystemCapability.Multimedia.Camera.Core
9247     * @systemapi
9248     * @since 13
9249     */
9250    HUMAN_BODY = 1,
9251
9252    /**
9253     * Cat face detection type.
9254     *
9255     * @syscap SystemCapability.Multimedia.Camera.Core
9256     * @systemapi
9257     * @since 13
9258     */
9259    CAT_FACE = 2,
9260
9261    /**
9262     * Cat body detection type.
9263     *
9264     * @syscap SystemCapability.Multimedia.Camera.Core
9265     * @systemapi
9266     * @since 13
9267     */
9268    CAT_BODY = 3,
9269
9270    /**
9271     * Dog face detection type.
9272     *
9273     * @syscap SystemCapability.Multimedia.Camera.Core
9274     * @systemapi
9275     * @since 13
9276     */
9277    DOG_FACE = 4,
9278
9279    /**
9280     * Dog body detection type.
9281     *
9282     * @syscap SystemCapability.Multimedia.Camera.Core
9283     * @systemapi
9284     * @since 13
9285     */
9286    DOG_BODY = 5,
9287
9288    /**
9289     * Salient detection type.
9290     *
9291     * @syscap SystemCapability.Multimedia.Camera.Core
9292     * @systemapi
9293     * @since 13
9294     */
9295    SALIENT_DETECTION = 6,
9296
9297    /**
9298     * Barcode detection type.
9299     *
9300     * @syscap SystemCapability.Multimedia.Camera.Core
9301     * @systemapi
9302     * @since 13
9303     */
9304    BAR_CODE_DETECTION = 7
9305  }
9306
9307  /**
9308   * Enum for light painting tabletype.
9309   *
9310   * @enum { number }
9311   * @syscap SystemCapability.Multimedia.Camera.Core
9312   * @systemapi
9313   * @since 12
9314   */
9315  enum LightPaintingType {
9316    /**
9317     * Traffic trails effect.
9318     *
9319     * @syscap SystemCapability.Multimedia.Camera.Core
9320     * @systemapi
9321     * @since 12
9322     */
9323    TRAFFIC_TRAILS = 0,
9324
9325    /**
9326     * Star trails effect.
9327     *
9328     * @syscap SystemCapability.Multimedia.Camera.Core
9329     * @systemapi
9330     * @since 12
9331     */
9332    STAR_TRAILS = 1,
9333
9334    /**
9335     * Silky water effect.
9336     *
9337     * @syscap SystemCapability.Multimedia.Camera.Core
9338     * @systemapi
9339     * @since 12
9340     */
9341    SILKY_WATER = 2,
9342
9343    /**
9344     * Light graffiti effect.
9345     *
9346     * @syscap SystemCapability.Multimedia.Camera.Core
9347     * @systemapi
9348     * @since 12
9349     */
9350    LIGHT_GRAFFITI = 3
9351  }
9352
9353  /**
9354   * Rectangle definition.
9355   *
9356   * @typedef Rect
9357   * @syscap SystemCapability.Multimedia.Camera.Core
9358   * @since 10
9359   */
9360  interface Rect {
9361    /**
9362     * X coordinator of top left point.
9363     *
9364     * @type { number }
9365     * @syscap SystemCapability.Multimedia.Camera.Core
9366     * @since 10
9367     */
9368    topLeftX: number;
9369    /**
9370     * Y coordinator of top left point.
9371     *
9372     * @type { number }
9373     * @syscap SystemCapability.Multimedia.Camera.Core
9374     * @since 10
9375     */
9376    topLeftY: number;
9377    /**
9378     * Width of this rectangle.
9379     *
9380     * @type { number }
9381     * @syscap SystemCapability.Multimedia.Camera.Core
9382     * @since 10
9383     */
9384    width: number;
9385    /**
9386     * Height of this rectangle.
9387     *
9388     * @type { number }
9389     * @syscap SystemCapability.Multimedia.Camera.Core
9390     * @since 10
9391     */
9392    height: number;
9393  }
9394
9395  /**
9396   * Enum for emotion type.
9397   *
9398   * @enum { number }
9399   * @syscap SystemCapability.Multimedia.Camera.Core
9400   * @systemapi
9401   * @since 13
9402   */
9403  enum Emotion {
9404    /**
9405     * Emotion type: Neutral.
9406     *
9407     * @syscap SystemCapability.Multimedia.Camera.Core
9408     * @systemapi
9409     * @since 13
9410     */
9411    NEUTRAL = 0,
9412
9413    /**
9414     * Emotion type: Sadness.
9415     *
9416     * @syscap SystemCapability.Multimedia.Camera.Core
9417     * @systemapi
9418     * @since 13
9419     */
9420    SADNESS = 1,
9421
9422    /**
9423     * Emotion type: Smile.
9424     *
9425     * @syscap SystemCapability.Multimedia.Camera.Core
9426     * @systemapi
9427     * @since 13
9428     */
9429    SMILE = 2,
9430
9431    /**
9432     * Emotion type: Surprise.
9433     *
9434     * @syscap SystemCapability.Multimedia.Camera.Core
9435     * @systemapi
9436     * @since 13
9437     */
9438    SURPRISE = 3
9439  }
9440
9441  /**
9442   * Metadata object basis.
9443   *
9444   * @typedef MetadataObject
9445   * @syscap SystemCapability.Multimedia.Camera.Core
9446   * @since 10
9447   */
9448  interface MetadataObject {
9449    /**
9450     * Metadata object type.
9451     *
9452     * @type { MetadataObjectType }
9453     * @readonly
9454     * @syscap SystemCapability.Multimedia.Camera.Core
9455     * @since 10
9456     */
9457    readonly type: MetadataObjectType;
9458    /**
9459     * Metadata object timestamp in milliseconds.
9460     *
9461     * @type { number }
9462     * @readonly
9463     * @syscap SystemCapability.Multimedia.Camera.Core
9464     * @since 10
9465     */
9466    readonly timestamp: number;
9467    /**
9468     * The axis-aligned bounding box of detected metadata object.
9469     *
9470     * @type { Rect }
9471     * @readonly
9472     * @syscap SystemCapability.Multimedia.Camera.Core
9473     * @since 10
9474     */
9475    readonly boundingBox: Rect;
9476    /**
9477     * Metadata object id.
9478     *
9479     * @type { number }
9480     * @readonly
9481     * @syscap SystemCapability.Multimedia.Camera.Core
9482     * @systemapi
9483     * @since 13
9484     */
9485    readonly objectId: number;
9486    /**
9487     * Confidence for the detected type.
9488     *
9489     * @type { number }
9490     * @readonly
9491     * @syscap SystemCapability.Multimedia.Camera.Core
9492     * @systemapi
9493     * @since 13
9494     */
9495    readonly confidence: number;
9496  }
9497
9498  /**
9499   * Metadata object for face.
9500   *
9501   * @typedef MetadataFaceObject
9502   * @extends MetadataObject
9503   * @syscap SystemCapability.Multimedia.Camera.Core
9504   * @systemapi
9505   * @since 13
9506   */
9507  interface MetadataFaceObject extends MetadataObject {
9508    /**
9509     * Bounding box for left eye.
9510     *
9511     * @type { Rect }
9512     * @readonly
9513     * @syscap SystemCapability.Multimedia.Camera.Core
9514     * @systemapi
9515     * @since 13
9516     */
9517    readonly leftEyeBoundingBox: Rect;
9518
9519    /**
9520     * Bounding box for right eye.
9521     *
9522     * @type { Rect }
9523     * @readonly
9524     * @syscap SystemCapability.Multimedia.Camera.Core
9525     * @systemapi
9526     * @since 13
9527     */
9528    readonly rightEyeBoundingBox: Rect;
9529
9530    /**
9531     * Emotion type for face.
9532     *
9533     * @type { Emotion }
9534     * @readonly
9535     * @syscap SystemCapability.Multimedia.Camera.Core
9536     * @systemapi
9537     * @since 13
9538     */
9539    readonly emotion: Emotion;
9540
9541    /**
9542     * Emotion confidence.
9543     *
9544     * @type { number }
9545     * @readonly
9546     * @syscap SystemCapability.Multimedia.Camera.Core
9547     * @systemapi
9548     * @since 13
9549     */
9550    readonly emotionConfidence: number;
9551
9552    /**
9553     * Pitch angle for face.
9554     *
9555     * @type { number }
9556     * @readonly
9557     * @syscap SystemCapability.Multimedia.Camera.Core
9558     * @systemapi
9559     * @since 13
9560     */
9561    readonly pitchAngle: number;
9562
9563    /**
9564     * Yaw angle for face.
9565     *
9566     * @type { number }
9567     * @readonly
9568     * @syscap SystemCapability.Multimedia.Camera.Core
9569     * @systemapi
9570     * @since 13
9571     */
9572    readonly yawAngle: number;
9573
9574    /**
9575     * Roll angle for face.
9576     *
9577     * @type { number }
9578     * @readonly
9579     * @syscap SystemCapability.Multimedia.Camera.Core
9580     * @systemapi
9581     * @since 13
9582     */
9583    readonly rollAngle: number;
9584  }
9585
9586  /**
9587   * Metadata object for human body.
9588   *
9589   * @typedef MetadataHumanBodyObject
9590   * @extends MetadataObject
9591   * @syscap SystemCapability.Multimedia.Camera.Core
9592   * @systemapi
9593   * @since 13
9594   */
9595  interface MetadataHumanBodyObject extends MetadataObject {
9596  }
9597
9598  /**
9599   * Metadata object for cat face.
9600   *
9601   * @typedef MetadataCatFaceObject
9602   * @extends MetadataObject
9603   * @syscap SystemCapability.Multimedia.Camera.Core
9604   * @systemapi
9605   * @since 13
9606   */
9607  interface MetadataCatFaceObject extends MetadataObject {
9608    /**
9609     * Bounding box for left eye.
9610     *
9611     * @type { Rect }
9612     * @readonly
9613     * @syscap SystemCapability.Multimedia.Camera.Core
9614     * @systemapi
9615     * @since 13
9616     */
9617    readonly leftEyeBoundingBox: Rect;
9618
9619    /**
9620     * Bounding box for right eye.
9621     *
9622     * @type { Rect }
9623     * @readonly
9624     * @syscap SystemCapability.Multimedia.Camera.Core
9625     * @systemapi
9626     * @since 13
9627     */
9628    readonly rightEyeBoundingBox: Rect;
9629  }
9630
9631  /**
9632   * Metadata object for cat body.
9633   *
9634   * @typedef MetadataCatBodyObject
9635   * @extends MetadataObject
9636   * @syscap SystemCapability.Multimedia.Camera.Core
9637   * @systemapi
9638   * @since 13
9639   */
9640  interface MetadataCatBodyObject extends MetadataObject {
9641  }
9642
9643  /**
9644   * Metadata object for dog face.
9645   *
9646   * @typedef MetadataDogFaceObject
9647   * @extends MetadataObject
9648   * @syscap SystemCapability.Multimedia.Camera.Core
9649   * @systemapi
9650   * @since 13
9651   */
9652  interface MetadataDogFaceObject extends MetadataObject {
9653    /**
9654     * Bounding box for left eye.
9655     *
9656     * @type { Rect }
9657     * @readonly
9658     * @syscap SystemCapability.Multimedia.Camera.Core
9659     * @systemapi
9660     * @since 13
9661     */
9662    readonly leftEyeBoundingBox: Rect;
9663
9664    /**
9665     * Bounding box for right eye.
9666     *
9667     * @type { Rect }
9668     * @readonly
9669     * @syscap SystemCapability.Multimedia.Camera.Core
9670     * @systemapi
9671     * @since 13
9672     */
9673    readonly rightEyeBoundingBox: Rect;
9674  }
9675
9676  /**
9677   * Metadata object for dog body.
9678   *
9679   * @typedef MetadataDogBodyObject
9680   * @extends MetadataObject
9681   * @syscap SystemCapability.Multimedia.Camera.Core
9682   * @systemapi
9683   * @since 13
9684   */
9685  interface MetadataDogBodyObject extends MetadataObject {
9686  }
9687
9688  /**
9689   * Metadata object for salient detection.
9690   *
9691   * @typedef MetadataSalientDetectionObject
9692   * @extends MetadataObject
9693   * @syscap SystemCapability.Multimedia.Camera.Core
9694   * @systemapi
9695   * @since 13
9696   */
9697  interface MetadataSalientDetectionObject extends MetadataObject {
9698  }
9699
9700  /**
9701   * Metadata object for barcode.
9702   *
9703   * @extends MetadataObject
9704   * @typedef MetadataBarcodeObject
9705   * @syscap SystemCapability.Multimedia.Camera.Core
9706   * @systemapi
9707   * @since 14
9708   */
9709  interface MetadataBarcodeObject extends MetadataObject {
9710  }
9711
9712  /**
9713   * Camera Occlusion Detection Result.
9714   *
9715   * @typedef CameraOcclusionDetectionResult
9716   * @syscap SystemCapability.Multimedia.Camera.Core
9717   * @systemapi
9718   * @since 12
9719   */
9720  interface CameraOcclusionDetectionResult {
9721    /**
9722     * Check whether camera is occluded.
9723     *
9724     * @type { boolean }
9725     * @readonly
9726     * @syscap SystemCapability.Multimedia.Camera.Core
9727     * @systemapi
9728     * @since 12
9729     */
9730    readonly isCameraOccluded: boolean;
9731
9732    /**
9733     * Check whether camera lens is dirty.
9734     *
9735     * @type { boolean }
9736     * @readonly
9737     * @syscap SystemCapability.Multimedia.Camera.Core
9738     * @systemapi
9739     * @since 13
9740     */
9741    readonly isCameraLensDirty: boolean;
9742  }
9743
9744  /**
9745   * Metadata Output object
9746   *
9747   * @interface MetadataOutput
9748   * @syscap SystemCapability.Multimedia.Camera.Core
9749   * @since 10
9750   */
9751  interface MetadataOutput extends CameraOutput {
9752    /**
9753     * Start output metadata
9754     *
9755     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9756     * @throws { BusinessError } 7400103 - Session not config.
9757     * @throws { BusinessError } 7400201 - Camera service fatal error.
9758     * @syscap SystemCapability.Multimedia.Camera.Core
9759     * @since 10
9760     */
9761    start(callback: AsyncCallback<void>): void;
9762
9763    /**
9764     * Start output metadata
9765     *
9766     * @returns { Promise<void> } Promise used to return the result.
9767     * @throws { BusinessError } 7400103 - Session not config.
9768     * @throws { BusinessError } 7400201 - Camera service fatal error.
9769     * @syscap SystemCapability.Multimedia.Camera.Core
9770     * @since 10
9771     */
9772    start(): Promise<void>;
9773
9774    /**
9775     * Stop output metadata
9776     *
9777     * @param { AsyncCallback<void> } callback - Callback used to return the result.
9778     * @syscap SystemCapability.Multimedia.Camera.Core
9779     * @since 10
9780     */
9781    stop(callback: AsyncCallback<void>): void;
9782
9783    /**
9784     * Stop output metadata
9785     *
9786     * @returns { Promise<void> } Promise used to return the result.
9787     * @syscap SystemCapability.Multimedia.Camera.Core
9788     * @since 10
9789     */
9790    stop(): Promise<void>;
9791
9792    /**
9793     * Add metadata object types.
9794     *
9795     * @param { Array<MetadataObjectType> } types - Object types to be added.
9796     * @throws { BusinessError } 202 - Not System Application.
9797     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9798     * @throws { BusinessError } 7400103 - Session not config.
9799     * @throws { BusinessError } 7400201 - Camera service fatal error.
9800     * @syscap SystemCapability.Multimedia.Camera.Core
9801     * @systemapi
9802     * @since 13
9803     */
9804    addMetadataObjectTypes(types: Array<MetadataObjectType>): void;
9805
9806    /**
9807     * Remove metadata object types.
9808     *
9809     * @param { Array<MetadataObjectType> } types - Object types to be removed.
9810     * @throws { BusinessError } 202 - Not System Application.
9811     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
9812     * @throws { BusinessError } 7400103 - Session not config.
9813     * @throws { BusinessError } 7400201 - Camera service fatal error.
9814     * @syscap SystemCapability.Multimedia.Camera.Core
9815     * @systemapi
9816     * @since 13
9817     */
9818    removeMetadataObjectTypes(types: Array<MetadataObjectType>): void;
9819
9820    /**
9821     * Subscribes to metadata objects available event callback.
9822     *
9823     * @param { 'metadataObjectsAvailable' } type - Event type.
9824     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
9825     * @syscap SystemCapability.Multimedia.Camera.Core
9826     * @since 10
9827     */
9828    on(type: 'metadataObjectsAvailable', callback: AsyncCallback<Array<MetadataObject>>): void;
9829
9830    /**
9831     * Unsubscribes from metadata objects available event callback.
9832     *
9833     * @param { 'metadataObjectsAvailable' } type - Event type.
9834     * @param { AsyncCallback<Array<MetadataObject>> } callback - Callback used to get the available metadata objects.
9835     * @syscap SystemCapability.Multimedia.Camera.Core
9836     * @since 10
9837     */
9838    off(type: 'metadataObjectsAvailable', callback?: AsyncCallback<Array<MetadataObject>>): void;
9839
9840    /**
9841     * Subscribes to error events.
9842     *
9843     * @param { 'error' } type - Event type.
9844     * @param { ErrorCallback } callback - Callback used to get the video output errors.
9845     * @syscap SystemCapability.Multimedia.Camera.Core
9846     * @since 10
9847     */
9848    on(type: 'error', callback: ErrorCallback): void;
9849
9850    /**
9851     * Unsubscribes from error events.
9852     *
9853     * @param { 'error' } type - Event type.
9854     * @param { ErrorCallback } callback - Callback used to get the video output errors.
9855     * @syscap SystemCapability.Multimedia.Camera.Core
9856     * @since 10
9857     */
9858    off(type: 'error', callback?: ErrorCallback): void;
9859  }
9860
9861  /**
9862   * Enumerates the timelapse recording state.
9863   *
9864   * @enum { number }
9865   * @syscap SystemCapability.Multimedia.Camera.Core
9866   * @systemapi
9867   * @since 12
9868   */
9869  enum TimeLapseRecordState {
9870    /**
9871     * TimeLapse idle state.
9872     *
9873     * @syscap SystemCapability.Multimedia.Camera.Core
9874     * @systemapi
9875     * @since 12
9876     */
9877    IDLE = 0,
9878
9879    /**
9880     * TimeLapse recording state.
9881     *
9882     * @syscap SystemCapability.Multimedia.Camera.Core
9883     * @systemapi
9884     * @since 12
9885     */
9886    RECORDING = 1
9887  }
9888
9889  /**
9890   * Enumerates the timelapse preview type.
9891   *
9892   * @enum { number }
9893   * @syscap SystemCapability.Multimedia.Camera.Core
9894   * @systemapi
9895   * @since 12
9896   */
9897  enum TimeLapsePreviewType {
9898    /**
9899     * TimeLapse dark preview.
9900     *
9901     * @syscap SystemCapability.Multimedia.Camera.Core
9902     * @systemapi
9903     * @since 12
9904     */
9905    DARK = 1,
9906
9907    /**
9908     * TimeLapse Light preview.
9909     *
9910     * @syscap SystemCapability.Multimedia.Camera.Core
9911     * @systemapi
9912     * @since 12
9913     */
9914    LIGHT = 2
9915  }
9916
9917  /**
9918   * Try AE information.
9919   *
9920   * @typedef TryAEInfo
9921   * @syscap SystemCapability.Multimedia.Camera.Core
9922   * @systemapi
9923   * @since 12
9924   */
9925  interface TryAEInfo {
9926    /**
9927     * Determine whether try AE is done.
9928     *
9929     * @type { boolean }
9930     * @readonly
9931     * @syscap SystemCapability.Multimedia.Camera.Core
9932     * @systemapi
9933     * @since 12
9934     */
9935    readonly isTryAEDone: boolean;
9936
9937    /**
9938     * Determine whether AE hint is needed.
9939     *
9940     * @type { ?boolean }
9941     * @readonly
9942     * @syscap SystemCapability.Multimedia.Camera.Core
9943     * @systemapi
9944     * @since 12
9945     */
9946    readonly isTryAEHintNeeded?: boolean;
9947
9948    /**
9949     * Timelapse preview type.
9950     *
9951     * @type { ?TimeLapsePreviewType }
9952     * @readonly
9953     * @syscap SystemCapability.Multimedia.Camera.Core
9954     * @systemapi
9955     * @since 12
9956     */
9957    readonly previewType?: TimeLapsePreviewType;
9958
9959    /**
9960     * Timelapse capture interval.
9961     *
9962     * @type { ?number }
9963     * @readonly
9964     * @syscap SystemCapability.Multimedia.Camera.Core
9965     * @systemapi
9966     * @since 12
9967     */
9968    readonly captureInterval?: number;
9969  }
9970
9971  /**
9972   * Timelapse photo session object.
9973   *
9974   * @interface TimeLapsePhotoSession
9975   * @syscap SystemCapability.Multimedia.Camera.Core
9976   * @systemapi
9977   * @since 12
9978   */
9979  interface TimeLapsePhotoSession extends Session, Focus, ManualFocus, AutoExposure, ManualExposure, ManualIso, WhiteBalance, Zoom, ColorEffect {
9980    /**
9981     * Subscribes to error events.
9982     *
9983     * @param { 'error' } type - Event type.
9984     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
9985     * @throws { BusinessError } 202 - Not System Application.
9986     * @syscap SystemCapability.Multimedia.Camera.Core
9987     * @systemapi
9988     * @since 12
9989     */
9990    on(type: 'error', callback: ErrorCallback): void;
9991
9992    /**
9993     * Unsubscribes from error events.
9994     *
9995     * @param { 'error' } type - Event type.
9996     * @param { ErrorCallback } callback - Callback used to get the capture session errors.
9997     * @throws { BusinessError } 202 - Not System Application.
9998     * @syscap SystemCapability.Multimedia.Camera.Core
9999     * @systemapi
10000     * @since 12
10001     */
10002    off(type: 'error', callback?: ErrorCallback): void;
10003
10004    /**
10005     * Subscribes focus state change event callback.
10006     *
10007     * @param { 'focusStateChange' } type - Event type.
10008     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
10009     * @throws { BusinessError } 202 - Not System Application.
10010     * @syscap SystemCapability.Multimedia.Camera.Core
10011     * @systemapi
10012     * @since 12
10013     */
10014    on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void;
10015
10016    /**
10017     * Unsubscribes from focus state change event callback.
10018     *
10019     * @param { 'focusStateChange' } type - Event type.
10020     * @param { AsyncCallback<FocusState> } callback - Callback used to get the focus state change.
10021     * @throws { BusinessError } 202 - Not System Application.
10022     * @syscap SystemCapability.Multimedia.Camera.Core
10023     * @systemapi
10024     * @since 12
10025     */
10026    off(type: 'focusStateChange', callback?: AsyncCallback<FocusState>): void;
10027
10028    /**
10029     * Subscribes ISO info event callback.
10030     *
10031     * @param { 'isoInfoChange' } type - Event type.
10032     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
10033     * @throws { BusinessError } 202 - Not System Application.
10034     * @syscap SystemCapability.Multimedia.Camera.Core
10035     * @systemapi
10036     * @since 12
10037     */
10038    on(type: 'isoInfoChange', callback: AsyncCallback<IsoInfo>): void;
10039
10040    /**
10041     * Unsubscribes from ISO info event callback.
10042     *
10043     * @param { 'isoInfoChange' } type - Event type.
10044     * @param { AsyncCallback<IsoInfo> } callback - Callback used to get the ISO info.
10045     * @throws { BusinessError } 202 - Not System Application.
10046     * @syscap SystemCapability.Multimedia.Camera.Core
10047     * @systemapi
10048     * @since 12
10049     */
10050    off(type: 'isoInfoChange', callback?: AsyncCallback<IsoInfo>): void;
10051
10052    /**
10053     * Subscribes exposure info event callback.
10054     *
10055     * @param { 'exposureInfoChange' } type - Event type.
10056     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
10057     * @throws { BusinessError } 202 - Not System Application.
10058     * @syscap SystemCapability.Multimedia.Camera.Core
10059     * @systemapi
10060     * @since 12
10061     */
10062    on(type: 'exposureInfoChange', callback: AsyncCallback<ExposureInfo>): void;
10063
10064    /**
10065     * Unsubscribes from exposure info event callback.
10066     *
10067     * @param { 'exposureInfoChange' } type - Event type.
10068     * @param { AsyncCallback<ExposureInfo> } callback - Callback used to get the exposure info.
10069     * @throws { BusinessError } 202 - Not System Application.
10070     * @syscap SystemCapability.Multimedia.Camera.Core
10071     * @systemapi
10072     * @since 12
10073     */
10074    off(type: 'exposureInfoChange', callback?: AsyncCallback<ExposureInfo>): void;
10075
10076    /**
10077     * Subscribes lumination info event callback.
10078     *
10079     * @param { 'luminationInfoChange' } type - Event type.
10080     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
10081     * @throws { BusinessError } 202 - Not System Application.
10082     * @syscap SystemCapability.Multimedia.Camera.Core
10083     * @systemapi
10084     * @since 12
10085     */
10086    on(type: 'luminationInfoChange', callback: AsyncCallback<LuminationInfo>): void;
10087
10088    /**
10089     * Unsubscribes from lumination info event callback.
10090     *
10091     * @param { 'luminationInfoChange' } type - Event type.
10092     * @param { AsyncCallback<LuminationInfo> } callback - Callback used to get the lumination info.
10093     * @throws { BusinessError } 202 - Not System Application.
10094     * @syscap SystemCapability.Multimedia.Camera.Core
10095     * @systemapi
10096     * @since 12
10097     */
10098    off(type: 'luminationInfoChange', callback?: AsyncCallback<LuminationInfo>): void;
10099
10100    /**
10101     * Check whether try AE is needed.
10102     *
10103     * @returns { boolean } Is try AE needed.
10104     * @throws { BusinessError } 202 - Not System Application.
10105     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
10106     * @syscap SystemCapability.Multimedia.Camera.Core
10107     * @systemapi
10108     * @since 12
10109     */
10110    isTryAENeeded(): boolean;
10111
10112    /**
10113     * Start try AE.
10114     *
10115     * @throws { BusinessError } 202 - Not System Application.
10116     * @throws { BusinessError } 7400103 - Session not config.
10117     * @throws { BusinessError } 7400201 - Camera service fatal error.
10118     * @syscap SystemCapability.Multimedia.Camera.Core
10119     * @systemapi
10120     * @since 12
10121     */
10122    startTryAE(): void;
10123
10124    /**
10125     * Stop try AE.
10126     *
10127     * @throws { BusinessError } 202 - Not System Application.
10128     * @throws { BusinessError } 7400103 - Session not config.
10129     * @throws { BusinessError } 7400201 - Camera service fatal error.
10130     * @syscap SystemCapability.Multimedia.Camera.Core
10131     * @systemapi
10132     * @since 12
10133     */
10134    stopTryAE(): void;
10135
10136    /**
10137     * Subscribes try AE info event callback.
10138     *
10139     * @param { 'tryAEInfoChange' } type - Event type.
10140     * @param { AsyncCallback<TryAEInfo> } callback - Callback used to get the try AE info.
10141     * @throws { BusinessError } 202 - Not System Application.
10142     * @syscap SystemCapability.Multimedia.Camera.Core
10143     * @systemapi
10144     * @since 12
10145     */
10146    on(type: 'tryAEInfoChange', callback: AsyncCallback<TryAEInfo>): void;
10147
10148    /**
10149     * Unsubscribes from try AE info event callback.
10150     *
10151     * @param { 'tryAEInfoChange' } type - Event type.
10152     * @param { AsyncCallback<TryAEInfo> } callback - Callback used to get the try AE info.
10153     * @throws { BusinessError } 202 - Not System Application.
10154     * @syscap SystemCapability.Multimedia.Camera.Core
10155     * @systemapi
10156     * @since 12
10157     */
10158    off(type: 'tryAEInfoChange', callback?: AsyncCallback<TryAEInfo>): void;
10159
10160    /**
10161     * Gets supported timelapse interval range.
10162     *
10163     * @returns { Array<number> } Timelapse interval range.
10164     * @throws { BusinessError } 202 - Not System Application.
10165     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
10166     * @syscap SystemCapability.Multimedia.Camera.Core
10167     * @systemapi
10168     * @since 12
10169     */
10170    getSupportedTimeLapseIntervalRange(): Array<number>;
10171
10172    /**
10173     * Gets the timelapse interval in use.
10174     *
10175     * @returns { number } the timelapse interval in use.
10176     * @throws { BusinessError } 202 - Not System Application.
10177     * @throws { BusinessError } 7400103 - Session not config.
10178     * @syscap SystemCapability.Multimedia.Camera.Core
10179     * @systemapi
10180     * @since 12
10181     */
10182    getTimeLapseInterval(): number;
10183
10184    /**
10185     * Sets a timelapse interval for a camera device.
10186     *
10187     * @param { number } interval The timelapse interval.
10188     * @throws { BusinessError } 202 - Not System Application.
10189     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
10190     * @throws { BusinessError } 7400103 - Session not config.
10191     * @syscap SystemCapability.Multimedia.Camera.Core
10192     * @systemapi
10193     * @since 12
10194     */
10195    setTimeLapseInterval(interval: number): void;
10196
10197    /**
10198     * Gets the timelapse recording state in use.
10199     *
10200     * @returns { TimeLapseRecordState } the timelapse recording state in use.
10201     * @throws { BusinessError } 202 - Not System Application.
10202     * @throws { BusinessError } 7400103 - Session not config.
10203     * @syscap SystemCapability.Multimedia.Camera.Core
10204     * @systemapi
10205     * @since 12
10206     */
10207    getTimeLapseRecordState(): TimeLapseRecordState;
10208
10209    /**
10210     * Sets a timelapse recording state.
10211     *
10212     * @param { TimeLapseRecordState } state The timelapse recording state.
10213     * @throws { BusinessError } 202 - Not System Application.
10214     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
10215     * @throws { BusinessError } 7400103 - Session not config.
10216     * @syscap SystemCapability.Multimedia.Camera.Core
10217     * @systemapi
10218     * @since 12
10219     */
10220    setTimeLapseRecordState(state: TimeLapseRecordState): void;
10221
10222    /**
10223     * Gets the timelapse preview type in use.
10224     *
10225     * @returns { TimeLapsePreviewType } the timelapse preview type in use.
10226     * @throws { BusinessError } 202 - Not System Application.
10227     * @throws { BusinessError } 7400103 - Session not config.
10228     * @syscap SystemCapability.Multimedia.Camera.Core
10229     * @systemapi
10230     * @since 12
10231     */
10232    getTimeLapsePreviewType(): TimeLapsePreviewType;
10233
10234    /**
10235     * Sets a timelapse preview type.
10236     *
10237     * @param { TimeLapsePreviewType } type The timelapse preview type.
10238     * @throws { BusinessError } 202 - Not System Application.
10239     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
10240     * @throws { BusinessError } 7400103 - Session not config.
10241     * @syscap SystemCapability.Multimedia.Camera.Core
10242     * @systemapi
10243     * @since 12
10244     */
10245    setTimeLapsePreviewType(type: TimeLapsePreviewType): void;
10246  }
10247
10248  /**
10249   * Enum for Depth Data Accuracy.
10250   *
10251   * @enum { number }
10252   * @syscap SystemCapability.Multimedia.Camera.Core
10253   * @systemapi
10254   * @since 13
10255   */
10256  enum DepthDataAccuracy {
10257    /**
10258     * Relative accuracy depth data.
10259     *
10260     * @syscap SystemCapability.Multimedia.Camera.Core
10261     * @systemapi
10262     * @since 13
10263     */
10264    DEPTH_DATA_ACCURACY_RELATIVE = 0,
10265
10266    /**
10267     * Absolute accuracy depth data.
10268     *
10269     * @syscap SystemCapability.Multimedia.Camera.Core
10270     * @systemapi
10271     * @since 13
10272     */
10273    DEPTH_DATA_ACCURACY_ABSOLUTE = 1
10274  }
10275
10276  /**
10277   * Enum for Depth Data Quality Level.
10278   *
10279   * @enum { number }
10280   * @syscap SystemCapability.Multimedia.Camera.Core
10281   * @systemapi
10282   * @since 13
10283   */
10284  enum DepthDataQualityLevel {
10285    /**
10286     * Depth data quality is bad.
10287     *
10288     * @syscap SystemCapability.Multimedia.Camera.Core
10289     * @systemapi
10290     * @since 13
10291     */
10292    DEPTH_DATA_QUALITY_BAD = 0,
10293
10294    /**
10295     * Depth data quality is fair.
10296     *
10297     * @syscap SystemCapability.Multimedia.Camera.Core
10298     * @systemapi
10299     * @since 13
10300     */
10301    DEPTH_DATA_QUALITY_FAIR = 1,
10302
10303    /**
10304     * Depth data quality is good.
10305     *
10306     * @syscap SystemCapability.Multimedia.Camera.Core
10307     * @systemapi
10308     * @since 13
10309     */
10310    DEPTH_DATA_QUALITY_GOOD = 2
10311  }
10312
10313  /**
10314   * Depth Profile.
10315   *
10316   * @interface DepthProfile
10317   * @syscap SystemCapability.Multimedia.Camera.Core
10318   * @systemapi
10319   * @since 13
10320   */
10321  interface DepthProfile {
10322    /**
10323     * Depth data format.
10324     *
10325     * @type { CameraFormat }
10326     * @readonly
10327     * @syscap SystemCapability.Multimedia.Camera.Core
10328     * @systemapi
10329     * @since 13
10330     */
10331    readonly format: CameraFormat;
10332
10333    /**
10334     * Depth data accuracy.
10335     *
10336     * @type { DepthDataAccuracy }
10337     * @readonly
10338     * @syscap SystemCapability.Multimedia.Camera.Core
10339     * @systemapi
10340     * @since 13
10341     */
10342    readonly dataAccuracy: DepthDataAccuracy;
10343
10344    /**
10345     * Depth data resolution.
10346     *
10347     * @type { Size }
10348     * @readonly
10349     * @syscap SystemCapability.Multimedia.Camera.Core
10350     * @systemapi
10351     * @since 13
10352     */
10353    readonly size: Size;
10354  }
10355
10356  /**
10357   * Depth Data.
10358   *
10359   * @interface DepthData.
10360   * @syscap SystemCapability.Multimedia.Camera.Core
10361   * @systemapi
10362   * @since 13
10363   */
10364  interface DepthData {
10365    /**
10366     * Depth data format.
10367     *
10368     * @type { CameraFormat }
10369     * @readonly
10370     * @syscap SystemCapability.Multimedia.Camera.Core
10371     * @systemapi
10372     * @since 13
10373     */
10374    readonly format: CameraFormat;
10375
10376    /**
10377     * Depth data map.
10378     *
10379     * @type { image.PixelMap }
10380     * @readonly
10381     * @syscap SystemCapability.Multimedia.Camera.Core
10382     * @systemapi
10383     * @since 13
10384     */
10385    readonly depthMap: image.PixelMap;
10386
10387    /**
10388     * Depth data quality level.
10389     *
10390     * @type { DepthDataQualityLevel }
10391     * @readonly
10392     * @syscap SystemCapability.Multimedia.Camera.Core
10393     * @systemapi
10394     * @since 13
10395     */
10396    readonly qualityLevel: DepthDataQualityLevel;
10397
10398    /**
10399     * Depth data accuracy.
10400     *
10401     * @type { DepthDataAccuracy }
10402     * @readonly
10403     * @syscap SystemCapability.Multimedia.Camera.Core
10404     * @systemapi
10405     * @since 13
10406     */
10407    readonly dataAccuracy: DepthDataAccuracy;
10408
10409    /**
10410     * Release depth data object.
10411     *
10412     * @returns { Promise<void> } Promise used to return the result.
10413     * @throws { BusinessError } 202 - Not System Application.
10414     * @syscap SystemCapability.Multimedia.Camera.Core
10415     * @systemapi
10416     * @since 13
10417     */
10418    release(): Promise<void>;
10419  }
10420
10421  /**
10422   * Depth Data Output object
10423   *
10424   * @interface DepthDataOutput
10425   * @extends CameraOutput
10426   * @syscap SystemCapability.Multimedia.Camera.Core
10427   * @systemapi
10428   * @since 13
10429   */
10430  interface DepthDataOutput extends CameraOutput {
10431    /**
10432     * Start depth data output.
10433     *
10434     * @returns { Promise<void> } Promise used to return the result.
10435     * @throws { BusinessError } 202 - Not System Application.
10436     * @throws { BusinessError } 7400103 - Session not config.
10437     * @throws { BusinessError } 7400201 - Camera service fatal error.
10438     * @syscap SystemCapability.Multimedia.Camera.Core
10439     * @systemapi
10440     * @since 13
10441     */
10442    start(): Promise<void>;
10443
10444    /**
10445     * Stop depth data output.
10446     *
10447     * @returns { Promise<void> } Promise used to return the result.
10448     * @throws { BusinessError } 202 - Not System Application.
10449     * @throws { BusinessError } 7400103 - Session not config.
10450     * @throws { BusinessError } 7400201 - Camera service fatal error.
10451     * @syscap SystemCapability.Multimedia.Camera.Core
10452     * @systemapi
10453     * @since 13
10454     */
10455    stop(): Promise<void>;
10456
10457    /**
10458     * Subscribes to depth data objects available event callback.
10459     *
10460     * @param { 'depthDataAvailable' } type - Event type.
10461     * @param { AsyncCallback<DepthData> } callback - Callback used to get the available DepthData objects.
10462     * @throws { BusinessError } 202 - Not System Application.
10463     * @syscap SystemCapability.Multimedia.Camera.Core
10464     * @systemapi
10465     * @since 13
10466     */
10467    on(type: 'depthDataAvailable', callback: AsyncCallback<DepthData>): void;
10468
10469    /**
10470     * Unsubscribes from depth data objects available event callback.
10471     *
10472     * @param { 'depthDataAvailable' } type - Event type.
10473     * @param { AsyncCallback<DepthData> } callback - Callback used to get the available DepthData objects.
10474     * @throws { BusinessError } 202 - Not System Application.
10475     * @syscap SystemCapability.Multimedia.Camera.Core
10476     * @systemapi
10477     * @since 13
10478     */
10479    off(type: 'depthDataAvailable', callback?: AsyncCallback<DepthData>): void;
10480
10481    /**
10482     * Subscribes to error events.
10483     *
10484     * @param { 'error' } type - Event type.
10485     * @param { ErrorCallback } callback - Callback used to get the video output errors.
10486     * @throws { BusinessError } 202 - Not System Application.
10487     * @syscap SystemCapability.Multimedia.Camera.Core
10488     * @systemapi
10489     * @since 13
10490     */
10491    on(type: 'error', callback: ErrorCallback): void;
10492
10493    /**
10494     * Unsubscribes from error events.
10495     *
10496     * @param { 'error' } type - Event type.
10497     * @param { ErrorCallback } callback - Callback used to get the video output errors.
10498     * @throws { BusinessError } 202 - Not System Application.
10499     * @syscap SystemCapability.Multimedia.Camera.Core
10500     * @systemapi
10501     * @since 13
10502     */
10503    off(type: 'error', callback?: ErrorCallback): void;
10504  }
10505
10506  /**
10507   * Depth Fusion Query object.
10508   *
10509   * @interface DepthFusionQuery
10510   * @syscap SystemCapability.Multimedia.Camera.Core
10511   * @systemapi
10512   * @since 14
10513   */
10514  interface DepthFusionQuery {
10515    /**
10516     * Checks whether a depth fusion is supported.
10517     *
10518     * @returns { boolean } Is the depth fusion supported.
10519     * @throws { BusinessError } 202 - Not System Application.
10520     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
10521     * @syscap SystemCapability.Multimedia.Camera.Core
10522     * @systemapi
10523     * @since 14
10524     */
10525    isDepthFusionSupported(): boolean;
10526
10527    /**
10528     * Query the depth fusion threshold.
10529     *
10530     * @returns { Array<number> } The depth fusion threshold.
10531     * @throws { BusinessError } 202 - Not System Application.
10532     * @throws { BusinessError } 7400103 - Session not config, only throw in session usage.
10533     * @syscap SystemCapability.Multimedia.Camera.Core
10534     * @systemapi
10535     * @since 14
10536     */
10537    getDepthFusionThreshold(): Array<number>;
10538  }
10539
10540  /**
10541   * Depth Fusion object.
10542   *
10543   * @extends DepthFusionQuery
10544   * @interface DepthFusion
10545   * @syscap SystemCapability.Multimedia.Camera.Core
10546   * @systemapi
10547   * @since 14
10548   */
10549  interface DepthFusion extends DepthFusionQuery {
10550    /**
10551     * Confirm if the depth fusion enabled.
10552     *
10553     * @returns { boolean } TRUE if the depth fusion is enable.
10554     * @throws { BusinessError } 202 - Not System Application.
10555     * @throws { BusinessError } 7400103 - Session not config.
10556     * @syscap SystemCapability.Multimedia.Camera.Core
10557     * @systemapi
10558     * @since 14
10559     */
10560    isDepthFusionEnabled(): boolean;
10561
10562    /**
10563     * Enable depth fusion.
10564     *
10565     * @param { boolean } enabled - Target state for depth fusion.
10566     * @throws { BusinessError } 202 - Not System Application.
10567     * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect.
10568     * @throws { BusinessError } 7400103 - Session not config.
10569     * @throws { BusinessError } 7400201 - Camera service fatal error.
10570     * @syscap SystemCapability.Multimedia.Camera.Core
10571     * @systemapi
10572     * @since 14
10573     */
10574    enableDepthFusion(enabled: boolean): void;
10575  }
10576}
10577
10578export default camera;
10579