1 /* 2 * Copyright (C) 2021 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_IDL_IWIFI_EVENT_CALLBACK_H 17 #define OHOS_IDL_IWIFI_EVENT_CALLBACK_H 18 19 #include "wifi_error_no.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 typedef struct IWifiEventCallback { 26 void (*onStarted)(void); 27 void (*onStopped)(void); 28 void (*onFailure)(WifiErrorNo errCode); 29 void (*onConnectChanged)(int status, int networkId, const char *bssid); 30 void (*onBssidChanged)(const char *reason, const char *bssid); 31 void (*onWpaStateChanged)(int status); 32 void (*onSsidWrongkey)(void); 33 void (*onWpsOverlap)(int status); 34 void (*onWpsTimeOut)(int status); 35 void (*onWpsConnectionFull)(int status); 36 void (*onWpsConnectionReject)(int status); 37 void (*onEventStaNotify)(const char *notifyParam); 38 void (*onDisConnectReasonNotify)(int, const char *bssid); 39 } IWifiEventCallback; 40 41 #ifdef __cplusplus 42 } 43 #endif 44 #endif