• 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 "sync_rule/network_status.h"
17 #include "dfs_error.h"
18 
19 namespace OHOS::FileManagement::CloudSync {
20 
RegisterNetConnCallback(std::shared_ptr<DataSyncManager> dataSyncManager)21 int32_t NetworkStatus::RegisterNetConnCallback(std::shared_ptr<DataSyncManager> dataSyncManager)
22 {
23     return E_OK;
24 }
25 
GetDefaultNet()26 int32_t NetworkStatus::GetDefaultNet()
27 {
28     return E_OK;
29 }
30 
SetNetConnStatus(NetManagerStandard::NetAllCapabilities & netAllCap)31 void NetworkStatus::SetNetConnStatus(NetManagerStandard::NetAllCapabilities &netAllCap)
32 {
33 }
34 
GetAndRegisterNetwork(std::shared_ptr<DataSyncManager> dataSyncManager)35 int32_t NetworkStatus::GetAndRegisterNetwork(std::shared_ptr<DataSyncManager> dataSyncManager)
36 {
37     int32_t res = GetDefaultNet();
38     if (res != E_OK) {
39         return res;
40     }
41 
42     return RegisterNetConnCallback(dataSyncManager);
43 }
44 
InitNetwork(std::shared_ptr<DataSyncManager> dataSyncManager)45 void NetworkStatus::InitNetwork(std::shared_ptr<DataSyncManager> dataSyncManager)
46 {
47 }
48 
SetNetConnStatus(NetworkStatus::NetConnStatus netStatus)49 void NetworkStatus::SetNetConnStatus(NetworkStatus::NetConnStatus netStatus)
50 {
51     return;
52 }
53 
GetNetConnStatus()54 NetworkStatus::NetConnStatus NetworkStatus::GetNetConnStatus()
55 {
56     return NetworkStatus::NetConnStatus::WIFI_CONNECT;
57 }
58 } // namespace OHOS::FileManagement::CloudSync