• 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_REMOTE_REQUEST_CODE_H
17 #define OHOS_CAMERA_REMOTE_REQUEST_CODE_H
18 
19 namespace OHOS {
20 namespace CameraStandard {
21 /**
22  * @brief Camera device remote request code for IPC.
23  *
24  * @since 1.0
25  * @version 1.0
26  */
27 enum CameraDeviceRequestCode {
28     CAMERA_DEVICE_OPEN = 0,
29     CAMERA_DEVICE_CLOSE,
30     CAMERA_DEVICE_RELEASE,
31     CAMERA_DEVICE_SET_CALLBACK,
32     CAMERA_DEVICE_UPDATE_SETTNGS,
33     CAMERA_DEVICE_GET_ENABLED_RESULT,
34     CAMERA_DEVICE_ENABLED_RESULT,
35     CAMERA_DEVICE_DISABLED_RESULT
36 };
37 
38 /**
39  * @brief Camera service callback remote request code for IPC.
40  *
41  * @since 1.0
42  * @version 1.0
43  */
44 enum CameraServiceCallbackRequestCode {
45     CAMERA_CALLBACK_STATUS_CHANGED = 0,
46     CAMERA_CALLBACK_FLASHLIGHT_STATUS_CHANGED
47 };
48 
49 /**
50  * @brief Camera mute service callback remote request code for IPC.
51  *
52  * @since 1.0
53  * @version 1.0
54  */
55 enum CameraMuteServiceCallbackRequestCode {
56     CAMERA_CALLBACK_MUTE_MODE = 0
57 };
58 
59 /**
60  * @brief Camera service remote request code for IPC.
61  *
62  * @since 1.0
63  * @version 1.0
64  */
65 enum CameraServiceRequestCode {
66     CAMERA_SERVICE_CREATE_DEVICE = 0,
67     CAMERA_SERVICE_SET_CALLBACK,
68     CAMERA_SERVICE_SET_MUTE_CALLBACK,
69     CAMERA_SERVICE_GET_CAMERAS,
70     CAMERA_SERVICE_CREATE_CAPTURE_SESSION,
71     CAMERA_SERVICE_CREATE_PHOTO_OUTPUT,
72     CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT,
73     CAMERA_SERVICE_CREATE_DEFERRED_PREVIEW_OUTPUT,
74     CAMERA_SERVICE_CREATE_VIDEO_OUTPUT,
75     CAMERA_SERVICE_SET_LISTENER_OBJ,
76     CAMERA_SERVICE_CREATE_METADATA_OUTPUT,
77     CAMERA_SERVICE_MUTE_CAMERA,
78     CAMERA_SERVICE_IS_CAMERA_MUTED,
79 };
80 
81 /**
82  * @brief Capture session remote request code for IPC.
83  *
84  * @since 1.0
85  * @version 1.0
86  */
87 enum CaptureSessionRequestCode {
88     CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0,
89     CAMERA_CAPTURE_SESSION_ADD_INPUT,
90     CAMERA_CAPTURE_SESSION_ADD_OUTPUT,
91     CAMERA_CAPTURE_SESSION_REMOVE_INPUT,
92     CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT,
93     CAMERA_CAPTURE_SESSION_COMMIT_CONFIG,
94     CAMERA_CAPTURE_SESSION_START,
95     CAMERA_CAPTURE_SESSION_STOP,
96     CAMERA_CAPTURE_SESSION_RELEASE,
97     CAMERA_CAPTURE_SESSION_SET_CALLBACK,
98     CAMERA_CAPTURE_GET_SESSION_STATE
99 };
100 
101 /**
102  * @brief Stream capture remote request code for IPC.
103  *
104  * @since 1.0
105  * @version 1.0
106  */
107 enum StreamCaptureRequestCode {
108     CAMERA_STREAM_CAPTURE_START = 0,
109     CAMERA_STREAM_CAPTURE_CANCEL,
110     CAMERA_STREAM_CAPTURE_SET_CALLBACK,
111     CAMERA_STREAM_CAPTURE_RELEASE
112 };
113 
114 /**
115  * @brief Stream repeat remote request code for IPC.
116  *
117  * @since 1.0
118  * @version 1.0
119  */
120 enum StreamRepeatRequestCode {
121     CAMERA_START_VIDEO_RECORDING = 0,
122     CAMERA_STOP_VIDEO_RECORDING,
123     CAMERA_STREAM_REPEAT_SET_CALLBACK,
124     CAMERA_STREAM_REPEAT_RELEASE,
125     CAMERA_ADD_DEFERRED_SURFACE
126 };
127 
128 /**
129  * @brief Stream metadata remote request code for IPC.
130  *
131  * @since 1.0
132  * @version 1.0
133  */
134 enum StreamMetadataRequestCode {
135     CAMERA_STREAM_META_START = 0,
136     CAMERA_STREAM_META_STOP,
137     CAMERA_STREAM_META_RELEASE
138 };
139 
140 /**
141  * @brief Camera device callback remote request code for IPC.
142  *
143  * @since 1.0
144  * @version 1.0
145  */
146 enum CameraDeviceCallbackRequestCode {
147     CAMERA_DEVICE_ON_ERROR = 0,
148     CAMERA_DEVICE_ON_RESULT
149 };
150 
151 /**
152  * @brief Camera repeat stream callback remote request code for IPC.
153  *
154  * @since 1.0
155  * @version 1.0
156  */
157 enum StreamRepeatCallbackRequestCode {
158     CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0,
159     CAMERA_STREAM_REPEAT_ON_FRAME_ENDED,
160     CAMERA_STREAM_REPEAT_ON_ERROR
161 };
162 
163 /**
164  * @brief Camera capture stream callback remote request code for IPC.
165  *
166  * @since 1.0
167  * @version 1.0
168  */
169 enum StreamCaptureCallbackRequestCode {
170     CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0,
171     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED,
172     CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR,
173     CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER
174 };
175 
176 /**
177 * @brief Capture session callback remote request code for IPC.
178 *
179 * @since 1.0
180 * @version 1.0
181 */
182 enum CaptureSessionCallbackRequestCode {
183     CAMERA_CAPTURE_SESSION_ON_ERROR = 0
184 };
185 } // namespace CameraStandard
186 } // namespace OHOS
187 #endif // OHOS_CAMERA_REMOTE_REQUEST_CODE_H
188