1 /*
2  * Copyright (c) 2022-2023 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_DAUDIO_TEST_UTILS_H
17 #define OHOS_DAUDIO_TEST_UTILS_H
18 
19 #include "iaudio_data_transport.h"
20 #include "iaudio_event_callback.h"
21 
22 namespace OHOS {
23 namespace DistributedHardware {
24 class MockIAudioEventCallback : public IAudioEventCallback {
25 public:
NotifyEvent(const AudioEvent & event)26     void NotifyEvent(const AudioEvent &event) override {}
27 };
28 
29 class MockIAudioDataTransport : public IAudioDataTransport {
30 public:
SetUp(const AudioParam & localParam,const AudioParam & remoteParam,const std::shared_ptr<IAudioDataTransCallback> & callback,const PortCapType capType)31     int32_t SetUp(const AudioParam &localParam, const AudioParam &remoteParam,
32         const std::shared_ptr<IAudioDataTransCallback> &callback, const PortCapType capType) override
33     {
34         return 0;
35     }
36 
Start()37     int32_t Start() override
38     {
39         return 0;
40     }
41 
Stop()42     int32_t Stop() override
43     {
44         return 0;
45     }
46 
Release()47     int32_t Release() override
48     {
49         return 0;
50     }
51 
Pause()52     int32_t Pause() override
53     {
54         return 0;
55     }
56 
Restart(const AudioParam & localParam,const AudioParam & remoteParam)57     int32_t Restart(const AudioParam &localParam, const AudioParam &remoteParam) override
58     {
59         return 0;
60     }
61 
FeedAudioData(std::shared_ptr<AudioData> & audioData)62     int32_t FeedAudioData(std::shared_ptr<AudioData> &audioData) override
63     {
64         return 0;
65     }
66 
InitEngine(IAVEngineProvider * providerPtr)67     int32_t InitEngine(IAVEngineProvider *providerPtr) override
68     {
69         return 0;
70     }
71 
SendMessage(uint32_t type,std::string content,std::string dstDevId)72     int32_t SendMessage(uint32_t type, std::string content, std::string dstDevId) override
73     {
74         return 0;
75     }
76 
CreateCtrl()77     int32_t CreateCtrl() override
78     {
79         return 0;
80     }
81 };
82 } // namespace DistributedHardware
83 } // namespace OHOS
84 #endif // OHOS_DAUDIO_TEST_UTILS_H