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_SOURCE_STUB_H 17 #define OHOS_MOCK_DISTRIBUTED_CAMERA_SOURCE_STUB_H 18 19 #include "distributed_camera_errno.h" 20 #include "distributed_camera_source_stub.h" 21 22 namespace OHOS { 23 namespace DistributedHardware { 24 class MockDistributedCameraSourceStub : public DistributedCameraSourceStub { 25 public: 26 MockDistributedCameraSourceStub() = default; 27 virtual ~MockDistributedCameraSourceStub() = default; InitSource(const std::string & params,const sptr<IDCameraSourceCallback> & callback)28 int32_t InitSource(const std::string& params, const sptr<IDCameraSourceCallback>& callback) 29 { 30 (void)params; 31 (void)callback; 32 return DCAMERA_OK; 33 } 34 ReleaseSource()35 int32_t ReleaseSource() 36 { 37 return DCAMERA_OK; 38 } 39 RegisterDistributedHardware(const std::string & devId,const std::string & dhId,const std::string & reqId,const EnableParam & param)40 int32_t RegisterDistributedHardware(const std::string& devId, const std::string& dhId, 41 const std::string& reqId, const EnableParam& param) 42 { 43 (void)devId; 44 (void)dhId; 45 (void)reqId; 46 (void)param; 47 return DCAMERA_OK; 48 } 49 UnregisterDistributedHardware(const std::string & devId,const std::string & dhId,const std::string & reqId)50 int32_t UnregisterDistributedHardware(const std::string& devId, const std::string& dhId, 51 const std::string& reqId) 52 { 53 (void)devId; 54 (void)dhId; 55 (void)reqId; 56 return DCAMERA_OK; 57 } 58 DCameraNotify(const std::string & devId,const std::string & dhId,std::string & events)59 int32_t DCameraNotify(const std::string& devId, const std::string& dhId, 60 std::string& events) 61 { 62 (void)devId; 63 (void)dhId; 64 (void)events; 65 return DCAMERA_OK; 66 } 67 }; 68 69 70 } // namespace DistributedHardware 71 } // namespace OHOS 72 #endif // OHOS_MOCK_DISTRIBUTED_CAMERA_SOURCE_STUB_H