• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 #ifdef HDI_WPA_INTERFACE_SUPPORT
17 #ifndef OHOS_WIFI_HDI_WPA_STA_IMPL_H
18 #define OHOS_WIFI_HDI_WPA_STA_IMPL_H
19 
20 #include "wifi_hdi_wpa_proxy.h"
21 #include "i_wifi_struct.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 WifiErrorNo HdiWpaStaStart(const char *ifaceName, int instId);
28 
29 WifiErrorNo HdiWpaStaStop(int instId);
30 
31 WifiErrorNo HdiWpaStaConnect(int networkId, const char *ifaceName);
32 
33 WifiErrorNo HdiWpaStaReconnect(const char *ifaceName);
34 
35 WifiErrorNo HdiWpaStaReassociate(const char *ifaceName);
36 
37 WifiErrorNo HdiWpaStaDisconnect(const char *ifaceName);
38 
39 WifiErrorNo HdiWpaStaGetDeviceMacAddress(char *macAddr, int macAddrLen, const char *ifaceName);
40 
41 WifiErrorNo HdiWpaStaScan();
42 
43 ScanInfo *HdiWpaStaGetScanInfos(int *size, const char *ifaceName);
44 
45 WifiErrorNo HdiWpaStaRemoveNetwork(int networkId, const char *ifaceName);
46 
47 WifiErrorNo HdiWpaStaAddNetwork(int *networkId, const char *ifaceName);
48 
49 WifiErrorNo HdiWpaStaEnableNetwork(int networkId, const char *ifaceName);
50 
51 WifiErrorNo HdiWpaStaDisableNetwork(int networkId, const char *ifaceName);
52 
53 WifiErrorNo HdiWpaStaSetNetwork(int networkId, SetNetworkConfig *confs, int size, const char *ifaceName);
54 
55 WifiErrorNo HdiWpaStaSaveConfig(const char *ifaceName);
56 
57 WifiErrorNo RegisterHdiWpaStaEventCallback(struct IWpaCallback *callback, const char *ifaceName, int instId);
58 
59 WifiErrorNo HdiWpaStaStartWpsPbcMode(WifiWpsParam *config, const char *ifaceName);
60 
61 WifiErrorNo HdiWpaStaStartWpsPinMode(WifiWpsParam *config, int *pinCode, const char *ifaceName);
62 
63 WifiErrorNo HdiStopWpsSta(const char *ifaceName);
64 
65 WifiErrorNo HdiWpaStaAutoConnect(int enable, const char *ifaceName);
66 
67 WifiErrorNo HdiWpaStaBlocklistClear(const char *ifaceName);
68 
69 WifiErrorNo HdiWpaStaSetPowerSave(int enable, const char *ifaceName);
70 
71 WifiErrorNo HdiWpaStaSetCountryCode(const char *countryCode, const char *ifaceName);
72 
73 WifiErrorNo HdiWpaStaSetSuspendMode(int mode, const char *ifaceName);
74 
75 WifiErrorNo HdiWpaStaGetCountryCode(char *countryCode, uint32_t size, const char *ifaceName);
76 
77 WifiErrorNo HdiWpaListNetworks(struct HdiWifiWpaNetworkInfo *networkList, uint32_t *size, const char *ifaceName);
78 
79 WifiErrorNo HdiWpaGetNetwork(
80     int32_t networkId, const char* param, char* value, uint32_t valueLen, const char *ifaceName);
81 
82 WifiErrorNo HdiWpaStaSetShellCmd(const char *ifName, const char *cmd);
83 
84 WifiErrorNo HdiWpaStaGetPskPassphrase(const char *ifName, char *psk, uint32_t pskLen);
85 
86 int ConvertMacToStr(char *mac, int macSize, char *macStr, int strLen);
87 
88 WifiErrorNo HdiSetNativeProcessCallback(void (*callback)(int));
89 
90 WifiErrorNo HdiWpaGetMloLinkedInfo(const char *ifName, const char *staParam, char *staData,
91     uint32_t staDataLen);
92 
93 void ReleaseStaCallback(const char *ifName);
94 #ifdef __cplusplus
95 }
96 #endif
97 #endif
98 #endif