1 /* 2 * Copyright (c) 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_MOCK_DISTRIBUTED_CAMERA_SINK_STUB_H 17 #define OHOS_MOCK_DISTRIBUTED_CAMERA_SINK_STUB_H 18 19 #include "distributed_camera_errno.h" 20 #include "distributed_camera_sink_stub.h" 21 22 namespace OHOS { 23 namespace DistributedHardware { 24 class MockDistributedCameraSinkStub : public DistributedCameraSinkStub { 25 public: 26 MockDistributedCameraSinkStub() = default; 27 virtual ~MockDistributedCameraSinkStub() = default; InitSink(const std::string & params)28 int32_t InitSink(const std::string ¶ms) 29 { 30 (void)params; 31 return DCAMERA_OK; 32 } 33 ReleaseSink()34 int32_t ReleaseSink() 35 { 36 return DCAMERA_OK; 37 } 38 SubscribeLocalHardware(const std::string & dhId,const std::string & param)39 int32_t SubscribeLocalHardware(const std::string &dhId, const std::string ¶m) 40 { 41 (void)dhId; 42 (void)param; 43 return DCAMERA_OK; 44 } 45 UnsubscribeLocalHardware(const std::string & dhId)46 int32_t UnsubscribeLocalHardware(const std::string &dhId) 47 { 48 (void)dhId; 49 return DCAMERA_OK; 50 } 51 StopCapture(const std::string & dhId)52 int32_t StopCapture(const std::string &dhId) 53 { 54 (void)dhId; 55 return DCAMERA_OK; 56 } 57 ChannelNeg(const std::string & dhId,std::string & channelInfo)58 int32_t ChannelNeg(const std::string &dhId, std::string& channelInfo) 59 { 60 (void)dhId; 61 (void)channelInfo; 62 return DCAMERA_OK; 63 } 64 GetCameraInfo(const std::string & dhId,std::string & cameraInfo)65 int32_t GetCameraInfo(const std::string &dhId, std::string& cameraInfo) 66 { 67 (void)dhId; 68 (void)cameraInfo; 69 return DCAMERA_OK; 70 } 71 OpenChannel(const std::string & dhId,std::string & openInfo)72 int32_t OpenChannel(const std::string &dhId, std::string& openInfo) 73 { 74 (void)dhId; 75 (void)openInfo; 76 return DCAMERA_OK; 77 } 78 CloseChannel(const std::string & dhId)79 int32_t CloseChannel(const std::string &dhId) 80 { 81 (void)dhId; 82 return DCAMERA_OK; 83 } 84 }; 85 86 87 } // namespace DistributedHardware 88 } // namespace OHOS 89 #endif // OHOS_MOCK_DISTRIBUTED_CAMERA_SINK_STUB_H