1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci/**
17c5e268c6Sopenharmony_ci * @file IDCameraProvider.idl
18c5e268c6Sopenharmony_ci *
19c5e268c6Sopenharmony_ci * @brief Transfer interfaces call between distributed camera SA service and distributed camera HDF service,
20c5e268c6Sopenharmony_ci * and provide Hardware Driver Interfaces (HDIs) for the upper layer.
21c5e268c6Sopenharmony_ci *
22c5e268c6Sopenharmony_ci * @since 5.0
23c5e268c6Sopenharmony_ci * @version 1.1
24c5e268c6Sopenharmony_ci */
25c5e268c6Sopenharmony_ci
26c5e268c6Sopenharmony_cipackage ohos.hdi.distributed_camera.v1_1;
27c5e268c6Sopenharmony_ci
28c5e268c6Sopenharmony_ciimport ohos.hdi.distributed_camera.v1_1.DCameraTypes;
29c5e268c6Sopenharmony_ciimport ohos.hdi.distributed_camera.v1_1.IDCameraProviderCallback;
30c5e268c6Sopenharmony_ci
31c5e268c6Sopenharmony_ciinterface IDCameraProvider {
32c5e268c6Sopenharmony_ci    /**
33c5e268c6Sopenharmony_ci     * @brief Enable distributed camera device and set callback. For details about the callbacks,
34c5e268c6Sopenharmony_ci     * see {@link IDCameraProviderCallback}.
35c5e268c6Sopenharmony_ci     *
36c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info.
37c5e268c6Sopenharmony_ci     *
38c5e268c6Sopenharmony_ci     * @param abilityInfo [in] The static capability info of the distributed camera device to be enabled.
39c5e268c6Sopenharmony_ci     *
40c5e268c6Sopenharmony_ci     * @param callbackObj [in] Indicates the callbacks to set.
41c5e268c6Sopenharmony_ci     *
42c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
43c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
44c5e268c6Sopenharmony_ci     *
45c5e268c6Sopenharmony_ci     * @since 5.0
46c5e268c6Sopenharmony_ci     * @version 1.1
47c5e268c6Sopenharmony_ci     */
48c5e268c6Sopenharmony_ci    EnableDCameraDevice([in] struct DHBase dhBase,[in] String abilityInfo,[in] IDCameraProviderCallback callbackObj);
49c5e268c6Sopenharmony_ci
50c5e268c6Sopenharmony_ci    /**
51c5e268c6Sopenharmony_ci     * @brief Disable distributed camera device.
52c5e268c6Sopenharmony_ci     *
53c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info
54c5e268c6Sopenharmony_ci     *
55c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
56c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
57c5e268c6Sopenharmony_ci     *
58c5e268c6Sopenharmony_ci     * @since 5.0
59c5e268c6Sopenharmony_ci     * @version 1.1
60c5e268c6Sopenharmony_ci     */
61c5e268c6Sopenharmony_ci    DisableDCameraDevice([in] struct DHBase dhBase);
62c5e268c6Sopenharmony_ci
63c5e268c6Sopenharmony_ci    /**
64c5e268c6Sopenharmony_ci     * @brief Acquire a frame buffer from the procedure handle which attached to the streamId.
65c5e268c6Sopenharmony_ci     *
66c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info
67c5e268c6Sopenharmony_ci     *
68c5e268c6Sopenharmony_ci     * @param streamId [in] Indicates the ID of the stream to which the procedure handle is to be attached.
69c5e268c6Sopenharmony_ci     *
70c5e268c6Sopenharmony_ci     * @param buffer [out] A frame buffer
71c5e268c6Sopenharmony_ci     *
72c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
73c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
74c5e268c6Sopenharmony_ci     *
75c5e268c6Sopenharmony_ci     * @since 5.0
76c5e268c6Sopenharmony_ci     * @version 1.1
77c5e268c6Sopenharmony_ci     */
78c5e268c6Sopenharmony_ci    AcquireBuffer([in] struct DHBase dhBase,[in] int streamId,[out] struct DCameraBuffer buffer);
79c5e268c6Sopenharmony_ci
80c5e268c6Sopenharmony_ci    /**
81c5e268c6Sopenharmony_ci     * @brief Notify distributed camera HDF service when a frame buffer has been filled.
82c5e268c6Sopenharmony_ci     *
83c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info
84c5e268c6Sopenharmony_ci     *
85c5e268c6Sopenharmony_ci     * @param streamId [in] Indicates the ID of the stream to which the frame buffer is to be attached.
86c5e268c6Sopenharmony_ci     *
87c5e268c6Sopenharmony_ci     * @param buffer [in] output frame buffer
88c5e268c6Sopenharmony_ci     *
89c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
90c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
91c5e268c6Sopenharmony_ci     *
92c5e268c6Sopenharmony_ci     * @since 5.0
93c5e268c6Sopenharmony_ci     * @version 1.1
94c5e268c6Sopenharmony_ci     */
95c5e268c6Sopenharmony_ci    ShutterBuffer([in] struct DHBase dhBase,[in] int streamId,[in] struct DCameraBuffer buffer);
96c5e268c6Sopenharmony_ci
97c5e268c6Sopenharmony_ci    /**
98c5e268c6Sopenharmony_ci     * @brief Called to report metadata related to the distributed camera device.
99c5e268c6Sopenharmony_ci     *
100c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info
101c5e268c6Sopenharmony_ci     *
102c5e268c6Sopenharmony_ci     * @param result Indicates the metadata reported.
103c5e268c6Sopenharmony_ci     *
104c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
105c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
106c5e268c6Sopenharmony_ci     *
107c5e268c6Sopenharmony_ci     * @since 5.0
108c5e268c6Sopenharmony_ci     * @version 1.1
109c5e268c6Sopenharmony_ci     */
110c5e268c6Sopenharmony_ci    OnSettingsResult([in] struct DHBase dhBase,[in] struct DCameraSettings result);
111c5e268c6Sopenharmony_ci
112c5e268c6Sopenharmony_ci    /**
113c5e268c6Sopenharmony_ci     * @brief Called to notify some events from distributed camera SA service to distributed camera HDF service.
114c5e268c6Sopenharmony_ci     *
115c5e268c6Sopenharmony_ci     * @param dhBase [in] Distributed hardware device base info
116c5e268c6Sopenharmony_ci     *
117c5e268c6Sopenharmony_ci     * @param event [in] Detail event contents
118c5e268c6Sopenharmony_ci     *
119c5e268c6Sopenharmony_ci     * @return Returns <b>NO_ERROR</b> if the operation is successful,
120c5e268c6Sopenharmony_ci     * returns an error code defined in {@link DCamRetCode} otherwise.
121c5e268c6Sopenharmony_ci     *
122c5e268c6Sopenharmony_ci     * @since 5.0
123c5e268c6Sopenharmony_ci     * @version 1.1
124c5e268c6Sopenharmony_ci     */
125c5e268c6Sopenharmony_ci    Notify([in] struct DHBase dhBase,[in] struct DCameraHDFEvent event);
126c5e268c6Sopenharmony_ci}
127