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 OHOS_MOCK_CAMERA_OPERATOR_H 17 #define OHOS_MOCK_CAMERA_OPERATOR_H 18 19 #include "distributed_camera_errno.h" 20 #include "icamera_operator.h" 21 22 namespace OHOS { 23 namespace DistributedHardware { 24 class MockCameraOperator : public ICameraOperator { 25 public: MockCameraOperator()26 explicit MockCameraOperator() 27 { 28 } 29 ~MockCameraOperator()30 ~MockCameraOperator() 31 { 32 } 33 Init()34 int32_t Init() 35 { 36 return DCAMERA_OK; 37 } 38 UnInit()39 int32_t UnInit() 40 { 41 return DCAMERA_OK; 42 } 43 UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> & settings)44 int32_t UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>>& settings) 45 { 46 return DCAMERA_OK; 47 } 48 OpenCamera(std::vector<std::shared_ptr<DCameraCaptureInfo>> & captureInfos)49 int32_t OpenCamera(std::vector<std::shared_ptr<DCameraCaptureInfo>>& captureInfos) 50 { 51 return DCAMERA_OK; 52 } 53 CloseCamera()54 int32_t CloseCamera() 55 { 56 return DCAMERA_OK; 57 } 58 StartCapture(std::vector<std::shared_ptr<DCameraCaptureInfo>> & captureInfos)59 int32_t StartCapture(std::vector<std::shared_ptr<DCameraCaptureInfo>>& captureInfos) 60 { 61 return DCAMERA_OK; 62 } 63 StopCapture()64 int32_t StopCapture() 65 { 66 return DCAMERA_OK; 67 } 68 SetStateCallback(std::shared_ptr<StateCallback> & callback)69 int32_t SetStateCallback(std::shared_ptr<StateCallback>& callback) 70 { 71 return DCAMERA_OK; 72 } 73 SetResultCallback(std::shared_ptr<ResultCallback> & callback)74 int32_t SetResultCallback(std::shared_ptr<ResultCallback>& callback) 75 { 76 return DCAMERA_OK; 77 } 78 }; 79 } // namespace DistributedHardware 80 } // namespace OHOS 81 #endif // OHOS_MOCK_CAMERA_OPERATOR_H