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 * @permission NA 24 * 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 */ 74 readonly labelId: string; 75 76 /** 77 * @default Indicates the icon of the application 78 * @since 7 79 * @syscap SystemCapability.BundleManager.BundleFramework 80 */ 81 readonly icon: string; 82 83 /** 84 * @default Indicates the icon id of the application 85 * @since 7 86 * @syscap SystemCapability.BundleManager.BundleFramework 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.BundleManager.BundleFramework 94 */ 95 readonly process: string; 96 97 /** 98 * @default Indicates the running mode supported by the application 99 * @since 7 100 * @syscap SystemCapability.BundleManager.BundleFramework 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.BundleManager.BundleFramework 108 */ 109 readonly moduleSourceDirs: Array<string>; 110 111 /** 112 * @default Indicates the permissions required for accessing the application. 113 * @since 7 114 * @syscap SystemCapability.BundleManager.BundleFramework 115 */ 116 readonly permissions: Array<string>; 117 118 /** 119 * @default Indicates module information about an application 120 * @since 7 121 * @syscap SystemCapability.BundleManager.BundleFramework 122 */ 123 readonly moduleInfos: 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.BundleManager.BundleFramework 129 */ 130 readonly entryDir: string; 131 132 /** 133 * @default Indicates the application source code path 134 * @since 8 135 * @syscap SystemCapability.BundleManager.BundleFramework 136 */ 137 readonly codePath: string; 138 139 /** 140 * @default Indicates the metadata of module 141 * @since 8 142 * @syscap SystemCapability.BundleManager.BundleFramework 143 */ 144 readonly metaData: Map<string, Array<CustomizeData>>; 145 146 /** 147 * @default Indicates whether or not this application may be removable 148 * @since 8 149 * @syscap SystemCapability.BundleManager.BundleFramework 150 */ 151 readonly removable: boolean; 152 153 /** 154 * @default Indicates the access token of the application 155 * @since 8 156 * @syscap SystemCapability.BundleManager.BundleFramework 157 */ 158 readonly accessTokenId: number; 159 160 /** 161 * @default Indicates the uid of the application 162 * @since 8 163 * @syscap SystemCapability.BundleManager.BundleFramework 164 */ 165 readonly uid: number; 166 167 /** 168 * @default Indicates entity type of the application 169 * @since 8 170 * @syscap SystemCapability.BundleManager.BundleFramework 171 */ 172 readonly entityType: string; 173} 174