1 /*
2 * Copyright (c) 2021 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 "bundle_manager_inner.h"
17
18 #include "bundle_install_msg.h"
19 #include "bundlems_slite_client.h"
20
21 extern "C" {
GetInstallState(const char * bundleName,InstallState * installState,uint8_t * installProcess)22 bool GetInstallState(const char *bundleName, InstallState *installState, uint8_t *installProcess)
23 {
24 return OHOS::BundleMsClient::GetInstance().GetInstallState(bundleName, installState, installProcess);
25 }
26
GetBundleSize(const char * bundleName)27 uint32_t GetBundleSize(const char *bundleName)
28 {
29 return OHOS::BundleMsClient::GetInstance().GetBundleSize(bundleName);
30 }
31
RegisterInstallerCallback(InstallerCallback installerCallback)32 bool RegisterInstallerCallback(InstallerCallback installerCallback)
33 {
34 return OHOS::BundleMsClient::GetInstance().RegisterInstallerCallback(installerCallback);
35 }
36
UpdateBundleInfoList(void)37 void UpdateBundleInfoList(void)
38 {
39 OHOS::BundleMsClient::GetInstance().UpdateBundleInfoList();
40 }
41
GetBundleInfosNoReplication(const int flags,BundleInfo ** bundleInfos,int32_t * len)42 uint8_t GetBundleInfosNoReplication(const int flags, BundleInfo **bundleInfos, int32_t *len)
43 {
44 return OHOS::BundleMsClient::GetInstance().GetBundleInfosNoReplication(flags, bundleInfos, len);
45 }
46
InitPreAppInfo(void)47 PreAppList *InitPreAppInfo(void)
48 {
49 return OHOS::BundleMsClient::GetInstance().InitPreAppInfo();
50 }
51
InsertPreAppInfo(const char * filePath,PreAppList * list)52 void InsertPreAppInfo(const char *filePath, PreAppList *list)
53 {
54 OHOS::BundleMsClient::GetInstance().InsertPreAppInfo(filePath, list);
55 }
56
SetPreAppInfo(PreAppList * list)57 void SetPreAppInfo(PreAppList *list)
58 {
59 OHOS::BundleMsClient::GetInstance().SetPreAppInfo(list);
60 }
61 }
62