1 /* 2 * Copyright (C) 2021-2022 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_I_WIFI_HOTSPOT_CALLBACK_H 17 #define OHOS_I_WIFI_HOTSPOT_CALLBACK_H 18 19 #include <string> 20 #include <string_ex.h> 21 #include <iremote_broker.h> 22 #include "message_parcel.h" 23 #include "message_option.h" 24 #include "wifi_ap_msg.h" 25 #include "define.h" 26 27 namespace OHOS { 28 namespace Wifi { 29 class IWifiHotspotCallback : public IRemoteBroker { 30 public: 31 /** 32 * @Description Deal Hotspot state change message 33 * 34 * @param state - Hotspot state 35 */ 36 virtual void OnHotspotStateChanged(int state) = 0; 37 38 /** 39 * @Description Deal Hotspot accept a connection message 40 * 41 * @param info - The connected station info 42 */ 43 virtual void OnHotspotStaJoin(const StationInfo &info) = 0; 44 45 /** 46 * @Description Deal Hotspot lost a connection message 47 * 48 * @param info - The disconnect station info 49 */ 50 virtual void OnHotspotStaLeave(const StationInfo &info) = 0; 51 52 public: 53 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.wifi.IWifiHotspotCallback"); 54 }; 55 } // namespace Wifi 56 } // namespace OHOS 57 #endif 58