1 /*
2  * Copyright (C) 2019 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 #ifndef SUPPLICANT_HIDL_TEST_UTILS_1_3_H
18 #define SUPPLICANT_HIDL_TEST_UTILS_1_3_H
19 
20 #include <android/hardware/wifi/supplicant/1.3/ISupplicant.h>
21 #include <android/hardware/wifi/supplicant/1.3/ISupplicantStaIface.h>
22 #include <android/hardware/wifi/supplicant/1.3/ISupplicantStaNetwork.h>
23 
24 android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicantStaIface>
25 getSupplicantStaIface_1_3(
26     const android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicant>&
27         supplicant);
28 android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicantStaNetwork>
29 createSupplicantStaNetwork_1_3(
30     const android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicant>&
31         supplicant);
32 android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicant>
33 getSupplicant_1_3(const std::string& supplicant_instance_name, bool isP2pOn);
34 bool isFilsSupported(
35     android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicantStaIface>
36         sta_iface);
37 
38 class SupplicantHidlTestBaseV1_3 : public SupplicantHidlTestBase {
39    public:
SetUp()40     virtual void SetUp() override {
41         SupplicantHidlTestBase::SetUp();
42         supplicant_ = getSupplicant_1_3(supplicant_instance_name_, isP2pOn_);
43         ASSERT_NE(supplicant_.get(), nullptr);
44     }
45 
46    protected:
47     android::sp<android::hardware::wifi::supplicant::V1_3::ISupplicant>
48         supplicant_;
49 };
50 #endif /* SUPPLICANT_HIDL_TEST_UTILS_1_3_H */
51