• 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 "module_external/bms_adapter.h"
17 
18 #include <gmock/gmock.h>
19 #include <gtest/gtest.h>
20 #include <refbase.h>
21 
22 #include "b_json/b_json_entity_extension_config.h"
23 #include "bundle_mgr_client.h"
24 #include "module_external/inner_receiver_impl.h"
25 #include "module_ipc/service.h"
26 #include "module_ipc/svc_session_manager.h"
27 #include "module_sched/sched_scheduler.h"
28 
29 namespace OHOS::FileManagement::Backup {
30 using namespace std;
31 
GetBundleInfos(int32_t userId)32 vector<BJsonEntityCaps::BundleInfo> BundleMgrAdapter::GetBundleInfos(int32_t userId)
33 {
34     vector<BJsonEntityCaps::BundleInfo> bundleInfos;
35     bundleInfos.emplace_back(
36         BJsonEntityCaps::BundleInfo {"com.example.app2backup", {}, {}, 0, true, "com.example.app2backup"});
37     return bundleInfos;
38 }
39 
GetBundleInfos(const vector<string> & bundleNames,int32_t userId)40 vector<BJsonEntityCaps::BundleInfo> BundleMgrAdapter::GetBundleInfos(const vector<string> &bundleNames, int32_t userId)
41 {
42     vector<BJsonEntityCaps::BundleInfo> bundleInfos;
43     bundleInfos.emplace_back(
44         BJsonEntityCaps::BundleInfo {"com.example.app2backup", {}, {}, 0, true, "com.example.app2backup"});
45     return bundleInfos;
46 }
47 
Install(wptr<InnerReceiverImpl> statusReceiver,const string & bundleFilePath,int32_t userId)48 ErrCode BundleMgrAdapter::Install(wptr<InnerReceiverImpl> statusReceiver, const string &bundleFilePath, int32_t userId)
49 {
50     return 0;
51 }
52 } // namespace OHOS::FileManagement::Backup
53