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