From 90eb66dd1a1ff2ac5501e67f3d852804fd822de5 Mon Sep 17 00:00:00 2001 From: liudimin Date: Tue, 29 Aug 2023 19:00:55 +0800 Subject: [PATCH] Add camera 1.2 interface folder. Signed-off-by: liudimin --- camera/v1_2/BUILD.gn | 36 +++++++++++++++++++++++++++++ camera/v1_2/ICameraHost.idl | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 camera/v1_2/BUILD.gn create mode 100644 camera/v1_2/ICameraHost.idl diff --git a/camera/v1_2/BUILD.gn b/camera/v1_2/BUILD.gn new file mode 100644 index 00000000..cba11a93 --- /dev/null +++ b/camera/v1_2/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//drivers/hdf_core/adapter/uhdf2/hdi.gni") +if (defined(ohos_lite)) { + group("libcamera_proxy_1.2") { + deps = [] + public_configs = [] + } +} else { + hdi("camera") { + module_name = "camera_service" + imports = [ "ohos.hdi.camera.v1_1:camera" ] + + sources = [ "ICameraHost.idl" ] + + sequenceable_pub_deps = [ + "../sequenceable/buffer_producer:libbuffer_producer_sequenceable_1.0", + ] + sequenceable_ext_deps = [ "graphic_chipsetsdk:surface" ] + + language = "cpp" + subsystem_name = "hdf" + part_name = "drivers_interface_camera" + } +} diff --git a/camera/v1_2/ICameraHost.idl b/camera/v1_2/ICameraHost.idl new file mode 100644 index 00000000..5101f0a7 --- /dev/null +++ b/camera/v1_2/ICameraHost.idl @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file icamera_host.h + * + * @brief Management class of the camera service that provides Hardware Driver Interfaces (HDIs) for the upper layer. + * + * @since 4.1 + * @version 1.2 + */ + +package ohos.hdi.camera.v1_2; + +import ohos.hdi.camera.v1_1.ICameraDevice; + +interface ICameraHost extends ohos.hdi.camera.v1_1.ICameraHost { + /** + * @brief Notify the device vendor of the device status change. + * + * By calling this function, you can notify the device vendor of the device status change. + * + * @param notifyType Indicates the type of the notify. + * @param deviceState Indicates the state of the device. + * + * @return Returns NO_ERROR if the operation is successful; returns an error code defined + * in {@link CamRetCode} otherwise. + * + * @since 4.1 + * @version 1.2 + */ + NotifyDeviceStateChangeInfo([in] int notifyType, [in] int deviceState); +} -- Gitee