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 service remote request code for IPC. 51 * 52 * @since 1.0 53 * @version 1.0 54 */ 55 enum CameraServiceRequestCode { 56 CAMERA_SERVICE_CREATE_DEVICE = 0, 57 CAMERA_SERVICE_SET_CALLBACK, 58 CAMERA_SERVICE_GET_CAMERAS, 59 CAMERA_SERVICE_CREATE_CAPTURE_SESSION, 60 CAMERA_SERVICE_CREATE_PHOTO_OUTPUT, 61 CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT, 62 CAMERA_SERVICE_CREATE_PREVIEW_OUTPUT_CUSTOM_SIZE, 63 CAMERA_SERVICE_CREATE_VIDEO_OUTPUT, 64 CAMERA_SERVICE_SET_LISTENER_OBJ 65 }; 66 67 /** 68 * @brief Capture session remote request code for IPC. 69 * 70 * @since 1.0 71 * @version 1.0 72 */ 73 enum CaptureSessionRequestCode { 74 CAMERA_CAPTURE_SESSION_BEGIN_CONFIG = 0, 75 CAMERA_CAPTURE_SESSION_ADD_INPUT, 76 CAMERA_CAPTURE_SESSION_ADD_OUTPUT_CAPTURE, 77 CAMERA_CAPTURE_SESSION_ADD_OUTPUT_REPEAT, 78 CAMERA_CAPTURE_SESSION_REMOVE_INPUT, 79 CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT_CAPTURE, 80 CAMERA_CAPTURE_SESSION_REMOVE_OUTPUT_REPEAT, 81 CAMERA_CAPTURE_SESSION_COMMIT_CONFIG, 82 CAMERA_CAPTURE_SESSION_START, 83 CAMERA_CAPTURE_SESSION_STOP, 84 CAMERA_CAPTURE_SESSION_RELEASE, 85 CAMERA_CAPTURE_SESSION_SET_CALLBACK 86 }; 87 88 /** 89 * @brief Stream capture remote request code for IPC. 90 * 91 * @since 1.0 92 * @version 1.0 93 */ 94 enum StreamCaptureRequestCode { 95 CAMERA_STREAM_CAPTURE_START = 0, 96 CAMERA_STREAM_CAPTURE_CANCEL, 97 CAMERA_STREAM_CAPTURE_SET_CALLBACK, 98 CAMERA_STREAM_CAPTURE_RELEASE 99 }; 100 101 /** 102 * @brief Stream repeat remote request code for IPC. 103 * 104 * @since 1.0 105 * @version 1.0 106 */ 107 enum StreamRepeatRequestCode { 108 CAMERA_START_VIDEO_RECORDING = 0, 109 CAMERA_STOP_VIDEO_RECORDING, 110 CAMERA_STREAM_REPEAT_SET_FPS, 111 CAMERA_STREAM_REPEAT_SET_CALLBACK, 112 CAMERA_STREAM_REPEAT_RELEASE 113 }; 114 115 /** 116 * @brief Camera device callback remote request code for IPC. 117 * 118 * @since 1.0 119 * @version 1.0 120 */ 121 enum CameraDeviceCallbackRequestCode { 122 CAMERA_DEVICE_ON_ERROR = 0, 123 CAMERA_DEVICE_ON_RESULT 124 }; 125 126 /** 127 * @brief Camera repeat stream callback remote request code for IPC. 128 * 129 * @since 1.0 130 * @version 1.0 131 */ 132 enum StreamRepeatCallbackRequestCode { 133 CAMERA_STREAM_REPEAT_ON_FRAME_STARTED = 0, 134 CAMERA_STREAM_REPEAT_ON_FRAME_ENDED, 135 CAMERA_STREAM_REPEAT_ON_ERROR 136 }; 137 138 /** 139 * @brief Camera capture stream callback remote request code for IPC. 140 * 141 * @since 1.0 142 * @version 1.0 143 */ 144 enum StreamCaptureCallbackRequestCode { 145 CAMERA_STREAM_CAPTURE_ON_CAPTURE_STARTED = 0, 146 CAMERA_STREAM_CAPTURE_ON_CAPTURE_ENDED, 147 CAMERA_STREAM_CAPTURE_ON_CAPTURE_ERROR, 148 CAMERA_STREAM_CAPTURE_ON_FRAME_SHUTTER 149 }; 150 151 /** 152 * @brief Capture session callback remote request code for IPC. 153 * 154 * @since 1.0 155 * @version 1.0 156 */ 157 enum CaptureSessionCallbackRequestCode { 158 CAMERA_CAPTURE_SESSION_ON_ERROR = 0 159 }; 160 } // namespace CameraStandard 161 } // namespace OHOS 162 #endif // OHOS_CAMERA_REMOTE_REQUEST_CODE_H 163