• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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 { ApplicationInfo } from './ApplicationInfo';
22import { Metadata } from './Metadata';
23import bundleManager from './../@ohos.bundle.bundleManager';
24import { Skill } from './Skill';
25
26/**
27 * Extension information about a bundle
28 *
29 * @typedef ExtensionAbilityInfo
30 * @syscap SystemCapability.BundleManager.BundleFramework.Core
31 * @since 9
32 */
33/**
34 * Extension information about a bundle
35 *
36 * @typedef ExtensionAbilityInfo
37 * @syscap SystemCapability.BundleManager.BundleFramework.Core
38 * @atomicservice
39 * @since arkts {'1.1':'11', '1.2':'20'}
40 * @arkts 1.1&1.2
41 */
42export interface ExtensionAbilityInfo {
43  /**
44   * Indicates the name of the bundle
45   *
46   * @type { string }
47   * @readonly
48   * @syscap SystemCapability.BundleManager.BundleFramework.Core
49   * @since 9
50   */
51  /**
52   * Indicates the name of the bundle
53   *
54   * @type { string }
55   * @readonly
56   * @syscap SystemCapability.BundleManager.BundleFramework.Core
57   * @atomicservice
58   * @since arkts {'1.1':'11', '1.2':'20'}
59   * @arkts 1.1&1.2
60   */
61  readonly bundleName: string;
62
63  /**
64   * Indicates the name of the module
65   *
66   * @type { string }
67   * @readonly
68   * @syscap SystemCapability.BundleManager.BundleFramework.Core
69   * @since 9
70   */
71  /**
72   * Indicates the name of the module
73   *
74   * @type { string }
75   * @readonly
76   * @syscap SystemCapability.BundleManager.BundleFramework.Core
77   * @atomicservice
78   * @since arkts {'1.1':'11', '1.2':'20'}
79   * @arkts 1.1&1.2
80   */
81  readonly moduleName: string;
82
83  /**
84   * Indicates the name of the extension ability info
85   *
86   * @type { string }
87   * @readonly
88   * @syscap SystemCapability.BundleManager.BundleFramework.Core
89   * @since 9
90   */
91  /**
92   * Indicates the name of the extension ability info
93   *
94   * @type { string }
95   * @readonly
96   * @syscap SystemCapability.BundleManager.BundleFramework.Core
97   * @atomicservice
98   * @since arkts {'1.1':'11', '1.2':'20'}
99   * @arkts 1.1&1.2
100   */
101  readonly name: string;
102
103  /**
104   * Indicates the label id of the extension ability info
105   *
106   * @type { number }
107   * @readonly
108   * @syscap SystemCapability.BundleManager.BundleFramework.Core
109   * @since 9
110   */
111  /**
112   * Indicates the label id of the extension ability info
113   *
114   * @type { number }
115   * @readonly
116   * @syscap SystemCapability.BundleManager.BundleFramework.Core
117   * @atomicservice
118   * @since arkts {'1.1':'11', '1.2':'20'}
119   * @arkts 1.1&1.2
120   */
121  readonly labelId: number;
122
123  /**
124   * Indicates the description id of the extension ability info
125   *
126   * @type { number }
127   * @readonly
128   * @syscap SystemCapability.BundleManager.BundleFramework.Core
129   * @since 9
130   */
131  /**
132   * Indicates the description id of the extension ability info
133   *
134   * @type { number }
135   * @readonly
136   * @syscap SystemCapability.BundleManager.BundleFramework.Core
137   * @atomicservice
138   * @since arkts {'1.1':'11', '1.2':'20'}
139   * @arkts 1.1&1.2
140   */
141  readonly descriptionId: number;
142
143  /**
144   * Indicates the icon id of the extension ability info
145   *
146   * @type { number }
147   * @readonly
148   * @syscap SystemCapability.BundleManager.BundleFramework.Core
149   * @since 9
150   */
151  /**
152   * Indicates the icon id of the extension ability info
153   *
154   * @type { number }
155   * @readonly
156   * @syscap SystemCapability.BundleManager.BundleFramework.Core
157   * @atomicservice
158   * @since arkts {'1.1':'11', '1.2':'20'}
159   * @arkts 1.1&1.2
160   */
161  readonly iconId: number;
162
163  /**
164   * Indicates whether this ability can be called by other abilities
165   *
166   * @type { boolean }
167   * @readonly
168   * @syscap SystemCapability.BundleManager.BundleFramework.Core
169   * @since 9
170   */
171  /**
172   * Indicates whether this ability can be called by other abilities
173   *
174   * @type { boolean }
175   * @readonly
176   * @syscap SystemCapability.BundleManager.BundleFramework.Core
177   * @atomicservice
178   * @since arkts {'1.1':'11', '1.2':'20'}
179   * @arkts 1.1&1.2
180   */
181  readonly exported: boolean;
182
183  /**
184   * Enumerates types of the extension ability info
185   *
186   * @type { bundleManager.ExtensionAbilityType }
187   * @readonly
188   * @syscap SystemCapability.BundleManager.BundleFramework.Core
189   * @since 9
190   */
191  /**
192   * Enumerates types of the extension ability info
193   *
194   * @type { bundleManager.ExtensionAbilityType }
195   * @readonly
196   * @syscap SystemCapability.BundleManager.BundleFramework.Core
197   * @atomicservice
198   * @since arkts {'1.1':'11', '1.2':'20'}
199   * @arkts 1.1&1.2
200   */
201  readonly extensionAbilityType: bundleManager.ExtensionAbilityType;
202
203  /**
204   * Indicates type name of the extension ability.
205   *
206   * @type { string }
207   * @readonly
208   * @syscap SystemCapability.BundleManager.BundleFramework.Core
209   * @atomicservice
210   * @since arkts {'1.1':'11', '1.2':'20'}
211   * @arkts 1.1&1.2
212   */
213  readonly extensionAbilityTypeName: string;
214
215  /**
216   * The permissions that others need to use this extension ability info
217   *
218   * @type { Array<string> }
219   * @readonly
220   * @syscap SystemCapability.BundleManager.BundleFramework.Core
221   * @since 9
222   */
223  /**
224   * The permissions that others need to use this extension ability info
225   *
226   * @type { Array<string> }
227   * @readonly
228   * @syscap SystemCapability.BundleManager.BundleFramework.Core
229   * @atomicservice
230   * @since arkts {'1.1':'11', '1.2':'20'}
231   * @arkts 1.1&1.2
232   */
233  readonly permissions: Array<string>;
234
235  /**
236   * Obtains configuration information about an application
237   *
238   * @type { ApplicationInfo }
239   * @readonly
240   * @syscap SystemCapability.BundleManager.BundleFramework.Core
241   * @since 9
242   */
243  /**
244   * Obtains configuration information about an application
245   *
246   * @type { ApplicationInfo }
247   * @readonly
248   * @syscap SystemCapability.BundleManager.BundleFramework.Core
249   * @atomicservice
250   * @since arkts {'1.1':'11', '1.2':'20'}
251   * @arkts 1.1&1.2
252   */
253  readonly applicationInfo: ApplicationInfo;
254
255  /**
256   * Indicates the metadata of bundle
257   *
258   * @type { Array<Metadata> }
259   * @readonly
260   * @syscap SystemCapability.BundleManager.BundleFramework.Core
261   * @since 9
262   */
263  /**
264   * Indicates the metadata of bundle
265   *
266   * @type { Array<Metadata> }
267   * @readonly
268   * @syscap SystemCapability.BundleManager.BundleFramework.Core
269   * @atomicservice
270   * @since arkts {'1.1':'11', '1.2':'20'}
271   * @arkts 1.1&1.2
272   */
273  readonly metadata: Array<Metadata>;
274
275  /**
276   * Indicates the src language to express extension ability info
277   *
278   * @type { boolean }
279   * @readonly
280   * @syscap SystemCapability.BundleManager.BundleFramework.Core
281   * @since 9
282   */
283  /**
284   * Indicates the src language to express extension ability info
285   *
286   * @type { boolean }
287   * @readonly
288   * @syscap SystemCapability.BundleManager.BundleFramework.Core
289   * @atomicservice
290   * @since arkts {'1.1':'11', '1.2':'20'}
291   * @arkts 1.1&1.2
292   */
293  readonly enabled: boolean;
294
295  /**
296   * Indicates the read permission extension ability info
297   *
298   * @type { string }
299   * @readonly
300   * @syscap SystemCapability.BundleManager.BundleFramework.Core
301   * @since 9
302   */
303  /**
304   * Indicates the read permission extension ability info
305   *
306   * @type { string }
307   * @readonly
308   * @syscap SystemCapability.BundleManager.BundleFramework.Core
309   * @atomicservice
310   * @since arkts {'1.1':'11', '1.2':'20'}
311   * @arkts 1.1&1.2
312   */
313  readonly readPermission: string;
314
315  /**
316   * Indicates the write permission of extension ability info
317   *
318   * @type { string }
319   * @readonly
320   * @syscap SystemCapability.BundleManager.BundleFramework.Core
321   * @since 9
322   */
323  /**
324   * Indicates the write permission of extension ability info
325   *
326   * @type { string }
327   * @readonly
328   * @syscap SystemCapability.BundleManager.BundleFramework.Core
329   * @atomicservice
330   * @since arkts {'1.1':'11', '1.2':'20'}
331   * @arkts 1.1&1.2
332   */
333  readonly writePermission: string;
334
335  /**
336   * Indicates skills of the extension ability
337   *
338   * @type { Array<Skill> }
339   * @readonly
340   * @syscap SystemCapability.BundleManager.BundleFramework.Core
341   * @atomicservice
342   * @since arkts {'1.1':'12', '1.2':'20'}
343   * @arkts 1.1&1.2
344   */
345  readonly skills: Array<Skill>;
346
347  /**
348   * Indicates the appIndex of extension ability, only work in clone app mode
349   *
350   * @type { number }
351   * @readonly
352   * @syscap SystemCapability.BundleManager.BundleFramework.Core
353   * @since arkts {'1.1':'12', '1.2':'20'}
354   * @arkts 1.1&1.2
355   */
356  readonly appIndex: number;
357}
358