• 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 };
40 
41 /**
42  * @brief Camera service callback remote request code for IPC.
43  *
44  * @since 1.0
45  * @version 1.0
46  */
47 enum CameraServiceCallbackInterfaceCode {
48     CAMERA_CALLBACK_STATUS_CHANGED = 0,
49     CAMERA_CALLBACK_FLASHLIGHT_STATUS_CHANGED
50 };
51 
52 /**
53  * @brief Camera mute service callback remote request code for IPC.
54  *
55  * @since 1.0
56  * @version 1.0
57  */
58 enum CameraMuteServiceCallbackInterfaceCode {
59     CAMERA_CALLBACK_MUTE_MODE = 0
60 };
61 
62 /**
63  * @brief Torch service callback remote request code for IPC.
64  *
65  * @since 1.0
66  * @version 1.0
67  */
68 enum TorchServiceCallbackInterfaceCode {
69     TORCH_CALLBACK_TORCH_STATUS_CHANGE = 0
70 };
71 
72 /**
73  * @brief Fold service callback remote request code for IPC.
74  *
75  * @since 1.0
76  * @version 1.0
77  */
78 enum FoldServiceCallbackInterfaceCode {
79     FOLD_CALLBACK_FOLD_STATUS_CHANGE = 0
80 };
81 
82 /**
83  * @brief Camera service remote request code for IPC.
84  *
85  * @since 1.0
86  * @version 1.0
87  */
88 enum CameraServiceInterfaceCode {
89     CAMERA_SERVICE_CREATE_DEVICE = 0,
90     CAMERA_SERVICE_SET_CAMERA_CALLBACK,
91     CAMERA_SERVICE_SET_MUTE_CALLBACK,
92     CAMERA_SERVICE_SET_TORCH_CALLBACK,
93     CAMERA_SERVICE_GET_CAMERAS,
94     CAMERA_SERVICE_CREATE_CAPTURE_SESSION,
95     CAMERA_SERVICE_CREATE_PHOTO_OUTPUT,
96     CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT,
97     CAMERA_SERVICE_CREATE_DEFERRED_PREVIEW_OUTPUT,
98     CAMERA_SERVICE_CREATE_VIDEO_OUTPUT,
99     CAMERA_SERVICE_SET_LISTENER_OBJ,
100     CAMERA_SERVICE_CREATE_METADATA_OUTPUT,
101     CAMERA_SERVICE_MUTE_CAMERA,
102     CAMERA_SERVICE_IS_CAMERA_MUTED,
103     CAMERA_SERVICE_PRE_LAUNCH_CAMERA,
104     CAMERA_SERVICE_SET_PRE_LAUNCH_CAMERA,
105     CAMERA_SERVICE_SET_TORCH_LEVEL,
106     CAMERA_SERVICE_PRE_SWITCH_CAMERA,
107     CAMERA_SERVICE_CREATE_DEFERRED_PHOTO_PROCESSING_SESSION,
108     CAMERA_SERVICE_GET_CAMERA_IDS,
109     CAMERA_SERVICE_GET_CAMERA_ABILITY,
110     CAMERA_SERVICE_DESTROY_STUB_OBJ,
111     CAMERA_SERVICE_MUTE_CAMERA_PERSIST,
112     CAMERA_SERVICE_PROXY_FOR_FREEZE,
113     CAMERA_SERVICE_RESET_ALL_FREEZE_STATUS,
114     CAMERA_SERVICE_GET_DM_DEVICE_INFOS,
115     CAMERA_SERVICE_SET_FOLD_CALLBACK,
116     CAMERA_SERVICE_GET_CAMERA_OUTPUT_STATUS,
117     CAMERA_SERVICE_CREATE_DEPTH_DATA_OUTPUT,
118     CAMERA_SERVICE_CREATE_DEFERRED_VIDEO_PROCESSING_SESSION,
119 };
120 
121 /**
122  * @brief Camera service remote request code for DH IPC.
123  *
124  * @since 1.0
125  * @version 1.0
126  */
127 enum CameraServiceDHInterfaceCode {
128     CAMERA_SERVICE_ALLOW_OPEN_BY_OHSIDE = 101,
129     CAMERA_SERVICE_NOTIFY_CAMERA_STATE = 102,
130     CAMERA_SERVICE_NOTIFY_CLOSE_CAMERA = 2,
131     CAMERA_SERVICE_NOTIFY_MUTE_CAMERA = 4,
132     CAMERA_SERVICE_SET_PEER_CALLBACK = 104,
133     CAMERA_SERVICE_UNSET_PEER_CALLBACK = 105
134 };
135 
136 /**
137  * @brief Capture session remote request code for IPC.
138  *
139  * @since 1.0
140  * @version 1.0
141  */
142 enum CaptureSessionInterfaceCode {
143     CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0,
144     CAMERA_CAPTURE_SESSION_ADD_INPUT,
145     CAMERA_CAPTURE_SESSION_CAN_ADD_INPUT,
146     CAMERA_CAPTURE_SESSION_ADD_OUTPUT,
147     CAMERA_CAPTURE_SESSION_REMOVE_INPUT,
148     CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT,
149     CAMERA_CAPTURE_SESSION_COMMIT_CONFIG,
150     CAMERA_CAPTURE_SESSION_START,
151     CAMERA_CAPTURE_SESSION_STOP,
152     CAMERA_CAPTURE_SESSION_RELEASE,
153     CAMERA_CAPTURE_SESSION_SET_CALLBACK,
154     CAMERA_CAPTURE_GET_SESSION_STATE,
155     CAMERA_CAPTURE_GET_ACTIVE_COLOR_SPACE,
156     CAMERA_CAPTURE_SET_COLOR_SPACE,
157     CAMERA_CAPTURE_SESSION_SET_SMOOTH_ZOOM,
158     CAMERA_CAPTURE_SESSION_SET_FEATURE_MODE,
159     CAMERA_CAPTURE_SESSION_ENABLE_MOTION_PHOTO,
160     CAMERA_CAPTURE_SESSION_START_MOVING_PHOTO_CAPTURE,
161     CAMERA_CAPTURE_SESSION_CREATE_MEDIA_LIBRARY_MANAGER,
162     CAMERA_CAPTURE_SESSION_SET_PREVIEW_ROTATE,
163     CAMERA_CAPTURE_SESSION_CREATE_MEDIA_LIBRARY_MANAGER_PICTURE,
164 };
165 
166 /**
167  * @brief Stream capture remote request code for IPC.
168  *
169  * @since 1.0
170  * @version 1.0
171  */
172 enum StreamCaptureInterfaceCode {
173     CAMERA_STREAM_CAPTURE_START = 0,
174     CAMERA_STREAM_CAPTURE_CANCEL,
175     CAMERA_STREAM_CAPTURE_SET_CALLBACK,
176     CAMERA_STREAM_CAPTURE_RELEASE,
177     CAMERA_SERVICE_SET_THUMBNAIL,
178     CAMERA_STREAM_CAPTURE_CONFIRM,
179     CAMERA_SERVICE_ENABLE_DEFERREDTYPE,
180     CAMERA_STREAM_GET_DEFERRED_PHOTO,
181     CAMERA_STREAM_GET_DEFERRED_VIDEO,
182     CAMERA_STREAM_SET_BUFFER_PRODUCER_INFO,
183     CAMERA_STREAM_SET_VIDEO_CODEC_TYPE,
184     CAMERA_STREAM_ENABLE_RAW_DELIVERY,
185 };
186 
187 /**
188  * @brief Stream repeat remote request code for IPC.
189  *
190  * @since 1.0
191  * @version 1.0
192  */
193 enum StreamRepeatInterfaceCode {
194     CAMERA_START_VIDEO_RECORDING = 0,
195     CAMERA_STOP_VIDEO_RECORDING,
196     CAMERA_STREAM_REPEAT_SET_CALLBACK,
197     CAMERA_STREAM_REPEAT_RELEASE,
198     CAMERA_ADD_DEFERRED_SURFACE,
199     CAMERA_FORK_SKETCH_STREAM_REPEAT,
200     CAMERA_REMOVE_SKETCH_STREAM_REPEAT,
201     CAMERA_UPDATE_SKETCH_RATIO,
202     CAMERA_STREAM_FRAME_RANGE_SET,
203     CAMERA_ENABLE_SECURE_STREAM,
204     CAMERA_ENABLE_STREAM_MIRROR,
205     CAMERA_ATTACH_META_SURFACE,
206     CAMERA_PRIVIEW_ROTATION
207 };
208 
209 /**
210  * @brief Stream metadata remote request code for IPC.
211  *
212  * @since 1.0
213  * @version 1.0
214  */
215 enum StreamMetadataInterfaceCode {
216     CAMERA_STREAM_META_START = 0,
217     CAMERA_STREAM_META_STOP,
218     CAMERA_STREAM_META_RELEASE,
219     CAMERA_STREAM_META_SET_CALLBACK,
220     CAMERA_STREAM_META_ENABLE_RESULTS,
221     CAMERA_STREAM_META_DISABLE_RESULTS
222 };
223 
224 /**
225  * @brief Stream depth data remote request code for IPC.
226  *
227  * @since 1.0
228  * @version 1.0
229  */
230 enum StreamDepthDataInterfaceCode {
231     CAMERA_STREAM_DEPTH_DATA_START = 0,
232     CAMERA_STREAM_DEPTH_DATA_STOP,
233     CAMERA_STREAM_DEPTH_DATA_SET_CALLBACK,
234     CAMERA_STREAM_DEPTH_DATA_ACCURACY_SET,
235     CAMERA_STREAM_DEPTH_DATA_RELEASE
236 };
237 
238 /**
239  * @brief Camera device callback remote request code for IPC.
240  *
241  * @since 1.0
242  * @version 1.0
243  */
244 enum CameraDeviceCallbackInterfaceCode {
245     CAMERA_DEVICE_ON_ERROR = 0,
246     CAMERA_DEVICE_ON_RESULT,
247 };
248 
249 enum StreamMetadataCallbackInterfaceCode {
250     CAMERA_META_OPERATOR_ON_RESULT = 0
251 };
252 
253 /**
254  * @brief Camera repeat stream callback remote request code for IPC.
255  *
256  * @since 1.0
257  * @version 1.0
258  */
259 enum StreamRepeatCallbackInterfaceCode {
260     CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0,
261     CAMERA_STREAM_REPEAT_ON_FRAME_ENDED,
262     CAMERA_STREAM_REPEAT_ON_ERROR,
263     CAMERA_STREAM_SKETCH_STATUS_ON_CHANGED,
264     CAMERA_STREAM_REPEAT_VIDEO_DEFERRED_INFO
265 };
266 
267 /**
268  * @brief Camera depth stream callback remote request code for IPC.
269  *
270  * @since 1.0
271  * @version 1.0
272  */
273 enum StreamDepthDataCallbackInterfaceCode {
274     CAMERA_STREAM_DEPTH_DATA_ON_ERROR = 0
275 };
276 
277 /**
278  * @brief Camera capture stream callback remote request code for IPC.
279  *
280  * @since 1.0
281  * @version 1.0
282  */
283 enum StreamCaptureCallbackInterfaceCode {
284     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0,
285     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED,
286     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR,
287     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER,
288     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED_V1_2,
289     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER_END,
290     CAMERA_STREAM_CAPTURE_ON_CAPTURE_READY
291 };
292 
293 /**
294 * @brief Capture session callback remote request code for IPC.
295 *
296 * @since 1.0
297 * @version 1.0
298 */
299 enum CaptureSessionCallbackInterfaceCode {
300     CAMERA_CAPTURE_SESSION_ON_ERROR = 0
301 };
302 } // namespace CameraStandard
303 } // namespace OHOS
304 #endif // OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
305