• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2025 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 INTERFACES_INNER_API_WIFI_MANAGER_INCLUDE_WIFI_MANAGER_PROXY_H
17 #define INTERFACES_INNER_API_WIFI_MANAGER_INCLUDE_WIFI_MANAGER_PROXY_H
18 
19 #include "enterprise_device_mgr_proxy.h"
20 #ifdef WIFI_EDM_ENABLE
21 #include "edm_constants.h"
22 #include "func_code.h"
23 #include "wifi_id.h"
24 #include "wifi_msg.h"
25 #include "wifi_password.h"
26 #endif
27 
28 namespace OHOS {
29 namespace EDM {
30 class WifiManagerProxy {
31 public:
32     WifiManagerProxy();
33     ~WifiManagerProxy();
34     static std::shared_ptr<WifiManagerProxy> GetWifiManagerProxy();
35     int32_t IsWifiActive(MessageParcel &data, bool &result);
36 #ifdef WIFI_EDM_ENABLE
37     int32_t SetWifiProfile(MessageParcel &data);
38     int32_t GetWifiList(MessageParcel &data, std::vector<WifiId> &result, EdmInterfaceCode policyCode);
39     int32_t AddOrRemoveWifiList(MessageParcel &data, FuncOperateType operateType, EdmInterfaceCode code);
40 #endif
41     int32_t SetWifiDisabled(MessageParcel &data);
42     int32_t IsWifiDisabled(MessageParcel &data, bool &result);
43     int32_t TurnOnWifi(MessageParcel &data);
44     int32_t TurnOffWifi(MessageParcel &data);
45 private:
46     static std::shared_ptr<WifiManagerProxy> instance_;
47     static std::once_flag flag_;
48 };
49 } // namespace EDM
50 } // namespace OHOS
51 
52 #endif // INTERFACES_INNER_API_WIFI_MANAGER_INCLUDE_WIFI_MANAGER_PROXY_H
53