• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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 #include <gmock/gmock.h>
17 #include "mock_wfd_source_session.h"
18 
19 namespace OHOS {
20 namespace Sharing {
21 
InitSession()22 void MockWfdSourceSession::InitSession()
23 {
24     rtspServerFd_ = 1;
25     sourceIp_ = "0.0.0.0";
26     sinkIp_ = "1.1.1.1";
27 }
28 
SetInterruptState(bool state)29 void MockWfdSourceSession::SetInterruptState(bool state)
30 {
31     interrupting_ = state;
32 }
33 
SetWfdState(WfdSessionState state)34 void MockWfdSourceSession::SetWfdState(WfdSessionState state)
35 {
36     wfdState_ = state;
37 }
38 
SetServer(std::shared_ptr<IServer> server)39 void MockWfdSourceSession::SetServer(std::shared_ptr<IServer> server)
40 {
41     rtspServerPtr_ = server;
42 }
43 
SetRunningState(SessionRunningStatus state)44 void MockWfdSourceSession::SetRunningState(SessionRunningStatus state)
45 {
46     status_ = state;
47 }
48 
49 } // namespace Sharing
50 } // namespace OHOS
51