• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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,const sptr<IDCameraSinkCallback> & sinkCallback)28     int32_t InitSink(const std::string &params, const sptr<IDCameraSinkCallback> &sinkCallback)
29     {
30         (void)params;
31         (void)sinkCallback;
32         return DCAMERA_OK;
33     }
34 
ReleaseSink()35     int32_t ReleaseSink()
36     {
37         return DCAMERA_OK;
38     }
39 
SubscribeLocalHardware(const std::string & dhId,const std::string & param)40     int32_t SubscribeLocalHardware(const std::string &dhId, const std::string &param)
41     {
42         (void)dhId;
43         (void)param;
44         return DCAMERA_OK;
45     }
46 
UnsubscribeLocalHardware(const std::string & dhId)47     int32_t UnsubscribeLocalHardware(const std::string &dhId)
48     {
49         (void)dhId;
50         return DCAMERA_OK;
51     }
52 
StopCapture(const std::string & dhId)53     int32_t StopCapture(const std::string &dhId)
54     {
55         (void)dhId;
56         return DCAMERA_OK;
57     }
58 
ChannelNeg(const std::string & dhId,std::string & channelInfo)59     int32_t ChannelNeg(const std::string &dhId, std::string& channelInfo)
60     {
61         (void)dhId;
62         (void)channelInfo;
63         return DCAMERA_OK;
64     }
65 
GetCameraInfo(const std::string & dhId,std::string & cameraInfo)66     int32_t GetCameraInfo(const std::string &dhId, std::string& cameraInfo)
67     {
68         (void)dhId;
69         (void)cameraInfo;
70         return DCAMERA_OK;
71     }
72 
OpenChannel(const std::string & dhId,std::string & openInfo)73     int32_t OpenChannel(const std::string &dhId, std::string& openInfo)
74     {
75         (void)dhId;
76         (void)openInfo;
77         return DCAMERA_OK;
78     }
79 
CloseChannel(const std::string & dhId)80     int32_t CloseChannel(const std::string &dhId)
81     {
82         (void)dhId;
83         return DCAMERA_OK;
84     }
85 
PauseDistributedHardware(const std::string & networkId)86     int32_t PauseDistributedHardware(const std::string &networkId)
87     {
88         (void)networkId;
89         return DCAMERA_OK;
90     }
91 
ResumeDistributedHardware(const std::string & networkId)92     int32_t ResumeDistributedHardware(const std::string &networkId)
93     {
94         (void)networkId;
95         return DCAMERA_OK;
96     }
97 
StopDistributedHardware(const std::string & networkId)98     int32_t StopDistributedHardware(const std::string &networkId)
99     {
100         (void)networkId;
101         return DCAMERA_OK;
102     }
103 };
104 } // namespace DistributedHardware
105 } // namespace OHOS
106 #endif // OHOS_MOCK_DISTRIBUTED_CAMERA_SINK_STUB_H