• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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_SOURCE_INPUT_H
17 #define OHOS_MOCK_DCAMERA_SOURCE_INPUT_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 MockDCameraSourceInput : public ICameraInput {
27 public:
ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>> & streamInfos)28     int32_t ConfigStreams(std::vector<std::shared_ptr<DCStreamInfo>>& streamInfos)
29     {
30         return DCAMERA_BAD_OPERATE;
31     }
ReleaseStreams(std::vector<int> & streamIds,bool & isAllRelease)32     int32_t ReleaseStreams(std::vector<int>& streamIds, bool& isAllRelease)
33     {
34         return DCAMERA_OK;
35     }
ReleaseAllStreams()36     int32_t ReleaseAllStreams()
37     {
38         return DCAMERA_OK;
39     }
StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>> & captureInfos)40     int32_t StartCapture(std::vector<std::shared_ptr<DCCaptureInfo>>& captureInfos)
41     {
42         return DCAMERA_BAD_OPERATE;
43     }
StopCapture(std::vector<int> & streamIds,bool & isAllStop)44     int32_t StopCapture(std::vector<int>& streamIds, bool& isAllStop)
45     {
46         return DCAMERA_BAD_OPERATE;
47     }
StopAllCapture()48     int32_t StopAllCapture()
49     {
50         return DCAMERA_BAD_OPERATE;
51     }
OpenChannel(std::vector<DCameraIndex> & indexs)52     int32_t OpenChannel(std::vector<DCameraIndex>& indexs)
53     {
54         return DCAMERA_BAD_OPERATE;
55     }
CloseChannel()56     int32_t CloseChannel()
57     {
58         return DCAMERA_BAD_OPERATE;
59     }
Init()60     int32_t Init()
61     {
62         return DCAMERA_OK;
63     }
UnInit()64     int32_t UnInit()
65     {
66         return DCAMERA_OK;
67     }
UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>> & settings)68     int32_t UpdateSettings(std::vector<std::shared_ptr<DCameraSettings>>& settings)
69     {
70         return DCAMERA_BAD_OPERATE;
71     }
StopDistributedHardware(const std::string & networkId)72     int32_t StopDistributedHardware(const std::string &networkId)
73     {
74         return DCAMERA_OK;
75     }
76 };
77 } // namespace DistributedHardware
78 } // namespace OHOS
79 #endif // OHOS_MOCK_DCAMERA_SOURCE_INPUT_H
80