OSDN Git Service

a723b2aa2048c4e2abb2f1b63d5dd4faf9cda9ee
[android-x86/hardware-interfaces.git] / wifi / 1.0 / vts / functional / wifi_hidl_test_utils.h
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
19 #include <android/hardware/wifi/1.0/IWifi.h>
20 #include <android/hardware/wifi/1.0/IWifiApIface.h>
21 #include <android/hardware/wifi/1.0/IWifiChip.h>
22 #include <android/hardware/wifi/1.0/IWifiNanIface.h>
23 #include <android/hardware/wifi/1.0/IWifiP2pIface.h>
24 #include <android/hardware/wifi/1.0/IWifiRttController.h>
25 #include <android/hardware/wifi/1.0/IWifiStaIface.h>
26
27 // Used to stop the android framework (wifi service) before every
28 // test.
29 void stopFramework();
30 void startFramework();
31
32 // Helper functions to obtain references to the various HIDL interface objects.
33 // Note: We only have a single instance of each of these objects currently.
34 // These helper functions should be modified to return vectors if we support
35 // multiple instances.
36 android::sp<android::hardware::wifi::V1_0::IWifi> getWifi();
37 android::sp<android::hardware::wifi::V1_0::IWifiChip> getWifiChip();
38 android::sp<android::hardware::wifi::V1_0::IWifiApIface> getWifiApIface();
39 android::sp<android::hardware::wifi::V1_0::IWifiNanIface> getWifiNanIface();
40 android::sp<android::hardware::wifi::V1_0::IWifiP2pIface> getWifiP2pIface();
41 android::sp<android::hardware::wifi::V1_0::IWifiStaIface> getWifiStaIface();
42 android::sp<android::hardware::wifi::V1_0::IWifiRttController>
43 getWifiRttController();
44 // Configure the chip in a mode to support the creation of the provided
45 // iface type.
46 bool configureChipToSupportIfaceType(
47     const android::sp<android::hardware::wifi::V1_0::IWifiChip>& wifi_chip,
48     android::hardware::wifi::V1_0::IfaceType type,
49     android::hardware::wifi::V1_0::ChipModeId* configured_mode_id);
50 // Used to trigger IWifi.stop() at the end of every test.
51 void stopWifi();