• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 #include "dupdate_net_manager.h"
17 
18 #include <thread>
19 #include <unistd.h>
20 
21 #include "update_define.h"
22 #include "update_log.h"
23 
24 namespace OHOS {
25 namespace UpdateEngine {
NetManager()26 NetManager::NetManager()
27 {
28     ENGINE_LOGI("NetManager NetManager");
29 }
30 
~NetManager()31 NetManager::~NetManager() {}
32 
Init()33 void NetManager::Init()
34 {
35     ENGINE_LOGI("NetManager init");
36 }
37 
RegisterCallback(NetChangeCallbackType callbackType,const std::set<NetType> & netTypes,NetObserverCallback cb)38 bool NetManager::RegisterCallback(
39     NetChangeCallbackType callbackType, const std::set<NetType> &netTypes, NetObserverCallback cb)
40 {
41     ENGINE_LOGI("NetManager RegisterCallback");
42     return true;
43 }
44 
UnregisterCallback(NetChangeCallbackType callbackType)45 void NetManager::UnregisterCallback(NetChangeCallbackType callbackType)
46 {
47     ENGINE_LOGI("NetManager UnregisterCallback");
48 }
49 
GetNetType()50 NetType NetManager::GetNetType()
51 {
52     return netType_;
53 }
54 
IsNetAvailable(NetType netType)55 bool NetManager::IsNetAvailable(NetType netType)
56 {
57     return true;
58 }
59 
OnNetChange(NetType netType)60 bool NetManager::OnNetChange(NetType netType)
61 {
62     ENGINE_LOGI("NetManager OnNetChange");
63     return true;
64 }
65 
IsBaseNetType(NetType netType)66 bool NetManager::IsBaseNetType(NetType netType)
67 {
68     return true;
69 }
70 } // namespace UpdateEngine
71 } // namespace OHOS