• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16import { AbilityInfo } from './abilityInfo';
17import { ApplicationInfo } from './applicationInfo';
18import { HapModuleInfo } from './hapModuleInfo';
19
20/**
21 * The scene which is used
22 *
23 * @typedef UsedScene
24 * @syscap SystemCapability.BundleManager.BundleFramework
25 * @since 7
26 * @deprecated since 9
27 * @useinstead ohos.bundle.bundleManager.UsedScene
28 */
29export interface UsedScene {
30  /**
31   * @default Indicates the abilities that need the permission
32   * @syscap SystemCapability.BundleManager.BundleFramework
33   * @since 7
34   * @deprecated since 9
35   */
36  abilities: Array<string>;
37
38  /**
39   * @default Indicates the time when the permission is used
40   * @syscap SystemCapability.BundleManager.BundleFramework
41   * @since 7
42   * @deprecated since 9
43   */
44  when: string;
45}
46
47/**
48 * Indicates the required permissions details defined in file config.json
49 *
50 * @typedef ReqPermissionDetail
51 * @syscap SystemCapability.BundleManager.BundleFramework
52 * @since 7
53 * @deprecated since 9
54 * @useinstead ohos.bundle.bundleManager.ReqPermissionDetail
55 */
56export interface ReqPermissionDetail {
57  /**
58   * @default Indicates the name of this required permissions
59   * @syscap SystemCapability.BundleManager.BundleFramework
60   * @since 7
61   * @deprecated since 9
62   */
63  name: string;
64
65  /**
66   * @default Indicates the reason of this required permissions
67   * @syscap SystemCapability.BundleManager.BundleFramework
68   * @since 7
69   * @deprecated since 9
70   */
71  reason: string;
72
73  /**
74   * @default Indicates the used scene of this required permissions
75   * @syscap SystemCapability.BundleManager.BundleFramework
76   * @since 7
77   * @deprecated since 9
78   */
79  usedScene: UsedScene;
80}
81
82/**
83 * Obtains configuration information about a bundle
84 *
85 * @typedef BundleInfo
86 * @syscap SystemCapability.BundleManager.BundleFramework
87 * @since 7
88 * @deprecated since 9
89 * @useinstead ohos.bundle.bundleManager.BundleInfo
90 */
91export interface BundleInfo {
92  /**
93   * @default Indicates the name of this bundle
94   * @syscap SystemCapability.BundleManager.BundleFramework
95   * @since 7
96   * @deprecated since 9
97   */
98  readonly name: string;
99
100  /**
101   * @default Indicates the name of this original bundle
102   * @syscap SystemCapability.BundleManager.BundleFramework
103   * @since 7
104   * @deprecated since 9
105   */
106  readonly type: string;
107
108  /**
109   * @default Indicates the ID of the application to which this bundle belongs
110   * The application ID uniquely identifies an application. It is determined by the bundle name and signature
111   * @syscap SystemCapability.BundleManager.BundleFramework
112   * @since 7
113   * @deprecated since 9
114   */
115  readonly appId: string;
116
117  /**
118   * @default Indicates the UID of the application to which this bundle belongs
119   * The UID uniquely identifies an application. It is determined by the process and user IDs of the application
120   * After an application is installed, its UID remains unchanged unless it is uninstalled and then reinstalled
121   * @syscap SystemCapability.BundleManager.BundleFramework
122   * @since 7
123   * @deprecated since 9
124   */
125  readonly uid: number;
126
127  /**
128   * @default Indicates the hap install time
129   * @syscap SystemCapability.BundleManager.BundleFramework
130   * @since 7
131   * @deprecated since 9
132   */
133  readonly installTime: number;
134
135  /**
136   * @default Indicates the hap update time
137   * @syscap SystemCapability.BundleManager.BundleFramework
138   * @since 7
139   * @deprecated since 9
140   */
141  readonly updateTime: number;
142
143  /**
144   * @default Obtains configuration information about an application
145   * @syscap SystemCapability.BundleManager.BundleFramework
146   * @since 7
147   * @deprecated since 9
148   */
149  readonly appInfo: ApplicationInfo;
150
151  /**
152   * @default Obtains configuration information about an ability
153   * @syscap SystemCapability.BundleManager.BundleFramework
154   * @since 7
155   * @deprecated since 9
156   */
157  readonly abilityInfos: Array<AbilityInfo>;
158
159  /**
160   * @default Indicates the required permissions name defined in file config.json
161   * @syscap SystemCapability.BundleManager.BundleFramework
162   * @since 7
163   * @deprecated since 9
164   */
165  readonly reqPermissions: Array<string>;
166
167  /**
168   * @default Indicates the required permissions details defined in file config.json
169   * @syscap SystemCapability.BundleManager.BundleFramework
170   * @since 7
171   * @deprecated since 9
172   */
173  readonly reqPermissionDetails: Array<ReqPermissionDetail>;
174
175  /**
176   * @default Describes the bundle vendor
177   * @syscap SystemCapability.BundleManager.BundleFramework
178   * @since 7
179   * @deprecated since 9
180   */
181  readonly vendor: string;
182
183  /**
184   * @default Indicates the version number of the bundle
185   * @syscap SystemCapability.BundleManager.BundleFramework
186   * @since 7
187   * @deprecated since 9
188   */
189  readonly versionCode: number;
190
191  /**
192   * @default Indicates the text description of the bundle version
193   * @syscap SystemCapability.BundleManager.BundleFramework
194   * @since 7
195   * @deprecated since 9
196   */
197  readonly versionName: string;
198
199  /**
200   * @default Indicates the compatible version number of the bundle
201   * @syscap SystemCapability.BundleManager.BundleFramework
202   * @since 7
203   * @deprecated since 9
204   */
205  readonly compatibleVersion: number;
206
207  /**
208   * @default Indicates the target version number of the bundle
209   * @syscap SystemCapability.BundleManager.BundleFramework
210   * @since 7
211   * @deprecated since 9
212   */
213  readonly targetVersion: number;
214
215  /**
216   * @default Indicates is compress native libs
217   * @syscap SystemCapability.BundleManager.BundleFramework
218   * @since 7
219   * @deprecated since 9
220   */
221  readonly isCompressNativeLibs: boolean;
222
223  /**
224   * @default Obtains configuration information about a module
225   * @syscap SystemCapability.BundleManager.BundleFramework
226   * @since 7
227   * @deprecated since 9
228   */
229  readonly hapModuleInfos: Array<HapModuleInfo>;
230
231  /**
232   * @default Indicates entry module name
233   * @syscap SystemCapability.BundleManager.BundleFramework
234   * @since 7
235   * @deprecated since 9
236   */
237  readonly entryModuleName: string;
238
239  /**
240   * @default Indicates the cpuAbi information of this bundle.
241   * @syscap SystemCapability.BundleManager.BundleFramework
242   * @since 7
243   * @deprecated since 9
244   */
245  readonly cpuAbi: string;
246
247  /**
248   * @default Indicates is silent installation
249   * @syscap SystemCapability.BundleManager.BundleFramework
250   * @since 7
251   * @deprecated since 9
252   */
253  readonly isSilentInstallation: string;
254
255  /**
256   * @default Indicates the earliest historical version compatible with the bundle
257   * @syscap SystemCapability.BundleManager.BundleFramework
258   * @since 7
259   * @deprecated since 9
260   */
261  readonly minCompatibleVersionCode: number;
262
263  /**
264   * @default Indicates whether free installation of the entry is supported
265   * @syscap SystemCapability.BundleManager.BundleFramework
266   * @since 7
267   * @deprecated since 9
268   */
269  readonly entryInstallationFree: boolean;
270
271  /**
272   * @default Indicates the grant status of required permissions
273   * @syscap SystemCapability.BundleManager.BundleFramework
274   * @since 8
275   * @deprecated since 9
276   */
277  readonly reqPermissionStates: Array<number>;
278}
279