1 /* 2 * Copyright (c) 2020 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 CAMERA_TYPE_H 17 #define CAMERA_TYPE_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace Media { 23 typedef enum { 24 CAMERA_SERVER_GET_CAMERA_ABILITY, 25 CAMERA_SERVER_GET_CAMERA_INFO, 26 CAMERA_SERVER_GET_CAMERAIDLIST, 27 CAMERA_SERVER_CREATE_CAMERA, 28 CAMERA_SERVER_CLOSE_CAMERA, 29 CAMERA_SERVER_SET_CAMERA_CONFIG, 30 CAMERA_SERVER_TRIGGER_SINGLE_CAPTURE, 31 CAMERA_SERVER_TRIGGER_LOOPING_CAPTURE, 32 CAMERA_SERVER_STOP_LOOPING_CAPTURE, 33 CAMERA_SERVER_SET_CAMERA_CALLBACK, 34 CAMERA_SERVER_GET_CAMERA_MODE_NUM, 35 CAMERA_SERVER_SET_CAMERA_MODE_NUM, 36 } CameraServerCall; 37 38 typedef enum { 39 ON_CAMERA_STATUS_CHANGE, 40 ON_CAMERA_CONFIGURED, 41 ON_TRIGGER_SINGLE_CAPTURE_FINISHED, 42 ON_TRIGGER_LOOPING_CAPTURE_FINISHED 43 } CameraServerback; 44 45 struct CallBackPara { 46 int funcId; 47 std::string cameraId; 48 void* data; 49 void* frameConfig; 50 void* cameraConfig; 51 }; 52 const char SERVICE_NAME[] = "CameraServer"; 53 static const int32_t DEFAULT_IPC_SIZE = 300; 54 } // namespace Media 55 } // namespace OHOS 56 #endif 57