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_WIFI_HOTSPOT_CALLBACK_PROXY_H
17 #define OHOS_WIFI_HOTSPOT_CALLBACK_PROXY_H
18 
19 #include "i_wifi_hotspot_callback.h"
20 #include "iremote_proxy.h"
21 #include "wifi_msg.h"
22 
23 namespace OHOS {
24 namespace Wifi {
25 class WifiHotspotCallbackProxy : public IRemoteProxy<IWifiHotspotCallback> {
26 public:
27     explicit WifiHotspotCallbackProxy(const sptr<IRemoteObject> &remote);
28     ~WifiHotspotCallbackProxy() = default;
29 
30     /**
31      * @Description Deal Hotspot state change message
32      *
33      * @param state - Hotspot state
34      */
35     void OnHotspotStateChanged(int state) override;
36 
37     /**
38      * @Description Deal Hotspot accept a connection message
39      *
40      * @param info - The connected station info
41      */
42     void OnHotspotStaJoin(const StationInfo &info) override;
43 
44     /**
45      * @Description Deal Hotspot lost a connection message
46      *
47      * @param info - The disconnect station info
48      */
49     void OnHotspotStaLeave(const StationInfo &info) override;
50 
51 private:
52     static inline BrokerDelegator<WifiHotspotCallbackProxy> g_delegator;
53 };
54 }  // namespace Wifi
55 }  // namespace OHOS
56 #endif