1/* 2 * Copyright (c) 2022-2024 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 21/** 22 * the constant for params and flags in the want 23 * 24 * @namespace wantConstant 25 * @syscap SystemCapability.Ability.AbilityBase 26 * @since 9 27 */ 28/** 29 * the constant for params and flags in the want 30 * 31 * @namespace wantConstant 32 * @syscap SystemCapability.Ability.AbilityBase 33 * @atomicservice 34 * @since 11 35 */ 36declare namespace wantConstant { 37 /** 38 * The constant for params of the want 39 * 40 * @enum { string } 41 * @syscap SystemCapability.Ability.AbilityBase 42 * @since 9 43 */ 44 /** 45 * The constant for params of the want 46 * 47 * @enum { string } 48 * @syscap SystemCapability.Ability.AbilityBase 49 * @atomicservice 50 * @since 11 51 */ 52 export enum Params { 53 /** 54 * Indicates the param of sandbox flag. 55 * 56 * @syscap SystemCapability.Ability.AbilityBase 57 * @systemapi 58 * @since 9 59 */ 60 DLP_PARAMS_SANDBOX = 'ohos.dlp.params.sandbox', 61 62 /** 63 * Indicates the param of dlp bundle name. 64 * 65 * @syscap SystemCapability.Ability.AbilityBase 66 * @systemapi 67 * @since 9 68 */ 69 DLP_PARAMS_BUNDLE_NAME = 'ohos.dlp.params.bundleName', 70 71 /** 72 * Indicates the param of dlp module name. 73 * 74 * @syscap SystemCapability.Ability.AbilityBase 75 * @systemapi 76 * @since 9 77 */ 78 DLP_PARAMS_MODULE_NAME = 'ohos.dlp.params.moduleName', 79 80 /** 81 * Indicates the param of dlp ability name. 82 * 83 * @syscap SystemCapability.Ability.AbilityBase 84 * @systemapi 85 * @since 9 86 */ 87 DLP_PARAMS_ABILITY_NAME = 'ohos.dlp.params.abilityName', 88 89 /** 90 * Indicates the param of dlp bundle index. 91 * 92 * @syscap SystemCapability.Ability.AbilityBase 93 * @systemapi 94 * @since 9 95 */ 96 DLP_PARAMS_INDEX = 'ohos.dlp.params.index', 97 98 /** 99 * Indicates the ability in this want can back to the current top ability even though they are not in the same 100 * mission stack. 101 * 102 * @syscap SystemCapability.Ability.AbilityBase 103 * @since 9 104 */ 105 /** 106 * Indicates the ability in this want can back to the current top ability even though they are not in the same 107 * mission stack. 108 * 109 * @syscap SystemCapability.Ability.AbilityBase 110 * @atomicservice 111 * @since 11 112 */ 113 ABILITY_BACK_TO_OTHER_MISSION_STACK = 'ability.params.backToOtherMissionStack', 114 115 /** 116 * Indicates the param of ability failure restart recovery identification 117 * 118 * @syscap SystemCapability.Ability.AbilityBase 119 * @since 10 120 */ 121 /** 122 * Indicates the param of ability failure restart recovery identification 123 * 124 * @syscap SystemCapability.Ability.AbilityBase 125 * @atomicservice 126 * @since 11 127 */ 128 ABILITY_RECOVERY_RESTART = 'ohos.ability.params.abilityRecoveryRestart', 129 130 /** 131 * Indicates the param of extra content title 132 * 133 * @syscap SystemCapability.Ability.AbilityBase 134 * @since 10 135 */ 136 /** 137 * Indicates the param of extra content title 138 * 139 * @syscap SystemCapability.Ability.AbilityBase 140 * @atomicservice 141 * @since 11 142 */ 143 CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle', 144 145 /** 146 * Indicates the param of extra shared abstract 147 * 148 * @syscap SystemCapability.Ability.AbilityBase 149 * @since 10 150 */ 151 /** 152 * Indicates the param of extra shared abstract 153 * 154 * @syscap SystemCapability.Ability.AbilityBase 155 * @atomicservice 156 * @since 11 157 */ 158 SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract', 159 160 /** 161 * Indicates the param of extra shareURL 162 * 163 * @syscap SystemCapability.Ability.AbilityBase 164 * @since 10 165 */ 166 /** 167 * Indicates the param of extra shareURL 168 * 169 * @syscap SystemCapability.Ability.AbilityBase 170 * @atomicservice 171 * @since 11 172 */ 173 SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl', 174 175 /** 176 * Indicates the param of extra support continue page stack. 177 * The default value of the param is true, 178 * and the system will automatically flow the page stack information by default. 179 * 180 * @syscap SystemCapability.Ability.AbilityBase 181 * @since 10 182 */ 183 /** 184 * Indicates the param of extra support continue page stack. 185 * The default value of the param is true, 186 * and the system will automatically flow the page stack information by default. 187 * 188 * @syscap SystemCapability.Ability.AbilityBase 189 * @atomicservice 190 * @since 11 191 */ 192 SUPPORT_CONTINUE_PAGE_STACK_KEY = 'ohos.extra.param.key.supportContinuePageStack', 193 194 /** 195 * Indicates the param of extra stop source ability on continue. 196 * The default value of the param is true, 197 * and the system will exit the source application by default. 198 * 199 * @syscap SystemCapability.Ability.AbilityBase 200 * @since 10 201 */ 202 /** 203 * Indicates the param of extra stop source ability on continue. 204 * The default value of the param is true, 205 * and the system will exit the source application by default. 206 * 207 * @syscap SystemCapability.Ability.AbilityBase 208 * @atomicservice 209 * @since 11 210 */ 211 SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit', 212 213 /** 214 * Indicates the session ID of AssertFault. 215 * 216 * @syscap SystemCapability.Ability.AbilityBase 217 * @systemapi 218 * @stagemodelonly 219 * @since 12 220 */ 221 ASSERT_FAULT_SESSION_ID = 'ohos.ability.params.asssertFaultSessionId', 222 223 /** 224 * Indicates the param of show mode key. 225 * 226 * @syscap SystemCapability.Ability.AbilityBase 227 * @atomicservice 228 * @since 12 229 */ 230 SHOW_MODE_KEY = 'ohos.extra.param.key.showMode', 231 232 /** 233 * Cross-application sharing of file URIs. 234 * 235 * @syscap SystemCapability.Ability.AbilityBase 236 * @atomicservice 237 * @since 12 238 */ 239 PARAMS_STREAM = 'ability.params.stream', 240 241 /** 242 * Indicates the param of app clone index. 243 * 244 * @syscap SystemCapability.Ability.AbilityBase 245 * @atomicservice 246 * @since 12 247 */ 248 APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex', 249 250 /** 251 * Indicates the param of caller's request code. 252 * 253 * @syscap SystemCapability.Ability.AbilityBase 254 * @atomicservice 255 * @since 12 256 */ 257 CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode', 258 259 /** 260 * Indicates the param of page path. 261 * 262 * @syscap SystemCapability.Ability.AbilityBase 263 * @atomicservice 264 * @since 12 265 */ 266 PAGE_PATH = 'ohos.param.atomicservice.pagePath', 267 268 /** 269 * Indicates the param of router name. 270 * 271 * @syscap SystemCapability.Ability.AbilityBase 272 * @atomicservice 273 * @since 12 274 */ 275 ROUTER_NAME = 'ohos.param.atomicservice.routerName', 276 277 /** 278 * Indicates the param of page source file. 279 * 280 * @syscap SystemCapability.Ability.AbilityBase 281 * @atomicservice 282 * @since 12 283 */ 284 PAGE_SOURCE_FILE = 'ohos.param.atomicservice.pageSourceFile', 285 286 /** 287 * Indicates the param of build function. 288 * 289 * @syscap SystemCapability.Ability.AbilityBase 290 * @atomicservice 291 * @since 12 292 */ 293 BUILD_FUNCTION = 'ohos.param.atomicservice.buildFunction', 294 295 /** 296 * Indicates the param of subpackage name. 297 * 298 * @syscap SystemCapability.Ability.AbilityBase 299 * @atomicservice 300 * @since 12 301 */ 302 SUB_PACKAGE_NAME = 'ohos.param.atomicservice.subpackageName', 303 } 304 305 /** 306 * Used to indicate how Want is handled. 307 * 308 * @enum { number } 309 * @syscap SystemCapability.Ability.AbilityBase 310 * @since 9 311 */ 312 /** 313 * Used to indicate how Want is handled. 314 * 315 * @enum { number } 316 * @syscap SystemCapability.Ability.AbilityBase 317 * @atomicservice 318 * @since 11 319 */ 320 export enum Flags { 321 /** 322 * Indicates the grant to perform read operations on the URI. 323 * 324 * @syscap SystemCapability.Ability.AbilityBase 325 * @since 9 326 */ 327 /** 328 * Indicates the grant to perform read operations on the URI. 329 * 330 * @syscap SystemCapability.Ability.AbilityBase 331 * @atomicservice 332 * @since 11 333 */ 334 FLAG_AUTH_READ_URI_PERMISSION = 0x00000001, 335 336 /** 337 * Indicates the grant to perform write operations on the URI. 338 * 339 * @syscap SystemCapability.Ability.AbilityBase 340 * @since 9 341 */ 342 /** 343 * Indicates the grant to perform write operations on the URI. 344 * 345 * @syscap SystemCapability.Ability.AbilityBase 346 * @atomicservice 347 * @since 11 348 */ 349 FLAG_AUTH_WRITE_URI_PERMISSION = 0x00000002, 350 351 /** 352 * Indicates that the URI can be persisted by the callee. 353 * @syscap SystemCapability.Ability.AbilityBase 354 * @since 12 355 */ 356 FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040, 357 358 /** 359 * Install the specified ability if it's not installed. 360 * 361 * @syscap SystemCapability.Ability.AbilityBase 362 * @since 9 363 */ 364 /** 365 * Install the specified ability if it's not installed. 366 * 367 * @syscap SystemCapability.Ability.AbilityBase 368 * @atomicservice 369 * @since 11 370 */ 371 FLAG_INSTALL_ON_DEMAND = 0x00000800, 372 373 /** 374 * Indicates that if implicit start ability couldn't match any application, no tip dialog will be pulled up. 375 * 376 * @syscap SystemCapability.Ability.AbilityBase 377 * @since 11 378 */ 379 FLAG_START_WITHOUT_TIPS = 0x40000000 380 } 381 382 /** 383 * Used to indicate show mode. 384 * 385 * @enum { number } 386 * @syscap SystemCapability.Ability.AbilityBase 387 * @atomicservice 388 * @since 12 389 */ 390 export enum ShowMode { 391 /** 392 * Indicates the window show mode. 393 * 394 * @syscap SystemCapability.Ability.AbilityBase 395 * @atomicservice 396 * @since 12 397 */ 398 WINDOW = 0, 399 400 /** 401 * Indicates the embedded full show mode. 402 * 403 * @syscap SystemCapability.Ability.AbilityBase 404 * @atomicservice 405 * @since 12 406 */ 407 EMBEDDED_FULL = 1 408 } 409} 410 411export default wantConstant; 412