• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
17 #define OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
18 
19 /* SAID: 3008 */
20 namespace OHOS {
21 namespace CameraStandard {
22 /**
23  * @brief Camera device remote request code for IPC.
24  *
25  * @since 1.0
26  * @version 1.0
27  */
28 enum class CameraDeviceInterfaceCode {
29     CAMERA_DEVICE_OPEN = 0,
30     CAMERA_DEVICE_CLOSE,
31     CAMERA_DEVICE_RELEASE,
32     CAMERA_DEVICE_SET_CALLBACK,
33     CAMERA_DEVICE_UPDATE_SETTNGS,
34     CAMERA_DEVICE_GET_ENABLED_RESULT,
35     CAMERA_DEVICE_ENABLED_RESULT,
36     CAMERA_DEVICE_DISABLED_RESULT,
37     CAMERA_DEVICE_GET_STATUS,
38     CAMERA_DEVICE_SET_USED_POS,
39     CAMERA_DEVICE_DELAYED_CLOSE,
40     CAMERA_DEVICE_UNSET_CALLBACK,
41     CAMERA_DEVICE_OPEN_CONCURRENT,
42     CAMERA_DEVICE_SET_DEVICE_RETRY_TIME,
43 };
44 
45 /**
46  * @brief Camera service callback remote request code for IPC.
47  *
48  * @since 1.0
49  * @version 1.0
50  */
51 enum CameraServiceCallbackInterfaceCode {
52     CAMERA_CALLBACK_STATUS_CHANGED = 0,
53     CAMERA_CALLBACK_FLASHLIGHT_STATUS_CHANGED
54 };
55 
56 /**
57  * @brief Camera mute service callback remote request code for IPC.
58  *
59  * @since 1.0
60  * @version 1.0
61  */
62 enum CameraMuteServiceCallbackInterfaceCode {
63     CAMERA_CALLBACK_MUTE_MODE = 0
64 };
65 
66 /**
67  * @brief Torch service callback remote request code for IPC.
68  *
69  * @since 1.0
70  * @version 1.0
71  */
72 enum TorchServiceCallbackInterfaceCode {
73     TORCH_CALLBACK_TORCH_STATUS_CHANGE = 0
74 };
75 
76 /**
77  * @brief Fold service callback remote request code for IPC.
78  *
79  * @since 1.0
80  * @version 1.0
81  */
82 enum FoldServiceCallbackInterfaceCode {
83     FOLD_CALLBACK_FOLD_STATUS_CHANGE = 0
84 };
85 
86 /**
87  * @brief Camera service remote request code for IPC.
88  *
89  * @since 1.0
90  * @version 1.0
91  */
92 enum CameraServiceInterfaceCode {
93     CAMERA_SERVICE_CREATE_DEVICE = 0,
94     CAMERA_SERVICE_SET_CAMERA_CALLBACK,
95     CAMERA_SERVICE_SET_MUTE_CALLBACK,
96     CAMERA_SERVICE_SET_TORCH_CALLBACK,
97     CAMERA_SERVICE_GET_CAMERAS,
98     CAMERA_SERVICE_CREATE_CAPTURE_SESSION,
99     CAMERA_SERVICE_CREATE_PHOTO_OUTPUT,
100     CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT,
101     CAMERA_SERVICE_CREATE_DEFERRED_PREVIEW_OUTPUT,
102     CAMERA_SERVICE_CREATE_VIDEO_OUTPUT,
103     CAMERA_SERVICE_SET_LISTENER_OBJ,
104     CAMERA_SERVICE_CREATE_METADATA_OUTPUT,
105     CAMERA_SERVICE_MUTE_CAMERA,
106     CAMERA_SERVICE_IS_CAMERA_MUTED,
107     CAMERA_SERVICE_IS_TORCH_SUPPORTED,
108     CAMERA_SERVICE_IS_MUTE_SUPPORTED,
109     CAMERA_SERVICE_PRE_LAUNCH_CAMERA,
110     CAMERA_SERVICE_SET_PRE_LAUNCH_CAMERA,
111     CAMERA_SERVICE_SET_TORCH_LEVEL,
112     CAMERA_SERVICE_PRE_SWITCH_CAMERA,
113     CAMERA_SERVICE_CREATE_DEFERRED_PHOTO_PROCESSING_SESSION,
114     CAMERA_SERVICE_GET_CAMERA_IDS,
115     CAMERA_SERVICE_GET_CAMERA_ABILITY,
116     CAMERA_SERVICE_DESTROY_STUB_OBJ,
117     CAMERA_SERVICE_MUTE_CAMERA_PERSIST,
118     CAMERA_SERVICE_PROXY_FOR_FREEZE,
119     CAMERA_SERVICE_RESET_ALL_FREEZE_STATUS,
120     CAMERA_SERVICE_GET_DM_DEVICE_INFOS,
121     CAMERA_SERVICE_SET_FOLD_CALLBACK,
122     CAMERA_SERVICE_GET_CAMERA_OUTPUT_STATUS,
123     CAMERA_SERVICE_CREATE_DEPTH_DATA_OUTPUT,
124     CAMERA_SERVICE_CREATE_DEFERRED_VIDEO_PROCESSING_SESSION,
125     CAMERA_SERVICE_REQUIRE_MEMORY_SIZE,
126     CAMERA_SERVICE_GETID_FOR_CONCURRENT,
127     CAMERA_SERVICE_GET_CONCURRENT_CAMERA_ABILITY,
128     CAMERA_SERVICE_GET_TORCH_STATUS,
129     CAMERA_SERVICE_UNSET_CAMERA_CALLBACK,
130     CAMERA_SERVICE_UNSET_MUTE_CALLBACK,
131     CAMERA_SERVICE_UNSET_TORCH_CALLBACK,
132     CAMERA_SERVICE_UNSET_FOLD_CALLBACK,
133     CAMERA_SERVICE_SET_DEVICE_RETRY_TIME,
134     CAMERA_SERVICE_CHECK_WHITE_LIST,
135 };
136 
137 /**
138  * @brief Camera service remote request code for DH IPC.
139  *
140  * @since 1.0
141  * @version 1.0
142  */
143 enum CameraServiceDHInterfaceCode {
144     CAMERA_SERVICE_ALLOW_OPEN_BY_OHSIDE = 101,
145     CAMERA_SERVICE_NOTIFY_CAMERA_STATE = 102,
146     CAMERA_SERVICE_NOTIFY_CLOSE_CAMERA = 2,
147     CAMERA_SERVICE_NOTIFY_MUTE_CAMERA = 4,
148     CAMERA_SERVICE_SET_PEER_CALLBACK = 104,
149     CAMERA_SERVICE_UNSET_PEER_CALLBACK = 105
150 };
151 
152 /**
153  * @brief Capture session remote request code for IPC.
154  *
155  * @since 1.0
156  * @version 1.0
157  */
158 enum CaptureSessionInterfaceCode {
159     CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0,
160     CAMERA_CAPTURE_SESSION_ADD_INPUT,
161     CAMERA_CAPTURE_SESSION_CAN_ADD_INPUT,
162     CAMERA_CAPTURE_SESSION_ADD_OUTPUT,
163     CAMERA_CAPTURE_SESSION_REMOVE_INPUT,
164     CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT,
165     CAMERA_CAPTURE_SESSION_COMMIT_CONFIG,
166     CAMERA_CAPTURE_SESSION_START,
167     CAMERA_CAPTURE_SESSION_STOP,
168     CAMERA_CAPTURE_SESSION_RELEASE,
169     CAMERA_CAPTURE_SESSION_SET_CALLBACK,
170     CAMERA_CAPTURE_GET_SESSION_STATE,
171     CAMERA_CAPTURE_GET_ACTIVE_COLOR_SPACE,
172     CAMERA_CAPTURE_SET_COLOR_SPACE,
173     CAMERA_CAPTURE_SESSION_SET_SMOOTH_ZOOM,
174     CAMERA_CAPTURE_SESSION_SET_FEATURE_MODE,
175     CAMERA_CAPTURE_SESSION_ENABLE_MOTION_PHOTO,
176     CAMERA_CAPTURE_SESSION_START_MOVING_PHOTO_CAPTURE,
177     CAMERA_CAPTURE_SESSION_SET_PREVIEW_ROTATE,
178     CAMERA_CAPTURE_SESSION_UNSET_CALLBACK,
179     CAMERA_CAPTURE_SESSION_SET_COMMIT_CONFIG_FLAG,
180 };
181 
182 /**
183  * @brief Stream capture remote request code for IPC.
184  *
185  * @since 1.0
186  * @version 1.0
187  */
188 enum StreamCaptureInterfaceCode {
189     CAMERA_STREAM_CAPTURE_START = 0,
190     CAMERA_STREAM_CAPTURE_CANCEL,
191     CAMERA_STREAM_CAPTURE_SET_CALLBACK,
192     CAMERA_STREAM_CAPTURE_RELEASE,
193     CAMERA_SERVICE_SET_THUMBNAIL,
194     CAMERA_STREAM_CAPTURE_CONFIRM,
195     CAMERA_SERVICE_ENABLE_DEFERREDTYPE,
196     CAMERA_STREAM_GET_DEFERRED_PHOTO,
197     CAMERA_STREAM_GET_DEFERRED_VIDEO,
198     CAMERA_STREAM_SET_BUFFER_PRODUCER_INFO,
199     CAMERA_STREAM_SET_VIDEO_CODEC_TYPE,
200     CAMERA_STREAM_ENABLE_RAW_DELIVERY,
201     CAMERA_PHOTO_ROTATION,
202     CAMERA_STREAM_ENABLE_MOVING_PHOTO,
203     CAMERA_CAPTURE_DFX,
204     CAMERA_STREAM_ADD_MEDIA_LIBRARY_PHOTO_PROXY,
205     CAMERA_STREAM_CAPTURE_UNSET_CALLBACK,
206     CAMERA_STREAM_ENABLE_OFFLINE_PHOTO,
207     CAMERA_STREAM_CREATE_MEDIA_LIBRARY_MANAGER,
208     CAMERA_STREAM_CREATE_MEDIA_LIBRARY_MANAGER_PICTURE,
209 };
210 
211 /**
212  * @brief Stream repeat remote request code for IPC.
213  *
214  * @since 1.0
215  * @version 1.0
216  */
217 enum StreamRepeatInterfaceCode {
218     CAMERA_START_VIDEO_RECORDING = 0,
219     CAMERA_STOP_VIDEO_RECORDING,
220     CAMERA_STREAM_REPEAT_SET_CALLBACK,
221     CAMERA_STREAM_REPEAT_RELEASE,
222     CAMERA_ADD_DEFERRED_SURFACE,
223     CAMERA_FORK_SKETCH_STREAM_REPEAT,
224     CAMERA_REMOVE_SKETCH_STREAM_REPEAT,
225     CAMERA_UPDATE_SKETCH_RATIO,
226     CAMERA_STREAM_FRAME_RANGE_SET,
227     CAMERA_ENABLE_SECURE_STREAM,
228     CAMERA_ENABLE_STREAM_MIRROR,
229     CAMERA_ATTACH_META_SURFACE,
230     CAMERA_PRIVIEW_ROTATION,
231     CAMERA_ENABLE_AUTO_FRAME_RATE,
232     CAMERA_API_VERSION,
233     CAMERA_GET_STREAM_MIRROR,
234     CAMERA_STREAM_REPEAT_UNSET_CALLBACK,
235 };
236 
237 /**
238  * @brief Stream metadata remote request code for IPC.
239  *
240  * @since 1.0
241  * @version 1.0
242  */
243 enum StreamMetadataInterfaceCode {
244     CAMERA_STREAM_META_START = 0,
245     CAMERA_STREAM_META_STOP,
246     CAMERA_STREAM_META_RELEASE,
247     CAMERA_STREAM_META_SET_CALLBACK,
248     CAMERA_STREAM_META_ENABLE_RESULTS,
249     CAMERA_STREAM_META_DISABLE_RESULTS,
250     CAMERA_STREAM_META_UNSET_CALLBACK,
251 };
252 
253 /**
254  * @brief Stream depth data remote request code for IPC.
255  *
256  * @since 1.0
257  * @version 1.0
258  */
259 enum StreamDepthDataInterfaceCode {
260     CAMERA_STREAM_DEPTH_DATA_START = 0,
261     CAMERA_STREAM_DEPTH_DATA_STOP,
262     CAMERA_STREAM_DEPTH_DATA_SET_CALLBACK,
263     CAMERA_STREAM_DEPTH_DATA_ACCURACY_SET,
264     CAMERA_STREAM_DEPTH_DATA_RELEASE,
265     CAMERA_STREAM_DEPTH_DATA_UNSET_CALLBACK,
266 };
267 
268 /**
269  * @brief Camera device callback remote request code for IPC.
270  *
271  * @since 1.0
272  * @version 1.0
273  */
274 enum CameraDeviceCallbackInterfaceCode {
275     CAMERA_DEVICE_ON_ERROR = 0,
276     CAMERA_DEVICE_ON_RESULT,
277 };
278 
279 enum StreamMetadataCallbackInterfaceCode {
280     CAMERA_META_OPERATOR_ON_RESULT = 0
281 };
282 
283 /**
284  * @brief Camera repeat stream callback remote request code for IPC.
285  *
286  * @since 1.0
287  * @version 1.0
288  */
289 enum StreamRepeatCallbackInterfaceCode {
290     CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0,
291     CAMERA_STREAM_REPEAT_ON_FRAME_ENDED,
292     CAMERA_STREAM_REPEAT_ON_ERROR,
293     CAMERA_STREAM_SKETCH_STATUS_ON_CHANGED,
294     CAMERA_STREAM_REPEAT_VIDEO_DEFERRED_INFO
295 };
296 
297 /**
298  * @brief Camera depth stream callback remote request code for IPC.
299  *
300  * @since 1.0
301  * @version 1.0
302  */
303 enum StreamDepthDataCallbackInterfaceCode {
304     CAMERA_STREAM_DEPTH_DATA_ON_ERROR = 0
305 };
306 
307 /**
308  * @brief Camera capture stream callback remote request code for IPC.
309  *
310  * @since 1.0
311  * @version 1.0
312  */
313 enum StreamCaptureCallbackInterfaceCode {
314     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0,
315     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED,
316     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR,
317     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER,
318     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED_V1_2,
319     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER_END,
320     CAMERA_STREAM_CAPTURE_ON_CAPTURE_READY,
321     CAMERA_STREAM_CAPTURE_ON_OFFLINE_DELIVERY_FINISHED
322 };
323 
324 /**
325 * @brief Capture session callback remote request code for IPC.
326 *
327 * @since 1.0
328 * @version 1.0
329 */
330 enum CaptureSessionCallbackInterfaceCode {
331     CAMERA_CAPTURE_SESSION_ON_ERROR = 0
332 };
333 } // namespace CameraStandard
334 } // namespace OHOS
335 #endif // OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
336