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