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_ipc/service.h"
25 #include "module_ipc/svc_session_manager.h"
26 #include "module_sched/sched_scheduler.h"
27
28 namespace OHOS::FileManagement::Backup {
29 using namespace std;
30
GetBundleInfos(int32_t userId)31 vector<BJsonEntityCaps::BundleInfo> BundleMgrAdapter::GetBundleInfos(int32_t userId)
32 {
33 vector<BJsonEntityCaps::BundleInfo> bundleInfos;
34 bundleInfos.emplace_back(
35 BJsonEntityCaps::BundleInfo {"com.example.app2backup", {}, {}, 0, true, "com.example.app2backup"});
36 return bundleInfos;
37 }
38
GetBundleInfos(const vector<string> & bundleNames,int32_t userId)39 vector<BJsonEntityCaps::BundleInfo> BundleMgrAdapter::GetBundleInfos(const vector<string> &bundleNames, int32_t userId)
40 {
41 vector<BJsonEntityCaps::BundleInfo> bundleInfos;
42 bundleInfos.emplace_back(
43 BJsonEntityCaps::BundleInfo {"com.example.app2backup", {}, {}, 0, true, "com.example.app2backup"});
44 return bundleInfos;
45 }
46
GetAppGalleryBundleName()47 string BundleMgrAdapter::GetAppGalleryBundleName()
48 {
49 return "";
50 }
51 } // namespace OHOS::FileManagement::Backup
52