• 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 "dk_assets_downloader.h"
17 #include "dk_database.h"
18 
19 namespace DriveKit {
DownLoadAssets(std::shared_ptr<DKContext> context,std::vector<DKDownloadAsset> & assetsToDownload,DKAssetPath downLoadPath,DKDownloadId & id,std::function<void (std::shared_ptr<DKContext>,std::shared_ptr<const DKDatabase>,const std::map<DKDownloadAsset,DKDownloadResult> &,const DKError &)> resultCallback,std::function<void (std::shared_ptr<DKContext>,DKDownloadAsset,TotalSize,DownloadSize)> progressCallback,bool isPriority)20 DKLocalErrorCode DKAssetsDownloader::DownLoadAssets(
21     std::shared_ptr<DKContext> context,
22     std::vector<DKDownloadAsset> &assetsToDownload,
23     DKAssetPath downLoadPath,
24     DKDownloadId &id,
25     std::function<void(std::shared_ptr<DKContext>,
26                        std::shared_ptr<const DKDatabase>,
27                        const std::map<DKDownloadAsset, DKDownloadResult> &,
28                        const DKError &)> resultCallback,
29     std::function<void(std::shared_ptr<DKContext>, DKDownloadAsset, TotalSize, DownloadSize)> progressCallback,
30     bool isPriority)
31 {
32     return DKLocalErrorCode::NO_ERROR;
33 }
34 
DownLoadAssets(DKDownloadAsset & assetsToDownload)35 DKLocalErrorCode DKAssetsDownloader::DownLoadAssets(DKDownloadAsset &assetsToDownload)
36 {
37     return DKLocalErrorCode::NO_ERROR;
38 }
39 
CancelDownloadAssets(DKDownloadId id,bool isClearCache)40 DKLocalErrorCode DKAssetsDownloader::CancelDownloadAssets(DKDownloadId id, bool isClearCache)
41 {
42     return DKLocalErrorCode::NO_ERROR;
43 }
44 } // namespace DriveKit
45