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