• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 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_WPA_WORK_H
17 #define OHOS_WPA_WORK_H
18 
19 #include <stdio.h>
20 #include <stddef.h>
21 #include <unistd.h>
22 
23 #include "parameter.h"
24 #include "pthread.h"
25 #include "securec.h"
26 #include "wpa_ctrl.h"
27 #include <sys/select.h>
28 
29 #ifdef __cplusplus
30 #if __cplusplus
31 extern "C" {
32 #endif
33 #endif /* __cplusplus */
34     #define HIDDEN_CLOSE 0
35     #define HIDDEN_OPEN 1
36     void ExitWpaScan(void);
37     void ExitWpa(void);
38     int wpa_main(int argc, char *argv[]);
39     int GetCurrentConnInfo(char *ssid, int len);
40     void DeinitWifiService();
41     void ResetSSIDBuff(void);
42     int GetIdNum(void);
43     int GetAndResetScanStat(void);
44     char *GetSsid(const int ssidNum);
45     void WpaScanReconnect(const char *gSsid, const char *gPassWord, const int hiddenSwitch);
46     void WpaClientStart(void);
47     void LockWifiData(void);
48     void UnLockWifiData(void);
49 #ifdef __cplusplus
50 #if __cplusplus
51 }
52 #endif
53 #endif /* __cplusplus */
54 #endif
55