• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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_CAMERA_CHANNEL_H
17 #define OHOS_MOCK_CAMERA_CHANNEL_H
18 
19 #include "distributed_camera_errno.h"
20 #include "icamera_channel.h"
21 
22 namespace OHOS {
23 namespace DistributedHardware {
24 class MockCameraChannel : public ICameraChannel {
25 public:
MockCameraChannel()26     explicit MockCameraChannel()
27     {
28     }
29 
~MockCameraChannel()30     ~MockCameraChannel()
31     {
32     }
33 
OpenSession()34     int32_t OpenSession()
35     {
36         return DCAMERA_OK;
37     }
38 
CloseSession()39     int32_t CloseSession()
40     {
41         return DCAMERA_OK;
42     }
43 
CreateSession(std::vector<DCameraIndex> & camIndexs,std::string sessionFlag,DCameraSessionMode sessionMode,std::shared_ptr<ICameraChannelListener> & listener)44     int32_t CreateSession(std::vector<DCameraIndex>& camIndexs, std::string sessionFlag,
45         DCameraSessionMode sessionMode, std::shared_ptr<ICameraChannelListener>& listener)
46     {
47         return DCAMERA_OK;
48     }
49 
ReleaseSession()50     int32_t ReleaseSession()
51     {
52         return DCAMERA_OK;
53     }
54 
SendData(std::shared_ptr<DataBuffer> & buffer)55     int32_t SendData(std::shared_ptr<DataBuffer>& buffer)
56     {
57         return DCAMERA_OK;
58     }
59 };
60 } // namespace DistributedHardware
61 } // namespace OHOS
62 #endif // OHOS_MOCK_CAMERA_CHANNEL_H
63