• 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.Appexecfwk
23 * @permission NA
24 * @devices phone, tablet, tv, wearable, car
25 */
26export interface ApplicationInfo {
27  /**
28    * @default Indicates the application name, which is the same as {@code bundleName}
29    * @since 7
30    * @SysCap SystemCapability.Appexecfwk
31    */
32  readonly name: string;
33
34  /**
35    * @default Description of application
36    * @since 7
37    * @SysCap SystemCapability.Appexecfwk
38    */
39  readonly description: string;
40
41  /**
42    * @default Indicates the description id of the application
43    * @since 7
44    * @SysCap SystemCapability.Appexecfwk
45    */
46  readonly descriptionId: number;
47
48  /**
49    * @default Indicates whether the application is a system application
50    * @since 7
51    * @SysCap SystemCapability.Appexecfwk
52    */
53  readonly systemApp: boolean;
54
55  /**
56    * @default Indicates whether or not this application may be instantiated
57    * @since 7
58    * @SysCap SystemCapability.Appexecfwk
59    */
60  readonly enabled: boolean;
61
62  /**
63    * @default Indicates the label of the application
64    * @since 7
65    * @SysCap SystemCapability.Appexecfwk
66    */
67  readonly label: string;
68
69  /**
70    * @default Indicates the label id of the application
71    * @since 7
72    * @SysCap SystemCapability.Appexecfwk
73    */
74  readonly labelId: string;
75
76  /**
77    * @default Indicates the icon of the application
78    * @since 7
79    * @SysCap SystemCapability.Appexecfwk
80    */
81  readonly icon: string;
82
83  /**
84    * @default Indicates the icon id of the application
85    * @since 7
86    * @SysCap SystemCapability.Appexecfwk
87    */
88  readonly iconId: string;
89
90  /**
91    * @default Process of application, if user do not set it ,the value equal bundleName
92    * @since 7
93    * @SysCap SystemCapability.Appexecfwk
94    */
95  readonly process: string;
96
97  /**
98    * @default Indicates the running mode supported by the application
99    * @since 7
100    * @SysCap SystemCapability.Appexecfwk
101    */
102  readonly supportedModes: number;
103
104  /**
105    * @default Indicates the path storing the module resources of the application
106    * @since 7
107    * @SysCap SystemCapability.Appexecfwk
108    */
109  readonly moduleSourceDirs: Array<string>;
110
111  /**
112    * @default Indicates the permissions required for accessing the application.
113    * @since 7
114    * @SysCap SystemCapability.Appexecfwk
115    */
116  readonly permissions: Array<string>;
117
118  /**
119    * @default Indicates module information about an application
120    * @since 7
121    * @SysCap SystemCapability.Appexecfwk
122    */
123  readonly moduleInfo: Array<ModuleInfo>;
124
125  /**
126    * @default Indicates the path where the {@code Entry.hap} file of the application is saved
127    * @since 7
128    * @SysCap SystemCapability.Appexecfwk
129    */
130  readonly entryDir: string;
131
132  /**
133    * @default Indicates the custom metadata of the application
134    * @since 7
135    * @SysCap SystemCapability.Appexecfwk
136    */
137  customizeData: Map<string, CustomizeData>;
138}