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