1/* 2 * Copyright (c) 2023 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.h 18 * 19 * @brief Management class of the camera service that provides Hardware Driver Interfaces (HDIs) for the upper layer. 20 * 21 * @since 4.0 22 * @version 1.1 23 */ 24 25package ohos.hdi.camera.v1_1; 26 27import ohos.hdi.camera.v1_0.ICameraDeviceCallback; 28import ohos.hdi.camera.v1_0.ICameraHost; 29import ohos.hdi.camera.v1_1.ICameraDevice; 30import ohos.hdi.camera.v1_1.Types; 31 32interface ICameraHost extends ohos.hdi.camera.v1_0.ICameraHost { 33 /** 34 * @brief Opens a camera device. 35 * 36 * By calling this function, you can obtain the <b>ICameraDevice</b> instance and operate the 37 * specific camera device mapping to the instance. 38 * 39 * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. 40 * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. 41 * @param device Indicates the <b>ICameraDevice</b> instance corresponding to the ID of the camera device. 42 * 43 * @return Returns <b>NO_ERROR</b> if the operation is successful; returns an error code defined 44 * in {@link CamRetCode} otherwise. 45 * 46 * @since 4.0 47 * @version 1.1 48 */ 49 OpenCamera_V1_1([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); 50 51 /** 52 * @brief Prelaunch a camera device. 53 * 54 * This function can be called when user touch camera application icon to accelerate the startup 55 * of the camera device specified by <b>cameraId</b>. 56 * 57 * @param config Indicates the preluanch configuration,which can be ignored currently. For details, see {@link PrelaunchConfig}. 58 * 59 * @return Returns <b>NO_ERROR</b> if the operation is successful; returns an error code defined 60 * in {@link CamRetCode} otherwise. 61 * 62 * @since 4.0 63 * @version 1.1 64 */ 65 Prelaunch([in] struct PrelaunchConfig config); 66} 67