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