• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_I_WIFI_DEVICE_CALLBACK_H
16 #define OHOS_I_WIFI_DEVICE_CALLBACK_H
17 
18 #include <string>
19 #include <string_ex.h>
20 #include <iremote_stub.h>
21 #include "message_parcel.h"
22 #include "message_option.h"
23 #include "wifi_msg.h"
24 #include "define.h"
25 
26 
27 namespace OHOS {
28 namespace Wifi {
29 class IWifiDeviceCallBack : public IRemoteBroker {
30 public:
31     /**
32      * @Description Deal wifi state change message
33      *
34      * @param state - Wifi State
35      */
36     virtual void OnWifiStateChanged(int state) = 0;
37 
38     /**
39      * @Description Deal wifi connection state change message
40      *
41      * @param state - Wifi connect state
42      * @param info - WifiLinkedInfo object
43      */
44     virtual void OnWifiConnectionChanged(int state, const WifiLinkedInfo &info) = 0;
45 
46     /**
47      * @Description Deal wifi rssi change message
48      *
49      * @param rssi - rssi
50      */
51     virtual void OnWifiRssiChanged(int rssi) = 0;
52 
53     /**
54      * @Description Deal wps state change message
55      *
56      * @param state - wps state
57      * @param pinCode - when wps pin mode, open wps successfully, return the pin code
58      */
59     virtual void OnWifiWpsStateChanged(int state, const std::string &pinCode) = 0;
60 
61     /**
62      * @Description Deal stream change message
63      *
64      * @param direction - stream direction
65      */
66     virtual void OnStreamChanged(int direction) = 0;
67 
68 public:
69     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.wifi.IWifiDeviceCallBack");
70 };
71 }  // namespace Wifi
72 }  // namespace OHOS
73 #endif