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 { ModuleInfo } from './moduleInfo';
22import { CustomizeData } from './customizeData';
23
24/**
25 * Obtains configuration information about an application
26 *
27 * @typedef ApplicationInfo
28 * @syscap SystemCapability.BundleManager.BundleFramework
29 * @since 7
30 * @deprecated since 9
31 * @useinstead ohos.bundle.bundleManager.ApplicationInfo
32 */
33export interface ApplicationInfo {
34  /**
35   * @default Indicates the application name, which is the same as {@code bundleName}
36   * @syscap SystemCapability.BundleManager.BundleFramework
37   * @since 7
38   * @deprecated since 9
39   */
40  readonly name: string;
41
42  /**
43   * @default Description of application
44   * @syscap SystemCapability.BundleManager.BundleFramework
45   * @since 7
46   * @deprecated since 9
47   */
48  readonly description: string;
49
50  /**
51   * @default Indicates the description id of the application
52   * @syscap SystemCapability.BundleManager.BundleFramework
53   * @since 7
54   * @deprecated since 9
55   */
56  readonly descriptionId: number;
57
58  /**
59   * @default Indicates whether the application is a system application
60   * @syscap SystemCapability.BundleManager.BundleFramework
61   * @since 7
62   * @deprecated since 9
63   */
64  readonly systemApp: boolean;
65
66  /**
67   * @default Indicates whether or not this application may be instantiated
68   * @syscap SystemCapability.BundleManager.BundleFramework
69   * @since 7
70   * @deprecated since 9
71   */
72  readonly enabled: boolean;
73
74  /**
75   * @default Indicates the label of the application
76   * @syscap SystemCapability.BundleManager.BundleFramework
77   * @since 7
78   * @deprecated since 9
79   */
80  readonly label: string;
81
82  /**
83   * @default Indicates the label id of the application
84   * @syscap SystemCapability.BundleManager.BundleFramework
85   * @since 7
86   * @deprecated since 9
87   * @useinstead ohos.bundle.bundleManager.ApplicationInfo.labelIndex
88   */
89  readonly labelId: string;
90
91  /**
92   * @default Indicates the icon of the application
93   * @syscap SystemCapability.BundleManager.BundleFramework
94   * @since 7
95   * @deprecated since 9
96   */
97  readonly icon: string;
98
99  /**
100   * @default Indicates the icon id of the application
101   * @syscap SystemCapability.BundleManager.BundleFramework
102   * @since 7
103   * @deprecated since 9
104   * @useinstead ohos.bundle.bundleManager.ApplicationInfo.iconIndex
105   */
106  readonly iconId: string;
107
108  /**
109   * @default Process of application, if user do not set it ,the value equal bundleName
110   * @syscap SystemCapability.BundleManager.BundleFramework
111   * @since 7
112   * @deprecated since 9
113   */
114  readonly process: string;
115
116  /**
117   * @default Indicates the running mode supported by the application
118   * @syscap SystemCapability.BundleManager.BundleFramework
119   * @since 7
120   * @deprecated since 9
121   */
122  readonly supportedModes: number;
123
124  /**
125   * @default Indicates the path storing the module resources of the application
126   * @syscap SystemCapability.BundleManager.BundleFramework
127   * @since 7
128   * @deprecated since 9
129   */
130  readonly moduleSourceDirs: Array<string>;
131
132  /**
133   * @default Indicates the permissions required for accessing the application.
134   * @syscap SystemCapability.BundleManager.BundleFramework
135   * @since 7
136   * @deprecated since 9
137   */
138  readonly permissions: Array<string>;
139
140  /**
141   * @default Indicates module information about an application
142   * @syscap SystemCapability.BundleManager.BundleFramework
143   * @since 7
144   * @deprecated since 9
145   */
146  readonly moduleInfos: Array<ModuleInfo>;
147
148  /**
149   * @default Indicates the path where the {@code Entry.hap} file of the application is saved
150   * @syscap SystemCapability.BundleManager.BundleFramework
151   * @since 7
152   * @deprecated since 9
153   */
154  readonly entryDir: string;
155
156  /**
157   * @default Indicates the application source code path
158   * @syscap SystemCapability.BundleManager.BundleFramework
159   * @since 8
160   * @deprecated since 9
161   */
162  readonly codePath: string;
163
164  /**
165   * @default Indicates the metadata of module
166   * @syscap SystemCapability.BundleManager.BundleFramework
167   * @since 8
168   * @deprecated since 9
169   */
170  readonly metaData: Map<string, Array<CustomizeData>>;
171
172  /**
173   * @default Indicates whether or not this application may be removable
174   * @syscap SystemCapability.BundleManager.BundleFramework
175   * @since 8
176   * @deprecated since 9
177   */
178  readonly removable: boolean;
179
180  /**
181   * @default Indicates the access token of the application
182   * @syscap SystemCapability.BundleManager.BundleFramework
183   * @since 8
184   * @deprecated since 9
185   */
186  readonly accessTokenId: number;
187
188  /**
189   * @default Indicates the uid of the application
190   * @syscap SystemCapability.BundleManager.BundleFramework
191   * @since 8
192   * @deprecated since 9
193   */
194  readonly uid: number;
195
196  /**
197   * @default Indicates entity type of the application
198   * @syscap SystemCapability.BundleManager.BundleFramework
199   * @since 8
200   * @deprecated since 9
201   */
202  readonly entityType: string;
203}
204