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 { ApplicationInfo } from './applicationInfo'; 17import { CustomizeData } from './customizeData'; 18import bundle from './../@ohos.bundle'; 19 20/** 21 * Obtains configuration information about an ability 22 * 23 * @typedef AbilityInfo 24 * @syscap SystemCapability.BundleManager.BundleFramework 25 * @since 7 26 * @deprecated since 9 27 * @useinstead ohos.bundle.bundleManager.AbilityInfo 28 */ 29export interface AbilityInfo { 30 /** 31 * @default Indicates the name of the bundle containing the ability 32 * @syscap SystemCapability.BundleManager.BundleFramework 33 * @since 7 34 * @deprecated since 9 35 */ 36 readonly bundleName: string; 37 38 /** 39 * @default Ability simplified class name 40 * @syscap SystemCapability.BundleManager.BundleFramework 41 * @since 7 42 * @deprecated since 9 43 */ 44 readonly name: string; 45 46 /** 47 * @default Indicates the label of the ability 48 * @syscap SystemCapability.BundleManager.BundleFramework 49 * @since 7 50 * @deprecated since 9 51 */ 52 readonly label: string; 53 54 /** 55 * @default Describes the ability 56 * @syscap SystemCapability.BundleManager.BundleFramework 57 * @since 7 58 * @deprecated since 9 59 */ 60 readonly description: string; 61 62 /** 63 * @default Indicates the icon of the ability 64 * @syscap SystemCapability.BundleManager.BundleFramework 65 * @since 7 66 * @deprecated since 9 67 */ 68 readonly icon: string; 69 70 /** 71 * @default Indicates the label id of the ability 72 * @syscap SystemCapability.BundleManager.BundleFramework 73 * @since 7 74 * @deprecated since 9 75 */ 76 readonly labelId: number; 77 78 /** 79 * @default Indicates the description id of the ability 80 * @syscap SystemCapability.BundleManager.BundleFramework 81 * @since 7 82 * @deprecated since 9 83 */ 84 readonly descriptionId: number; 85 86 /** 87 * @default Indicates the icon id of the ability 88 * @syscap SystemCapability.BundleManager.BundleFramework 89 * @since 7 90 * @deprecated since 9 91 */ 92 readonly iconId: number; 93 94 /** 95 * @default Indicates the name of the .hap package to which the capability belongs 96 * @syscap SystemCapability.BundleManager.BundleFramework 97 * @since 7 98 * @deprecated since 9 99 */ 100 readonly moduleName: string; 101 102 /** 103 * @default Process of ability, if user do not set it ,the value equal application process 104 * @syscap SystemCapability.BundleManager.BundleFramework 105 * @since 7 106 * @deprecated since 9 107 */ 108 readonly process: string; 109 110 /** 111 * @default Info about which ability is this nick point to 112 * @syscap SystemCapability.BundleManager.BundleFramework 113 * @FAModelOnly 114 * @since 7 115 * @deprecated since 9 116 */ 117 readonly targetAbility: string; 118 119 /** 120 * @default Indicates the background service addressing a specific usage scenario 121 * @syscap SystemCapability.BundleManager.BundleFramework 122 * @FAModelOnly 123 * @since 7 124 * @deprecated since 9 125 */ 126 readonly backgroundModes: number; 127 128 /** 129 * @default Indicates whether an ability can be called by other abilities 130 * @syscap SystemCapability.BundleManager.BundleFramework 131 * @since 7 132 * @deprecated since 9 133 */ 134 readonly isVisible: boolean; 135 136 /** 137 * @default Indicates whether the ability provides the embedded card capability 138 * @syscap SystemCapability.BundleManager.BundleFramework 139 * @FAModelOnly 140 * @since 7 141 * @deprecated since 9 142 */ 143 readonly formEnabled: boolean; 144 145 /** 146 * @default Enumerates types of templates that can be used by an ability 147 * @syscap SystemCapability.BundleManager.BundleFramework 148 * @FAModelOnly 149 * @since 7 150 * @deprecated since 9 151 */ 152 readonly type: bundle.AbilityType; 153 154 /** 155 * @default Enumerates the subType of templates used by an ability 156 * @syscap SystemCapability.BundleManager.BundleFramework 157 * @FAModelOnly 158 * @since 7 159 * @deprecated since 9 160 */ 161 readonly subType: bundle.AbilitySubType; 162 163 /** 164 * @default Enumerates ability display orientations 165 * @syscap SystemCapability.BundleManager.BundleFramework 166 * @since 7 167 * @deprecated since 9 168 */ 169 readonly orientation: bundle.DisplayOrientation; 170 171 /** 172 * @default Enumerates ability launch modes 173 * @syscap SystemCapability.BundleManager.BundleFramework 174 * @since 7 175 * @deprecated since 9 176 */ 177 readonly launchMode: bundle.LaunchMode; 178 179 /** 180 * @default The permissions that others need to launch this ability 181 * @syscap SystemCapability.BundleManager.BundleFramework 182 * @since 7 183 * @deprecated since 9 184 */ 185 readonly permissions: Array<string>; 186 187 /** 188 * @default The device types that this ability can run on 189 * @syscap SystemCapability.BundleManager.BundleFramework 190 * @since 7 191 * @deprecated since 9 192 */ 193 readonly deviceTypes: Array<string>; 194 195 /** 196 * @default The device capability that this ability needs 197 * @syscap SystemCapability.BundleManager.BundleFramework 198 * @since 7 199 * @deprecated since 9 200 */ 201 readonly deviceCapabilities: Array<string>; 202 203 /** 204 * @default Indicates the permission required for reading ability data 205 * @syscap SystemCapability.BundleManager.BundleFramework 206 * @FAModelOnly 207 * @since 7 208 * @deprecated since 9 209 */ 210 readonly readPermission: string; 211 212 /** 213 * @default Indicates the permission required for writing data to the ability 214 * @syscap SystemCapability.BundleManager.BundleFramework 215 * @FAModelOnly 216 * @since 7 217 * @deprecated since 9 218 */ 219 readonly writePermission: string; 220 221 /** 222 * @default Obtains configuration information about an application 223 * @syscap SystemCapability.BundleManager.BundleFramework 224 * @since 7 225 * @deprecated since 9 226 */ 227 readonly applicationInfo: ApplicationInfo; 228 229 /** 230 * @default Uri of ability 231 * @syscap SystemCapability.BundleManager.BundleFramework 232 * @FAModelOnly 233 * @since 7 234 * @deprecated since 9 235 */ 236 readonly uri: string; 237 238 /** 239 * @default Indicates the metadata of ability 240 * @syscap SystemCapability.BundleManager.BundleFramework 241 * @since 8 242 * @deprecated since 9 243 */ 244 readonly metaData: Array<CustomizeData>; 245 246 /** 247 * @default Indicates whether the ability is enabled 248 * @syscap SystemCapability.BundleManager.BundleFramework 249 * @since 8 250 * @deprecated since 9 251 */ 252 readonly enabled: boolean; 253} 254