• 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 
StopUploadTask(const std::string & bundleName,const int32_t userId)39 int32_t DataSyncManager::StopUploadTask(const std::string &bundleName, const int32_t userId)
40 {
41     return E_OK;
42 }
43 
TriggerRecoverySync(SyncTriggerType triggerType)44 int32_t DataSyncManager::TriggerRecoverySync(SyncTriggerType triggerType)
45 {
46     return E_OK;
47 }
48 
ResetCursor(const std::string & bundleName,const int32_t & userId)49 int32_t DataSyncManager::ResetCursor(const std::string &bundleName, const int32_t &userId)
50 {
51     return E_OK;
52 }
53 
RegisterCloudSyncCallback(const std::string & bundleName,const std::string & callerBundleName,const int32_t userId,const sptr<CloudSync::ICloudSyncCallback> & callback)54 void DataSyncManager::RegisterCloudSyncCallback(const std::string &bundleName,
55                                                 const std::string &callerBundleName,
56                                                 const int32_t userId,
57                                                 const sptr<CloudSync::ICloudSyncCallback> &callback)
58 {
59     return;
60 }
61 
UnRegisterCloudSyncCallback(const std::string & bundleName,const std::string & callerBundleName)62 void DataSyncManager::UnRegisterCloudSyncCallback(const std::string &bundleName,
63                                                   const std::string &callerBundleName)
64 {
65     return;
66 }
67 
IsSkipSync(const std::string & bundleName,const int32_t userId,bool forceFlag)68 int32_t DataSyncManager::IsSkipSync(const std::string &bundleName, const int32_t userId, bool forceFlag)
69 {
70     return E_OK;
71 }
72 
StartDownloadFile(const BundleNameUserInfo & bundleNameUserInfo,const std::vector<std::string> pathVec,int64_t & downloadId,const sptr<CloudSync::ICloudDownloadCallback> & downloadCallback)73 int32_t DataSyncManager::StartDownloadFile(const BundleNameUserInfo &bundleNameUserInfo,
74                                            const std::vector<std::string> pathVec,
75                                            int64_t &downloadId,
76                                            const sptr<CloudSync::ICloudDownloadCallback> &downloadCallback)
77 {
78     return E_OK;
79 }
80 
StopDownloadFile(const BundleNameUserInfo & bundleNameUserInfo,const std::string path,bool needClean)81 int32_t DataSyncManager::StopDownloadFile(const BundleNameUserInfo &bundleNameUserInfo,
82                                           const std::string path,
83                                           bool needClean)
84 {
85     return E_OK;
86 }
87 
StopFileCache(const BundleNameUserInfo & bundleNameUserInfo,const int64_t & downloadId,bool needClean)88 int32_t DataSyncManager::StopFileCache(const BundleNameUserInfo &bundleNameUserInfo,
89                                        const int64_t &downloadId,
90                                        bool needClean)
91 {
92     return E_OK;
93 }
94 
RegisterDownloadFileCallback(const BundleNameUserInfo & bundleNameUserInfo,const sptr<CloudSync::ICloudDownloadCallback> & downloadCallback)95 int32_t DataSyncManager::RegisterDownloadFileCallback(const BundleNameUserInfo &bundleNameUserInfo,
96                                                       const sptr<CloudSync::ICloudDownloadCallback> &downloadCallback)
97 {
98     return E_OK;
99 }
100 
UnregisterDownloadFileCallback(const BundleNameUserInfo & bundleNameUserInfo)101 int32_t DataSyncManager::UnregisterDownloadFileCallback(const BundleNameUserInfo &bundleNameUserInfo)
102 {
103     return E_OK;
104 }
105 
CleanCloudFile(const int32_t userId,const std::string & bundleName,const int action)106 int32_t DataSyncManager::CleanCloudFile(const int32_t userId, const std::string &bundleName, const int action)
107 {
108     return E_OK;
109 }
110 
CleanRemainFile(const std::string & bundleName,const int32_t userId)111 int32_t DataSyncManager::CleanRemainFile(const std::string &bundleName, const int32_t userId)
112 {
113     return E_OK;
114 }
115 
OptimizeStorage(const std::string & bundleName,const int32_t userId,const int32_t agingDays)116 int32_t DataSyncManager::OptimizeStorage(const std::string &bundleName, const int32_t userId, const int32_t agingDays)
117 {
118     return E_OK;
119 }
120 
DownloadThumb()121 int32_t DataSyncManager::DownloadThumb()
122 {
123     return E_OK;
124 }
125 
TriggerDownloadThumb()126 int32_t DataSyncManager::TriggerDownloadThumb()
127 {
128     return E_OK;
129 }
130 
CacheVideo()131 int32_t DataSyncManager::CacheVideo()
132 {
133     return E_OK;
134 }
135 
CleanVideoCache()136 int32_t DataSyncManager::CleanVideoCache()
137 {
138     return E_OK;
139 }
140 
CleanCache(const std::string & bundleName,const int32_t userId,const std::string & uri)141 int32_t DataSyncManager::CleanCache(const std::string &bundleName, const int32_t userId, const std::string &uri)
142 {
143     return E_OK;
144 }
145 
BatchDentryFileInsert(const std::vector<CloudSync::DentryFileInfo> & fileInfo,std::vector<std::string> & failCloudId)146 int32_t DataSyncManager::BatchDentryFileInsert(const std::vector<CloudSync::DentryFileInfo> &fileInfo,
147     std::vector<std::string> &failCloudId)
148 {
149     return E_OK;
150 }
151 
DisableCloud(const int32_t userId)152 int32_t DataSyncManager::DisableCloud(const int32_t userId)
153 {
154     return E_OK;
155 }
156 
GetUserId(int32_t & userId)157 int32_t DataSyncManager::GetUserId(int32_t &userId)
158 {
159     return E_OK;
160 }
161 
SaveSubscription(const std::string & bundleName,const int32_t userId)162 int32_t DataSyncManager::SaveSubscription(const std::string &bundleName, const int32_t userId)
163 {
164     return E_OK;
165 }
166 
ReportEntry(const std::string & bundleName,const int32_t userId)167 int32_t DataSyncManager::ReportEntry(const std::string &bundleName, const int32_t userId)
168 {
169     return E_OK;
170 }
171 
172 } // namespace OHOS::FileManagement::CloudFile