• 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     CAMERA_SERVICE_REQUIRE_MEMORY_SIZE,
120     CAMERA_SERVICE_SET_DEVICE_RETRY_TIME,
121 };
122 
123 /**
124  * @brief Camera service remote request code for DH IPC.
125  *
126  * @since 1.0
127  * @version 1.0
128  */
129 enum CameraServiceDHInterfaceCode {
130     CAMERA_SERVICE_ALLOW_OPEN_BY_OHSIDE = 101,
131     CAMERA_SERVICE_NOTIFY_CAMERA_STATE = 102,
132     CAMERA_SERVICE_NOTIFY_CLOSE_CAMERA = 2,
133     CAMERA_SERVICE_NOTIFY_MUTE_CAMERA = 4,
134     CAMERA_SERVICE_SET_PEER_CALLBACK = 104,
135     CAMERA_SERVICE_UNSET_PEER_CALLBACK = 105
136 };
137 
138 /**
139  * @brief Capture session remote request code for IPC.
140  *
141  * @since 1.0
142  * @version 1.0
143  */
144 enum CaptureSessionInterfaceCode {
145     CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0,
146     CAMERA_CAPTURE_SESSION_ADD_INPUT,
147     CAMERA_CAPTURE_SESSION_CAN_ADD_INPUT,
148     CAMERA_CAPTURE_SESSION_ADD_OUTPUT,
149     CAMERA_CAPTURE_SESSION_REMOVE_INPUT,
150     CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT,
151     CAMERA_CAPTURE_SESSION_COMMIT_CONFIG,
152     CAMERA_CAPTURE_SESSION_START,
153     CAMERA_CAPTURE_SESSION_STOP,
154     CAMERA_CAPTURE_SESSION_RELEASE,
155     CAMERA_CAPTURE_SESSION_SET_CALLBACK,
156     CAMERA_CAPTURE_GET_SESSION_STATE,
157     CAMERA_CAPTURE_GET_ACTIVE_COLOR_SPACE,
158     CAMERA_CAPTURE_SET_COLOR_SPACE,
159     CAMERA_CAPTURE_SESSION_SET_SMOOTH_ZOOM,
160     CAMERA_CAPTURE_SESSION_SET_FEATURE_MODE,
161     CAMERA_CAPTURE_SESSION_ENABLE_MOTION_PHOTO,
162     CAMERA_CAPTURE_SESSION_START_MOVING_PHOTO_CAPTURE,
163     CAMERA_CAPTURE_SESSION_CREATE_MEDIA_LIBRARY_MANAGER,
164     CAMERA_CAPTURE_SESSION_SET_PREVIEW_ROTATE,
165     CAMERA_CAPTURE_SESSION_CREATE_MEDIA_LIBRARY_MANAGER_PICTURE,
166 };
167 
168 /**
169  * @brief Stream capture remote request code for IPC.
170  *
171  * @since 1.0
172  * @version 1.0
173  */
174 enum StreamCaptureInterfaceCode {
175     CAMERA_STREAM_CAPTURE_START = 0,
176     CAMERA_STREAM_CAPTURE_CANCEL,
177     CAMERA_STREAM_CAPTURE_SET_CALLBACK,
178     CAMERA_STREAM_CAPTURE_RELEASE,
179     CAMERA_SERVICE_SET_THUMBNAIL,
180     CAMERA_STREAM_CAPTURE_CONFIRM,
181     CAMERA_SERVICE_ENABLE_DEFERREDTYPE,
182     CAMERA_STREAM_GET_DEFERRED_PHOTO,
183     CAMERA_STREAM_GET_DEFERRED_VIDEO,
184     CAMERA_STREAM_SET_BUFFER_PRODUCER_INFO,
185     CAMERA_STREAM_SET_VIDEO_CODEC_TYPE,
186     CAMERA_STREAM_ENABLE_RAW_DELIVERY,
187     CAMERA_PHOTO_ROTATION,
188     CAMERA_CAPTURE_DFX,
189 };
190 
191 /**
192  * @brief Stream repeat remote request code for IPC.
193  *
194  * @since 1.0
195  * @version 1.0
196  */
197 enum StreamRepeatInterfaceCode {
198     CAMERA_START_VIDEO_RECORDING = 0,
199     CAMERA_STOP_VIDEO_RECORDING,
200     CAMERA_STREAM_REPEAT_SET_CALLBACK,
201     CAMERA_STREAM_REPEAT_RELEASE,
202     CAMERA_ADD_DEFERRED_SURFACE,
203     CAMERA_FORK_SKETCH_STREAM_REPEAT,
204     CAMERA_REMOVE_SKETCH_STREAM_REPEAT,
205     CAMERA_UPDATE_SKETCH_RATIO,
206     CAMERA_STREAM_FRAME_RANGE_SET,
207     CAMERA_ENABLE_SECURE_STREAM,
208     CAMERA_ENABLE_STREAM_MIRROR,
209     CAMERA_ATTACH_META_SURFACE,
210     CAMERA_PRIVIEW_ROTATION,
211     CAMERA_API_VERSION,
212     CAMERA_GET_STREAM_MIRROR
213 };
214 
215 /**
216  * @brief Stream metadata remote request code for IPC.
217  *
218  * @since 1.0
219  * @version 1.0
220  */
221 enum StreamMetadataInterfaceCode {
222     CAMERA_STREAM_META_START = 0,
223     CAMERA_STREAM_META_STOP,
224     CAMERA_STREAM_META_RELEASE,
225     CAMERA_STREAM_META_SET_CALLBACK,
226     CAMERA_STREAM_META_ENABLE_RESULTS,
227     CAMERA_STREAM_META_DISABLE_RESULTS
228 };
229 
230 /**
231  * @brief Stream depth data remote request code for IPC.
232  *
233  * @since 1.0
234  * @version 1.0
235  */
236 enum StreamDepthDataInterfaceCode {
237     CAMERA_STREAM_DEPTH_DATA_START = 0,
238     CAMERA_STREAM_DEPTH_DATA_STOP,
239     CAMERA_STREAM_DEPTH_DATA_SET_CALLBACK,
240     CAMERA_STREAM_DEPTH_DATA_ACCURACY_SET,
241     CAMERA_STREAM_DEPTH_DATA_RELEASE
242 };
243 
244 /**
245  * @brief Camera device callback remote request code for IPC.
246  *
247  * @since 1.0
248  * @version 1.0
249  */
250 enum CameraDeviceCallbackInterfaceCode {
251     CAMERA_DEVICE_ON_ERROR = 0,
252     CAMERA_DEVICE_ON_RESULT,
253 };
254 
255 enum StreamMetadataCallbackInterfaceCode {
256     CAMERA_META_OPERATOR_ON_RESULT = 0
257 };
258 
259 /**
260  * @brief Camera repeat stream callback remote request code for IPC.
261  *
262  * @since 1.0
263  * @version 1.0
264  */
265 enum StreamRepeatCallbackInterfaceCode {
266     CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0,
267     CAMERA_STREAM_REPEAT_ON_FRAME_ENDED,
268     CAMERA_STREAM_REPEAT_ON_ERROR,
269     CAMERA_STREAM_SKETCH_STATUS_ON_CHANGED,
270     CAMERA_STREAM_REPEAT_VIDEO_DEFERRED_INFO
271 };
272 
273 /**
274  * @brief Camera depth stream callback remote request code for IPC.
275  *
276  * @since 1.0
277  * @version 1.0
278  */
279 enum StreamDepthDataCallbackInterfaceCode {
280     CAMERA_STREAM_DEPTH_DATA_ON_ERROR = 0
281 };
282 
283 /**
284  * @brief Camera capture stream callback remote request code for IPC.
285  *
286  * @since 1.0
287  * @version 1.0
288  */
289 enum StreamCaptureCallbackInterfaceCode {
290     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0,
291     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED,
292     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR,
293     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER,
294     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED_V1_2,
295     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER_END,
296     CAMERA_STREAM_CAPTURE_ON_CAPTURE_READY
297 };
298 
299 /**
300 * @brief Capture session callback remote request code for IPC.
301 *
302 * @since 1.0
303 * @version 1.0
304 */
305 enum CaptureSessionCallbackInterfaceCode {
306     CAMERA_CAPTURE_SESSION_ON_ERROR = 0
307 };
308 } // namespace CameraStandard
309 } // namespace OHOS
310 #endif // OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
311