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 icamera_host_callback.h 18 * 19 * @brief Declares callbacks for status changes of cameras and flashes. The caller needs to implement the callbacks. 20 * 21 * @since 3.2 22 * @version 1.0 23 */ 24 25package ohos.hdi.camera.v1_0; 26 27import ohos.hdi.camera.v1_0.Types; 28 29[callback] interface ICameraHostCallback { 30 /** 31 * @brief Called when the camera status changes to report the latest status. 32 * 33 * @param cameraId Indicates the ID of the camera whose status changes. 34 * @param status Indicates the latest status of the camera. 35 * 36 * @since 3.2 37 * @version 1.0 38 */ 39 OnCameraStatus([in] String cameraId, [in] enum CameraStatus status); 40 41 /** 42 * @brief Called when the flash status changes to report the latest status. 43 * 44 * @param cameraId Indicates the ID of the camera to which the flash whose status changes is bound. 45 * @param status Indicates the latest status of the flash. 46 * 47 * @since 3.2 48 * @version 1.0 49 */ 50 OnFlashlightStatus([in] String cameraId, [in] enum FlashlightStatus status); 51 52 /** 53 * @brief Called when the camera event occurs. 54 * 55 * @param cameraId Indicates the ID of the camera to which the camera event is bound. 56 * @param event Indicates the camera event type. 57 * 58 * @since 3.2 59 * @version 1.0 60 */ 61 OnCameraEvent([in] String cameraId, [in] enum CameraEvent event); 62} 63