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 #ifndef OHOS_WIFI_EVENT_CALLBACK_H 16 #define OHOS_WIFI_EVENT_CALLBACK_H 17 18 #include <string> 19 #include <functional> 20 21 namespace OHOS { 22 namespace Wifi { 23 struct WifiEventCallback { 24 std::function<void(int, int, const std::string &)> onConnectChanged; 25 std::function<void(const std::string &, const std::string &)> onBssidChanged; 26 std::function<void(int)> onWpaStateChanged; 27 std::function<void(void)> onWpaSsidWrongKey; 28 std::function<void(int)> onWpsOverlap; 29 std::function<void(int)> onWpsTimeOut; 30 std::function<void(void)> onWpaAuthTimeout; 31 std::function<void(int)> onWpaConnectionFull; 32 std::function<void(int)> onWpaConnectionReject; 33 std::function<void(const std::string &)> onEventStaNotify; 34 std::function<void(int, const std::string &)> onReportDisConnectReason; 35 }; 36 37 enum class WpaEventCallback { 38 HILINK_NUM = 1, 39 EAP_SIM_NUM = 2, 40 CSA_CHSWITCH_NUM = 3, 41 CHR_EVENT_NUM = 4, 42 }; 43 44 } // namespace Wifi 45 } // namespace OHOS 46 47 #endif