1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 #pragma clang diagnostic ignored "-Wweak-vtables" 19 20 #include <VtsCoreUtil.h> 21 #include <android/hardware/wifi/supplicant/1.1/ISupplicant.h> 22 #include <android/hardware/wifi/supplicant/1.1/ISupplicantStaIface.h> 23 #include <android/hardware/wifi/supplicant/1.1/ISupplicantStaNetwork.h> 24 #include <gtest/gtest.h> 25 26 android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicant> 27 getSupplicant_1_1(const std::string& supplicant_instance_name, bool isP2pOn); 28 29 android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicantStaIface> 30 getSupplicantStaIface_1_1( 31 const android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicant>& 32 supplicant); 33 34 android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicantStaNetwork> 35 createSupplicantStaNetwork_1_1( 36 const android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicant>& 37 supplicant); 38 39 class SupplicantHidlTestBaseV1_1 : public SupplicantHidlTestBase { 40 public: SetUp()41 virtual void SetUp() override { 42 SupplicantHidlTestBase::SetUp(); 43 supplicant_ = getSupplicant_1_1(supplicant_instance_name_, isP2pOn_); 44 ASSERT_NE(supplicant_.get(), nullptr); 45 } 46 47 protected: 48 android::sp<android::hardware::wifi::supplicant::V1_1::ISupplicant> 49 supplicant_; 50 }; 51