• 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/**
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   * @readonly
38   * @syscap SystemCapability.BundleManager.BundleFramework.Core
39   * @systemapi
40   * @since 10
41   */
42  readonly name: string;
43
44  /**
45   * Enumerates types of the compatible policy of the shared bundle
46   *
47   * @type { bundleManager.CompatiblePolicy }
48   * @readonly
49   * @syscap SystemCapability.BundleManager.BundleFramework.Core
50   * @systemapi
51   * @since 10
52   */
53  readonly compatiblePolicy: bundleManager.CompatiblePolicy;
54
55  /**
56   * Obtains configuration information about a shared module
57   *
58   * @type { Array<SharedModuleInfo> }
59   * @readonly
60   * @syscap SystemCapability.BundleManager.BundleFramework.Core
61   * @systemapi
62   * @since 10
63   */
64  readonly sharedModuleInfo: Array<SharedModuleInfo>;
65}
66
67/**
68 * Indicates the shared module info.
69 *
70 * @typedef SharedModuleInfo
71 * @syscap SystemCapability.BundleManager.BundleFramework.Core
72 * @systemapi
73 * @since 10
74 */
75export interface SharedModuleInfo {
76  /**
77   * Indicates the moduleName of the shared bundle
78   *
79   * @type { string }
80   * @readonly
81   * @syscap SystemCapability.BundleManager.BundleFramework.Core
82   * @systemapi
83   * @since 10
84   */
85  readonly name: string;
86
87  /**
88   * Indicates the version code of the shared module
89   *
90   * @type { number }
91   * @readonly
92   * @syscap SystemCapability.BundleManager.BundleFramework.Core
93   * @systemapi
94   * @since 10
95   */
96  readonly versionCode: number;
97
98  /**
99   * Indicates the version name of the shared module
100   *
101   * @type { string }
102   * @readonly
103   * @syscap SystemCapability.BundleManager.BundleFramework.Core
104   * @systemapi
105   * @since 10
106   */
107  readonly versionName: string;
108
109  /**
110   * Describes the shared module
111   *
112   * @type { string }
113   * @readonly
114   * @syscap SystemCapability.BundleManager.BundleFramework.Core
115   * @systemapi
116   * @since 10
117   */
118  readonly description: string;
119
120  /**
121   * Indicates the description of this shared module
122   *
123   * @type { number }
124   * @readonly
125   * @syscap SystemCapability.BundleManager.BundleFramework.Core
126   * @systemapi
127   * @since 10
128   */
129  readonly descriptionId: number;
130}
131