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 "cycle_task.h"
17 #include "dfs_error.h"
18 #include "gallery_data_syncer.h"
19 #include "utils_log.h"
20
21 namespace OHOS {
22 namespace FileManagement {
23 namespace CloudSync {
CycleTask(std::string taskName,std::string bundleName,int32_t intervalTime,std::shared_ptr<DataSyncManager> dataSyncManager)24 CycleTask::CycleTask(std::string taskName, std::string bundleName, int32_t intervalTime,
25 std::shared_ptr<DataSyncManager> dataSyncManager)
26 : taskName_(taskName), bundleName_(bundleName), intervalTime_(intervalTime), dataSyncManager_(dataSyncManager)
27 {
28 }
29
GetTaskName() const30 std::string CycleTask::GetTaskName() const
31 {
32 return this->taskName_;
33 }
34
GetBundleName() const35 std::string CycleTask::GetBundleName() const
36 {
37 return this->bundleName_;
38 }
39
GetIntervalTime() const40 int32_t CycleTask::GetIntervalTime() const
41 {
42 return this->intervalTime_;
43 }
44
GetDataSyncManager() const45 std::shared_ptr<DataSyncManager> CycleTask::GetDataSyncManager() const
46 {
47 return this->dataSyncManager_;
48 }
49
50 } // namespace CloudSync
51 } // namespace FileManagement
52 } // namespace OHOS