• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 #include "data_sync_manager.h"
17 #include "dfs_error.h"
18 
19 namespace OHOS::FileManagement::CloudFile {
20 using namespace std;
21 
TriggerStartSync(const std::string & bundleName,const int32_t userId,bool forceFlag,SyncTriggerType triggerType,std::string prepareTraceId)22 int32_t DataSyncManager::TriggerStartSync(const std::string &bundleName,
23                                           const int32_t userId,
24                                           bool forceFlag,
25                                           SyncTriggerType triggerType,
26                                           std::string prepareTraceId)
27 {
28     return E_OK;
29 }
30 
TriggerStopSync(const std::string & bundleName,const int32_t userId,bool forceFlag,SyncTriggerType triggerType)31 int32_t DataSyncManager::TriggerStopSync(const std::string &bundleName,
32                                          const int32_t userId,
33                                          bool forceFlag,
34                                          SyncTriggerType triggerType)
35 {
36     return E_OK;
37 }
38 
TriggerRecoverySync(SyncTriggerType triggerType)39 int32_t DataSyncManager::TriggerRecoverySync(SyncTriggerType triggerType)
40 {
41     return E_OK;
42 }
43 
ResetCursor(const std::string & bundleName,const int32_t & userId)44 int32_t DataSyncManager::ResetCursor(const std::string &bundleName, const int32_t &userId)
45 {
46     return E_OK;
47 }
48 
RegisterCloudSyncCallback(const std::string & bundleName,const std::string & callerBundleName,const int32_t userId,const sptr<CloudSync::ICloudSyncCallback> & callback)49 void DataSyncManager::RegisterCloudSyncCallback(const std::string &bundleName,
50                                                 const std::string &callerBundleName,
51                                                 const int32_t userId,
52                                                 const sptr<CloudSync::ICloudSyncCallback> &callback)
53 {
54     return;
55 }
56 
UnRegisterCloudSyncCallback(const std::string & bundleName,const std::string & callerBundleName)57 void DataSyncManager::UnRegisterCloudSyncCallback(const std::string &bundleName,
58                                                   const std::string &callerBundleName)
59 {
60     return;
61 }
62 
IsSkipSync(const std::string & bundleName,const int32_t userId,bool forceFlag)63 int32_t DataSyncManager::IsSkipSync(const std::string &bundleName, const int32_t userId, bool forceFlag)
64 {
65     return E_OK;
66 }
67 
StartDownloadFile(const BundleNameUserInfo & bundleNameUserInfo,const std::vector<std::string> pathVec,int64_t & downloadId)68 int32_t DataSyncManager::StartDownloadFile(const BundleNameUserInfo &bundleNameUserInfo,
69                                            const std::vector<std::string> pathVec,
70                                            int64_t &downloadId)
71 {
72     return E_OK;
73 }
74 
StopDownloadFile(const BundleNameUserInfo & bundleNameUserInfo,const std::string path,bool needClean)75 int32_t DataSyncManager::StopDownloadFile(const BundleNameUserInfo &bundleNameUserInfo,
76                                           const std::string path,
77                                           bool needClean)
78 {
79     return E_OK;
80 }
81 
StopFileCache(const BundleNameUserInfo & bundleNameUserInfo,const int64_t & downloadId,bool needClean)82 int32_t DataSyncManager::StopFileCache(const BundleNameUserInfo &bundleNameUserInfo,
83                                        const int64_t &downloadId,
84                                        bool needClean)
85 {
86     return E_OK;
87 }
88 
RegisterDownloadFileCallback(const BundleNameUserInfo & bundleNameUserInfo,const sptr<CloudSync::ICloudDownloadCallback> & downloadCallback)89 int32_t DataSyncManager::RegisterDownloadFileCallback(const BundleNameUserInfo &bundleNameUserInfo,
90                                                       const sptr<CloudSync::ICloudDownloadCallback> &downloadCallback)
91 {
92     return E_OK;
93 }
94 
UnregisterDownloadFileCallback(const BundleNameUserInfo & bundleNameUserInfo)95 int32_t DataSyncManager::UnregisterDownloadFileCallback(const BundleNameUserInfo &bundleNameUserInfo)
96 {
97     return E_OK;
98 }
99 
CleanCloudFile(const int32_t userId,const std::string & bundleName,const int action)100 int32_t DataSyncManager::CleanCloudFile(const int32_t userId, const std::string &bundleName, const int action)
101 {
102     return E_OK;
103 }
104 
CleanRemainFile(const std::string & bundleName,const int32_t userId)105 int32_t DataSyncManager::CleanRemainFile(const std::string &bundleName, const int32_t userId)
106 {
107     return E_OK;
108 }
109 
OptimizeStorage(const std::string & bundleName,const int32_t userId,const int32_t agingDays)110 int32_t DataSyncManager::OptimizeStorage(const std::string &bundleName, const int32_t userId, const int32_t agingDays)
111 {
112     return E_OK;
113 }
114 
DownloadThumb()115 int32_t DataSyncManager::DownloadThumb()
116 {
117     return E_OK;
118 }
119 
CacheVideo()120 int32_t DataSyncManager::CacheVideo()
121 {
122     return E_OK;
123 }
124 
CleanVideoCache()125 int32_t DataSyncManager::CleanVideoCache()
126 {
127     return E_OK;
128 }
129 
CleanCache(const std::string & bundleName,const int32_t userId,const std::string & uri)130 int32_t DataSyncManager::CleanCache(const std::string &bundleName, const int32_t userId, const std::string &uri)
131 {
132     return E_OK;
133 }
134 
DisableCloud(const int32_t userId)135 int32_t DataSyncManager::DisableCloud(const int32_t userId)
136 {
137     return E_OK;
138 }
139 
GetUserId(int32_t & userId)140 int32_t DataSyncManager::GetUserId(int32_t &userId)
141 {
142     return E_OK;
143 }
144 
SaveSubscription(const std::string & bundleName,const int32_t userId)145 int32_t DataSyncManager::SaveSubscription(const std::string &bundleName, const int32_t userId)
146 {
147     return E_OK;
148 }
149 
ReportEntry(const std::string & bundleName,const int32_t userId)150 int32_t DataSyncManager::ReportEntry(const std::string &bundleName, const int32_t userId)
151 {
152     return E_OK;
153 }
154 
155 } // namespace OHOS::FileManagement::CloudFile