• 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 "sms_adapter_mock.h"
17 
18 namespace OHOS::FileManagement::Backup {
19 using namespace std;
20 
GetBundleStats(const string & bundleName)21 StorageManager::BundleStats StorageMgrAdapter::GetBundleStats(const string &bundleName)
22 {
23     return BStorageMgrAdapter::sms->GetBundleStats(bundleName);
24 }
25 
GetUserStorageStats(const std::string & bundleName,int32_t userId)26 int64_t StorageMgrAdapter::GetUserStorageStats(const std::string &bundleName, int32_t userId)
27 {
28     return BStorageMgrAdapter::sms->GetUserStorageStats(bundleName, userId);
29 }
30 
UpdateMemPara(int32_t size)31 int32_t StorageMgrAdapter::UpdateMemPara(int32_t size)
32 {
33     return BStorageMgrAdapter::sms->UpdateMemPara(size);
34 }
35 
GetBundleStatsForIncrease(uint32_t userId,const std::vector<std::string> & bundleNames,const std::vector<int64_t> & incrementalBackTimes,std::vector<int64_t> & pkgFileSizes,std::vector<int64_t> & incPkgFileSizes)36 int32_t StorageMgrAdapter::GetBundleStatsForIncrease(uint32_t userId, const std::vector<std::string> &bundleNames,
37     const std::vector<int64_t> &incrementalBackTimes, std::vector<int64_t> &pkgFileSizes,
38     std::vector<int64_t> &incPkgFileSizes)
39 {
40     return BStorageMgrAdapter::sms->GetBundleStatsForIncrease(userId, bundleNames, incrementalBackTimes, pkgFileSizes,
41         incPkgFileSizes);
42 }
43 } // namespace OHOS::FileManagement::Backup