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 16import { Dependency } from './HapModuleInfo'; 17import bundleManager from '../@ohos.bundle.bundleManager'; 18 19/** 20 * Provides information about a shared bundle. 21 * 22 * @typedef SharedBundleInfo 23 * @syscap SystemCapability.BundleManager.BundleFramework.Core 24 * @systemapi 25 * @since 10 26 */ 27export interface SharedBundleInfo { 28 /** 29 * Indicates the name of the shared bundle 30 * 31 * @type { string } 32 * @syscap SystemCapability.BundleManager.BundleFramework.Core 33 * @systemapi 34 * @since 10 35 */ 36 readonly name: string; 37 38 /** 39 * Enumerates types of the compatible policy of the shared bundle 40 * 41 * @type { bundleManager.CompatiblePolicy } 42 * @syscap SystemCapability.BundleManager.BundleFramework.Core 43 * @systemapi 44 * @since 10 45 */ 46 readonly compatiblePolicy: bundleManager.CompatiblePolicy; 47 48 /** 49 * Obtains configuration information about a shared module 50 * 51 * @type { Array<SharedModuleInfo> } 52 * @syscap SystemCapability.BundleManager.BundleFramework.Core 53 * @systemapi 54 * @since 10 55 */ 56 readonly sharedModuleInfo: Array<SharedModuleInfo>; 57} 58 59/** 60 * Indicates the shared module info. 61 * 62 * @typedef SharedModuleInfo 63 * @syscap SystemCapability.BundleManager.BundleFramework.Core 64 * @systemapi 65 * @since 10 66 */ 67export interface SharedModuleInfo { 68 /** 69 * Indicates the moduleName of the shared bundle 70 * 71 * @type { string } 72 * @syscap SystemCapability.BundleManager.BundleFramework.Core 73 * @systemapi 74 * @since 10 75 */ 76 readonly name: string; 77 78 /** 79 * Indicates the version code of the shared module 80 * 81 * @type { number } 82 * @syscap SystemCapability.BundleManager.BundleFramework.Core 83 * @systemapi 84 * @since 10 85 */ 86 readonly versionCode: number; 87 88 /** 89 * Indicates the version name of the shared module 90 * 91 * @type { string } 92 * @syscap SystemCapability.BundleManager.BundleFramework.Core 93 * @systemapi 94 * @since 10 95 */ 96 readonly versionName: string; 97 98 /** 99 * Describes the shared module 100 * 101 * @type { string } 102 * @syscap SystemCapability.BundleManager.BundleFramework.Core 103 * @systemapi 104 * @since 10 105 */ 106 readonly description: string; 107 108 /** 109 * Indicates the description of this shared module 110 * 111 * @type { number } 112 * @syscap SystemCapability.BundleManager.BundleFramework.Core 113 * @systemapi 114 * @since 10 115 */ 116 readonly descriptionId: number; 117} 118