1 /*
2  * Copyright (c) 2021 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 INTERFACES_CMD_COMMON_H
17 #define INTERFACES_CMD_COMMON_H
18 
19 namespace OHOS::Camera {
20 /**
21  * enum of cameraDevice callback
22  */
23 enum {
24     CMD_CAMERA_DEVICE_CALLBACK_ON_ERROR = 0,
25     CMD_CAMERA_DEVICE_CALLBACK_ON_RESULT,
26 };
27 
28 /**
29  * enum of cameraHost callback
30  */
31 enum {
32     CMD_CAMERA_HOST_CALLBACK_ON_STATUS = 0,
33     CMD_CAMERA_HOST_CALLBACK_ON_FLASHLIGHT_STATUS,
34     CMD_CAMERA_HOST_CALLBACK_ON_CAMERA_EVENT,
35 };
36 
37 /**
38  * enum of streamOperator callback
39  */
40 enum {
41     CMD_STREAM_OPERATOR_CALLBACK_ON_CAPTURE_STARTED = 0,
42     CMD_STREAM_OPERATOR_CALLBACK_ON_CAPTURE_ENDED,
43     CMD_STREAM_OPERATOR_CALLBACK_ON_CAPTURE_ERROR,
44     CMD_STREAM_OPERATOR_CALLBACK_ON_FRAME_SHUTTER,
45 };
46 
47 /**
48  * enum of cameraDevice
49  */
50 enum {
51     CMD_CAMERA_DEVICE_GET_STREAM_OPERATOR = 0,
52     CMD_CAMERA_DEVICE_UPDATE_SETTINGS,
53     CMD_CAMERA_DEVICE_SET_RESULT_MODE,
54     CMD_CAMERA_DEVICE_GET_ENABLED_RESULTS,
55     CMD_CAMERA_DEVICE_ENABLE_RESULT,
56     CMD_CAMERA_DEVICE_DISABLE_RESULT,
57     CMD_CAMERA_DEVICE_CLOSE,
58 };
59 
60 /**
61  * enum of cameraHost
62  */
63 enum {
64     CMD_CAMERA_HOST_SET_CALLBACK = 0,
65     CMD_CAMERA_HOST_GET_CAMERAID,
66     CMD_CAMERA_HOST_GET_CAMERA_ABILITY,
67     CMD_CAMERA_HOST_OPEN_CAMERA,
68     CMD_CAMERA_HOST_SET_FLASH_LIGHT,
69 };
70 
71 /**
72  * enum of offlineStreamOperator
73  */
74 enum {
75     CMD_OFFLINE_STREAM_OPERATOR_CANCEL_CAPTURE = 0,
76     CMD_OFFLINE_STREAM_OPERATOR_RELEASE_STREAMS,
77     CMD_OFFLINE_STREAM_OPERATOR_RELEASE,
78 };
79 
80 /**
81  * enum of streamOperator
82  */
83 enum {
84     CMD_STREAM_OPERATOR_IS_STREAMS_SUPPORTED = 0,
85     CMD_STREAM_OPERATOR_CREATE_STREAMS,
86     CMD_STREAM_OPERATOR_RELEASE_STREAMS,
87     CMD_STREAM_OPERATOR_COMMIT_STREAMS,
88     CMD_STREAM_OPERATOR_GET_STREAM_ATTRIBUTES,
89     CMD_STREAM_OPERATOR_ATTACH_BUFFER_QUEUE,
90     CMD_STREAM_OPERATOR_DETACH_BUFFER_QUEUE,
91     CMD_STREAM_OPERATOR_CAPTURE,
92     CMD_STREAM_OPERATOR_CANCEL_CAPTURE,
93     CMD_STREAM_OPERATOR_CHANGE_TO_OFFLINE_STREAM,
94 };
95 } // namespace OHOS::Camera
96 #endif