• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024-2024 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_IWIFI_PRO_SERVICE_H
17 #define OHOS_WIFI_IWIFI_PRO_SERVICE_H
18 
19 #include "wifi_errcode.h"
20 #include "wifi_msg.h"
21 #include "sta_service_callback.h"
22 
23 namespace OHOS {
24 namespace Wifi {
25 class IWifiProService {
26 public:
27     virtual ~IWifiProService() = default;
28     /**
29      * @Description  wifiPro service initialization function.
30      *
31      * @return ErrCode - success: WIFI_OPT_SUCCESS, failed: WIFI_OPT_FAILED
32      */
33     virtual ErrCode InitWifiProService() = 0;
34 
35     /**
36      * @Description Get register sta callback
37      *
38      * @return StaServiceCallback - sta callback
39      */
40     virtual StaServiceCallback GetStaCallback() const = 0;
41 
42     /**
43      * @Description deal scan results
44      *
45      * @return results - scan results
46      */
47     virtual void DealScanResult(const std::vector<InterScanInfo> &results) = 0;
48 
49     /**
50      * @Description deal wifi channel qoe
51      */
52     virtual void DealQoeReport(const NetworkLagType &networkLagType, const NetworkLagInfo &networkLagInfo) = 0;
53 
54 #ifdef FEATURE_AUTOOPEN_SPEC_LOC_SUPPORT
55     /**
56      * @Description receive screen state change event
57      *
58      * @param screenState - screen state
59      */
60     virtual void OnScreenStateChanged(int32_t screenState) = 0;
61 
62     /**
63      * @Description receive cell info updated
64      *
65      */
66     virtual void OnCellInfoUpdated() = 0;
67 
68     /**
69      * @Description receive wifi open result
70      *
71      * @param state - wifi open state
72      */
73     virtual void OnWifiStateOpen(int32_t state) = 0;
74 
75     /**
76      * @Description receive wifi close result
77      *
78      * @param state - wifi close state
79      */
80     virtual void OnWifiStateClose(int32_t state) = 0;
81 
82     /**
83      * @Description receive device config change
84      *
85      * @param status - device config change type, update/remove
86      * @param config - changed config
87      * @param isRemoveAll - is remove all device config 1:remove all 0:not remove all
88      */
89     virtual void OnWifiDeviceConfigChange(int32_t status, const WifiDeviceConfig &config, bool isRemoveAll) = 0;
90 #endif
91 };
92 }  // namespace Wifi
93 }  // namespace OHOS
94 #endif
95