• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2024 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_DCAMERA_SINK_CONTROLLER_H
17 #define OHOS_MOCK_DCAMERA_SINK_CONTROLLER_H
18 
19 #include "icamera_controller.h"
20 #include "dcamera_source_dev.h"
21 #include "dcamera_source_state_machine.h"
22 #include "distributed_hardware_log.h"
23 
24 namespace OHOS {
25 namespace DistributedHardware {
26 class MockDCameraSourceController : public ICameraController {
27 public:
MockDCameraSourceController()28     explicit MockDCameraSourceController()
29     {
30     }
31 
~MockDCameraSourceController()32     ~MockDCameraSourceController()
33     {
34     }
35 
StartCapture(std::vector<std::shared_ptr<DCameraCaptureInfo>> & captureInfos,int32_t sceneMode)36     int32_t StartCapture(std::vector<std::shared_ptr<DCameraCaptureInfo>>& captureInfos, int32_t sceneMode)
37     {
38         return DCAMERA_OK;
39     }
StopCapture()40     int32_t StopCapture()
41     {
42         return DCAMERA_OK;
43     }
ChannelNeg(std::shared_ptr<DCameraChannelInfo> & info)44     int32_t ChannelNeg(std::shared_ptr<DCameraChannelInfo>& info)
45     {
46         return DCAMERA_OK;
47     }
DCameraNotify(std::shared_ptr<DCameraEvent> & events)48     int32_t DCameraNotify(std::shared_ptr<DCameraEvent>& events)
49     {
50         return DCAMERA_OK;
51     }
UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> & settings)52     int32_t UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>>& settings)
53     {
54         return DCAMERA_OK;
55     }
GetCameraInfo(std::shared_ptr<DCameraInfo> & camInfo)56     int32_t GetCameraInfo(std::shared_ptr<DCameraInfo>& camInfo)
57     {
58         return DCAMERA_OK;
59     }
OpenChannel(std::shared_ptr<DCameraOpenInfo> & openInfo)60     int32_t OpenChannel(std::shared_ptr<DCameraOpenInfo>& openInfo)
61     {
62         return DCAMERA_OK;
63     }
CloseChannel()64     int32_t CloseChannel()
65     {
66         return DCAMERA_OK;
67     }
Init(std::vector<DCameraIndex> & indexs)68     int32_t Init(std::vector<DCameraIndex>& indexs)
69     {
70         return DCAMERA_OK;
71     }
UnInit()72     int32_t UnInit()
73     {
74         return DCAMERA_OK;
75     }
PauseDistributedHardware(const std::string & networkId)76     int32_t PauseDistributedHardware(const std::string &networkId)
77     {
78         return DCAMERA_OK;
79     }
ResumeDistributedHardware(const std::string & networkId)80     int32_t ResumeDistributedHardware(const std::string &networkId)
81     {
82         return DCAMERA_OK;
83     }
StopDistributedHardware(const std::string & networkId)84     int32_t StopDistributedHardware(const std::string &networkId)
85     {
86         return DCAMERA_OK;
87     }
88 };
89 } // namespace DistributedHardware
90 } // namespace OHOS
91 #endif // OHOS_MOCK_DCAMERA_SINK_CONTROLLER_H
92