• 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 };
38 
39 /**
40  * @brief Camera service callback remote request code for IPC.
41  *
42  * @since 1.0
43  * @version 1.0
44  */
45 enum CameraServiceCallbackInterfaceCode {
46     CAMERA_CALLBACK_STATUS_CHANGED = 0,
47     CAMERA_CALLBACK_FLASHLIGHT_STATUS_CHANGED
48 };
49 
50 /**
51  * @brief Camera mute service callback remote request code for IPC.
52  *
53  * @since 1.0
54  * @version 1.0
55  */
56 enum CameraMuteServiceCallbackInterfaceCode {
57     CAMERA_CALLBACK_MUTE_MODE = 0
58 };
59 
60 /**
61  * @brief Camera service remote request code for IPC.
62  *
63  * @since 1.0
64  * @version 1.0
65  */
66 enum CameraServiceInterfaceCode {
67     CAMERA_SERVICE_CREATE_DEVICE = 0,
68     CAMERA_SERVICE_SET_CALLBACK,
69     CAMERA_SERVICE_SET_MUTE_CALLBACK,
70     CAMERA_SERVICE_GET_CAMERAS,
71     CAMERA_SERVICE_CREATE_CAPTURE_SESSION,
72     CAMERA_SERVICE_CREATE_PHOTO_OUTPUT,
73     CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT,
74     CAMERA_SERVICE_CREATE_DEFERRED_PREVIEW_OUTPUT,
75     CAMERA_SERVICE_CREATE_VIDEO_OUTPUT,
76     CAMERA_SERVICE_SET_LISTENER_OBJ,
77     CAMERA_SERVICE_CREATE_METADATA_OUTPUT,
78     CAMERA_SERVICE_MUTE_CAMERA,
79     CAMERA_SERVICE_IS_CAMERA_MUTED,
80     CAMERA_SERVICE_PRE_LAUNCH_CAMERA,
81     CAMERA_SERVICE_SET_PRE_LAUNCH_CAMERA
82 };
83 
84 /**
85  * @brief Capture session remote request code for IPC.
86  *
87  * @since 1.0
88  * @version 1.0
89  */
90 enum CaptureSessionInterfaceCode {
91     CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0,
92     CAMERA_CAPTURE_SESSION_ADD_INPUT,
93     CAMERA_CAPTURE_SESSION_ADD_OUTPUT,
94     CAMERA_CAPTURE_SESSION_REMOVE_INPUT,
95     CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT,
96     CAMERA_CAPTURE_SESSION_COMMIT_CONFIG,
97     CAMERA_CAPTURE_SESSION_START,
98     CAMERA_CAPTURE_SESSION_STOP,
99     CAMERA_CAPTURE_SESSION_RELEASE,
100     CAMERA_CAPTURE_SESSION_SET_CALLBACK,
101     CAMERA_CAPTURE_GET_SESSION_STATE
102 };
103 
104 /**
105  * @brief Stream capture remote request code for IPC.
106  *
107  * @since 1.0
108  * @version 1.0
109  */
110 enum StreamCaptureInterfaceCode {
111     CAMERA_STREAM_CAPTURE_START = 0,
112     CAMERA_STREAM_CAPTURE_CANCEL,
113     CAMERA_STREAM_CAPTURE_SET_CALLBACK,
114     CAMERA_STREAM_CAPTURE_RELEASE,
115     CAMERA_SERVICE_SET_THUMBNAIL
116 };
117 
118 /**
119  * @brief Stream repeat remote request code for IPC.
120  *
121  * @since 1.0
122  * @version 1.0
123  */
124 enum StreamRepeatInterfaceCode {
125     CAMERA_START_VIDEO_RECORDING = 0,
126     CAMERA_STOP_VIDEO_RECORDING,
127     CAMERA_STREAM_REPEAT_SET_CALLBACK,
128     CAMERA_STREAM_REPEAT_RELEASE,
129     CAMERA_ADD_DEFERRED_SURFACE
130 };
131 
132 /**
133  * @brief Stream metadata remote request code for IPC.
134  *
135  * @since 1.0
136  * @version 1.0
137  */
138 enum StreamMetadataInterfaceCode {
139     CAMERA_STREAM_META_START = 0,
140     CAMERA_STREAM_META_STOP,
141     CAMERA_STREAM_META_RELEASE
142 };
143 
144 /**
145  * @brief Camera device callback remote request code for IPC.
146  *
147  * @since 1.0
148  * @version 1.0
149  */
150 enum CameraDeviceCallbackInterfaceCode {
151     CAMERA_DEVICE_ON_ERROR = 0,
152     CAMERA_DEVICE_ON_RESULT
153 };
154 
155 /**
156  * @brief Camera repeat stream callback remote request code for IPC.
157  *
158  * @since 1.0
159  * @version 1.0
160  */
161 enum StreamRepeatCallbackInterfaceCode {
162     CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0,
163     CAMERA_STREAM_REPEAT_ON_FRAME_ENDED,
164     CAMERA_STREAM_REPEAT_ON_ERROR
165 };
166 
167 /**
168  * @brief Camera capture stream callback remote request code for IPC.
169  *
170  * @since 1.0
171  * @version 1.0
172  */
173 enum StreamCaptureCallbackInterfaceCode {
174     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0,
175     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED,
176     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR,
177     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER
178 };
179 
180 /**
181 * @brief Capture session callback remote request code for IPC.
182 *
183 * @since 1.0
184 * @version 1.0
185 */
186 enum CaptureSessionCallbackInterfaceCode {
187     CAMERA_CAPTURE_SESSION_ON_ERROR = 0
188 };
189 } // namespace CameraStandard
190 } // namespace OHOS
191 #endif // OHOS_CAMERA_SERVICE_IPC_INTERFACE_CODE_H
192