1 /* 2 * Copyright (c) 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_DAUDIO_SOURCE_CTRL_TRANS_TEST_H 17 #define OHOS_DAUDIO_SOURCE_CTRL_TRANS_TEST_H 18 19 #include <gtest/gtest.h> 20 21 #define private public 22 #include "daudio_source_ctrl_trans.h" 23 #undef private 24 25 namespace OHOS { 26 namespace DistributedHardware { 27 class CtrlTransCallback : public IAudioCtrlTransCallback { 28 public: CtrlTransCallback()29 CtrlTransCallback() {}; ~CtrlTransCallback()30 ~CtrlTransCallback() override {}; 31 32 void OnCtrlTransEvent(const AVTransEvent &event) override; 33 void OnCtrlTransMessage(const std::shared_ptr<AVTransMessage> &message) override; 34 }; 35 36 class DaudioSourceCtrlTransTest : public testing::Test { 37 public: 38 static void SetUpTestCase(void); 39 static void TearDownTestCase(void); 40 void SetUp(); 41 void TearDown(); 42 std::shared_ptr<CtrlTransCallback> ctrlTransCallback_ = nullptr; 43 std::shared_ptr<DaudioSourceCtrlTrans> ctrlTrans_ = nullptr; 44 }; 45 } // namespace DistributedHardware 46 } // namespace OHOS 47 #endif // OHOS_DAUDIO_SOURCE_CTRL_TRANS_TEST_H 48