• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 arkts {'1.1':'11', '1.2':'20'}
35 * @arkts 1.1&1.2
36 */
37declare namespace wantConstant {
38  /**
39   * The constant for params of the want
40   *
41   * @enum { string }
42   * @syscap SystemCapability.Ability.AbilityBase
43   * @since 9
44   */
45  /**
46   * The constant for params of the want
47   *
48   * @enum { string }
49   * @syscap SystemCapability.Ability.AbilityBase
50   * @atomicservice
51   * @since arkts {'1.1':'11', '1.2':'20'}
52   * @arkts 1.1&1.2
53   */
54  export enum Params {
55    /**
56     * Indicates the param of sandbox flag.
57     *
58     * @syscap SystemCapability.Ability.AbilityBase
59     * @systemapi
60     * @since arkts {'1.1':'9', '1.2':'20'}
61     * @arkts 1.1&1.2
62     */
63    DLP_PARAMS_SANDBOX = 'ohos.dlp.params.sandbox',
64
65    /**
66     * Indicates the param of dlp bundle name.
67     *
68     * @syscap SystemCapability.Ability.AbilityBase
69     * @systemapi
70     * @since arkts {'1.1':'9', '1.2':'20'}
71     * @arkts 1.1&1.2
72     */
73    DLP_PARAMS_BUNDLE_NAME = 'ohos.dlp.params.bundleName',
74
75    /**
76     * Indicates the param of dlp module name.
77     *
78     * @syscap SystemCapability.Ability.AbilityBase
79     * @systemapi
80     * @since arkts {'1.1':'9', '1.2':'20'}
81     * @arkts 1.1&1.2
82     */
83    DLP_PARAMS_MODULE_NAME = 'ohos.dlp.params.moduleName',
84
85    /**
86     * Indicates the param of dlp ability name.
87     *
88     * @syscap SystemCapability.Ability.AbilityBase
89     * @systemapi
90     * @since arkts {'1.1':'9', '1.2':'20'}
91     * @arkts 1.1&1.2
92     */
93    DLP_PARAMS_ABILITY_NAME = 'ohos.dlp.params.abilityName',
94
95    /**
96     * Indicates the param of dlp bundle index.
97     *
98     * @syscap SystemCapability.Ability.AbilityBase
99     * @systemapi
100     * @since arkts {'1.1':'9', '1.2':'20'}
101     * @arkts 1.1&1.2
102     */
103    DLP_PARAMS_INDEX = 'ohos.dlp.params.index',
104
105    /**
106     * Indicates the type of hide sensitive information.
107     *
108     * @syscap SystemCapability.Ability.AbilityBase
109     * @systemapi
110     * @since arkts {'1.1':'15', '1.2':'20'}
111     * @arkts 1.1&1.2
112     */
113    HIDE_SENSITIVE_TYPE = 'ohos.media.params.hideSensitiveType',
114
115    /**
116     * Indicates the ability in this want can back to the current top ability even though they are not in the same
117     * mission stack.
118     *
119     * @syscap SystemCapability.Ability.AbilityBase
120     * @since 9
121     */
122    /**
123     * Indicates the ability in this want can back to the current top ability even though they are not in the same
124     * mission stack.
125     *
126     * @syscap SystemCapability.Ability.AbilityBase
127     * @atomicservice
128     * @since arkts {'1.1':'11', '1.2':'20'}
129     * @arkts 1.1&1.2
130     */
131    ABILITY_BACK_TO_OTHER_MISSION_STACK = 'ability.params.backToOtherMissionStack',
132
133    /**
134     * Indicates the param of ability failure restart recovery identification
135     *
136     * @syscap SystemCapability.Ability.AbilityBase
137     * @since 10
138     */
139    /**
140     * Indicates the param of ability failure restart recovery identification
141     *
142     * @syscap SystemCapability.Ability.AbilityBase
143     * @atomicservice
144     * @since arkts {'1.1':'11', '1.2':'20'}
145     * @arkts 1.1&1.2
146     */
147    ABILITY_RECOVERY_RESTART = 'ohos.ability.params.abilityRecoveryRestart',
148
149    /**
150     * Indicates the param of extra content title
151     *
152     * @syscap SystemCapability.Ability.AbilityBase
153     * @since 10
154     */
155    /**
156     * Indicates the param of extra content title
157     *
158     * @syscap SystemCapability.Ability.AbilityBase
159     * @atomicservice
160     * @since arkts {'1.1':'11', '1.2':'20'}
161     * @arkts 1.1&1.2
162     */
163    CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle',
164
165    /**
166     * Indicates the param of extra shared abstract
167     *
168     * @syscap SystemCapability.Ability.AbilityBase
169     * @since 10
170     */
171    /**
172     * Indicates the param of extra shared abstract
173     *
174     * @syscap SystemCapability.Ability.AbilityBase
175     * @atomicservice
176     * @since arkts {'1.1':'11', '1.2':'20'}
177     * @arkts 1.1&1.2
178     */
179    SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract',
180
181    /**
182     * Indicates the param of extra shareURL
183     *
184     * @syscap SystemCapability.Ability.AbilityBase
185     * @since 10
186     */
187    /**
188     * Indicates the param of extra shareURL
189     *
190     * @syscap SystemCapability.Ability.AbilityBase
191     * @atomicservice
192     * @since arkts {'1.1':'11', '1.2':'20'}
193     * @arkts 1.1&1.2
194     */
195    SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl',
196
197    /**
198     * Indicates the param of extra support continue page stack.
199     * The default value of the param is true,
200     * and the system will automatically flow the page stack information by default.
201     *
202     * @syscap SystemCapability.Ability.AbilityBase
203     * @since 10
204     */
205    /**
206     * Indicates the param of extra support continue page stack.
207     * The default value of the param is true,
208     * and the system will automatically flow the page stack information by default.
209     *
210     * @syscap SystemCapability.Ability.AbilityBase
211     * @atomicservice
212     * @since arkts {'1.1':'11', '1.2':'20'}
213     * @arkts 1.1&1.2
214     */
215    SUPPORT_CONTINUE_PAGE_STACK_KEY = 'ohos.extra.param.key.supportContinuePageStack',
216
217    /**
218     * Indicates the param of extra stop source ability on continue.
219     * The default value of the param is true,
220     * and the system will exit the source application by default.
221     *
222     * @syscap SystemCapability.Ability.AbilityBase
223     * @since 10
224     */
225    /**
226     * Indicates the param of extra stop source ability on continue.
227     * The default value of the param is true,
228     * and the system will exit the source application by default.
229     *
230     * @syscap SystemCapability.Ability.AbilityBase
231     * @atomicservice
232     * @since arkts {'1.1':'11', '1.2':'20'}
233     * @arkts 1.1&1.2
234     */
235    SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit',
236
237    /**
238     * Indicates the session ID of AssertFault.
239     *
240     * @syscap SystemCapability.Ability.AbilityBase
241     * @systemapi
242     * @stagemodelonly
243     * @since arkts {'1.1':'12', '1.2':'20'}
244     * @arkts 1.1&1.2
245     */
246    ASSERT_FAULT_SESSION_ID = 'ohos.ability.params.asssertFaultSessionId',
247
248    /**
249     * Indicates the param of show mode key.
250     *
251     * @syscap SystemCapability.Ability.AbilityBase
252     * @atomicservice
253     * @since arkts {'1.1':'12', '1.2':'20'}
254     * @arkts 1.1&1.2
255     */
256    SHOW_MODE_KEY = 'ohos.extra.param.key.showMode',
257
258    /**
259     * Cross-application sharing of file URIs.
260     *
261     * @syscap SystemCapability.Ability.AbilityBase
262     * @atomicservice
263     * @since arkts {'1.1':'12', '1.2':'20'}
264     * @arkts 1.1&1.2
265     */
266    PARAMS_STREAM = 'ability.params.stream',
267
268    /**
269     * Indicates the param of app clone index.
270     *
271     * @syscap SystemCapability.Ability.AbilityBase
272     * @atomicservice
273     * @since arkts {'1.1':'12', '1.2':'20'}
274     * @arkts 1.1&1.2
275     */
276    APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex',
277
278    /**
279     * Indicates the param of caller's request code.
280     *
281     * @syscap SystemCapability.Ability.AbilityBase
282     * @atomicservice
283     * @since arkts {'1.1':'12', '1.2':'20'}
284     * @arkts 1.1&1.2
285     */
286    CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode',
287
288    /**
289     * Indicates the param of page path.
290     *
291     * @syscap SystemCapability.Ability.AbilityBase
292     * @atomicservice
293     * @since arkts {'1.1':'12', '1.2':'20'}
294     * @arkts 1.1&1.2
295     */
296    PAGE_PATH = 'ohos.param.atomicservice.pagePath',
297
298    /**
299     * Indicates the param of router name.
300     *
301     * @syscap SystemCapability.Ability.AbilityBase
302     * @atomicservice
303     * @since arkts {'1.1':'12', '1.2':'20'}
304     * @arkts 1.1&1.2
305     */
306    ROUTER_NAME = 'ohos.param.atomicservice.routerName',
307
308    /**
309     * Indicates the param of page source file.
310     *
311     * @syscap SystemCapability.Ability.AbilityBase
312     * @atomicservice
313     * @since arkts {'1.1':'12', '1.2':'20'}
314     * @arkts 1.1&1.2
315     */
316    PAGE_SOURCE_FILE = 'ohos.param.atomicservice.pageSourceFile',
317
318    /**
319     * Indicates the param of build function.
320     *
321     * @syscap SystemCapability.Ability.AbilityBase
322     * @atomicservice
323     * @since arkts {'1.1':'12', '1.2':'20'}
324     * @arkts 1.1&1.2
325     */
326    BUILD_FUNCTION = 'ohos.param.atomicservice.buildFunction',
327
328    /**
329     * Indicates the param of subpackage name.
330     *
331     * @syscap SystemCapability.Ability.AbilityBase
332     * @atomicservice
333     * @since arkts {'1.1':'12', '1.2':'20'}
334     * @arkts 1.1&1.2
335     */
336    SUB_PACKAGE_NAME = 'ohos.param.atomicservice.subpackageName',
337
338    /**
339     * Indicates the param of app instance key.
340     *
341     * @syscap SystemCapability.Ability.AbilityBase
342     * @since arkts {'1.1':'14', '1.2':'20'}
343     * @arkts 1.1&1.2
344     */
345    APP_INSTANCE_KEY = 'ohos.extra.param.key.appInstance',
346
347    /**
348    * Indicates the param of creating a new instance.
349    *
350    * @syscap SystemCapability.Ability.AbilityBase
351    * @since arkts {'1.1':'14', '1.2':'20'}
352    * @arkts 1.1&1.2
353    */
354     CREATE_APP_INSTANCE_KEY = 'ohos.extra.param.key.createAppInstance',
355
356    /**
357    * Indicates the app clone index of caller.
358    *
359    * @syscap SystemCapability.Ability.AbilityBase
360    * @since arkts {'1.1':'14', '1.2':'20'}
361    * @arkts 1.1&1.2
362    */
363    CALLER_APP_CLONE_INDEX = 'ohos.param.callerAppCloneIndex',
364
365    /**
366    * Indicates the key of launch reason message.
367    * If the caller needs to set the launch reason through this field when initiating the callee, the caller must
368    * be a system application and have applied for the ohos.permission.SET_LAUNCH_REASON_MESSAGE permission.
369    *
370    * @syscap SystemCapability.Ability.AbilityBase
371    * @atomicservice
372    * @since arkts {'1.1':'18', '1.2':'20'}
373    * @arkts 1.1&1.2
374    */
375    LAUNCH_REASON_MESSAGE = 'ohos.params.launchReasonMessage',
376
377    /**
378    * Indicates the dest ability refers to a plugin ability.
379    *
380    * @syscap SystemCapability.Ability.AbilityBase
381    * @since 19
382    */
383    DESTINATION_PLUGIN_ABILITY = 'ohos.params.pluginAbility',
384
385    /**
386    * Indicates the param of the appIdentifier trustlist when implicitly launching applications.
387    *
388    * @syscap SystemCapability.Ability.AbilityBase
389    * @atomicservice
390    * @since 17
391    */
392    APP_LAUNCH_TRUSTLIST = 'ohos.params.appLaunchTrustList',
393
394    /**
395    * Indicates the unified data key used to share file uri.
396    *
397    * @syscap SystemCapability.Ability.AbilityBase
398    * @atomicservice
399    * @since 20
400    */
401    ABILITY_UNIFIED_DATA_KEY = 'ohos.param.ability.udKey',
402
403    /**
404    * Indicates the key of the page route upon sharing atomic service.
405    *
406    * @syscap SystemCapability.Ability.AbilityBase
407    * @atomicservice
408    * @since 20
409    */
410    ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter'
411  }
412
413  /**
414   * Used to indicate how Want is handled.
415   *
416   * @enum { number }
417   * @syscap SystemCapability.Ability.AbilityBase
418   * @since 9
419   */
420  /**
421   * Used to indicate how Want is handled.
422   *
423   * @enum { number }
424   * @syscap SystemCapability.Ability.AbilityBase
425   * @atomicservice
426   * @since arkts {'1.1':'11', '1.2':'20'}
427   * @arkts 1.1&1.2
428   */
429  export enum Flags {
430    /**
431     * Indicates the grant to perform read operations on the URI.
432     *
433     * @syscap SystemCapability.Ability.AbilityBase
434     * @since 9
435     */
436    /**
437     * Indicates the grant to perform read operations on the URI.
438     *
439     * @syscap SystemCapability.Ability.AbilityBase
440     * @atomicservice
441     * @since arkts {'1.1':'11', '1.2':'20'}
442     * @arkts 1.1&1.2
443     */
444    FLAG_AUTH_READ_URI_PERMISSION = 0x00000001,
445
446    /**
447     * Indicates the grant to perform write operations on the URI.
448     *
449     * @syscap SystemCapability.Ability.AbilityBase
450     * @since 9
451     */
452    /**
453     * Indicates the grant to perform write operations on the URI.
454     *
455     * @syscap SystemCapability.Ability.AbilityBase
456     * @atomicservice
457     * @since arkts {'1.1':'11', '1.2':'20'}
458     * @arkts 1.1&1.2
459     */
460    FLAG_AUTH_WRITE_URI_PERMISSION = 0x00000002,
461
462    /**
463     * Indicates that the URI can be persisted by the callee.
464     * @syscap SystemCapability.Ability.AbilityBase
465     * @since arkts {'1.1':'12', '1.2':'20'}
466     * @arkts 1.1&1.2
467     */
468    FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040,
469
470    /**
471     * Install the specified ability if it's not installed.
472     *
473     * @syscap SystemCapability.Ability.AbilityBase
474     * @since 9
475     */
476    /**
477     * Install the specified ability if it's not installed.
478     *
479     * @syscap SystemCapability.Ability.AbilityBase
480     * @atomicservice
481     * @since arkts {'1.1':'11', '1.2':'20'}
482     * @arkts 1.1&1.2
483     */
484    FLAG_INSTALL_ON_DEMAND = 0x00000800,
485
486    /**
487     * Collaborative target applications in the distributed scheduling system can be pulled up.
488     *
489     * @syscap SystemCapability.Ability.AbilityBase
490     * @since arkts {'1.1':'18', '1.2':'20'}
491     * @arkts 1.1&1.2
492     */
493    FLAG_ABILITY_ON_COLLABORATE = 0x00002000,
494
495    /**
496     * Indicates that if implicit start ability couldn't match any application, no tip dialog will be pulled up.
497     *
498     * @syscap SystemCapability.Ability.AbilityBase
499     * @since arkts {'1.1':'11', '1.2':'20'}
500     * @arkts 1.1&1.2
501     */
502    FLAG_START_WITHOUT_TIPS = 0x40000000
503  }
504
505  /**
506   * Used to indicate show mode.
507   *
508   * @enum { number }
509   * @syscap SystemCapability.Ability.AbilityBase
510   * @atomicservice
511   * @since arkts {'1.1':'12', '1.2':'20'}
512   * @arkts 1.1&1.2
513   */
514  export enum ShowMode {
515    /**
516     * Indicates the window show mode.
517     *
518     * @syscap SystemCapability.Ability.AbilityBase
519     * @atomicservice
520     * @since arkts {'1.1':'12', '1.2':'20'}
521     * @arkts 1.1&1.2
522     */
523    WINDOW = 0,
524
525    /**
526     * Indicates the embedded full show mode.
527     *
528     * @syscap SystemCapability.Ability.AbilityBase
529     * @atomicservice
530     * @since arkts {'1.1':'12', '1.2':'20'}
531     * @arkts 1.1&1.2
532     */
533    EMBEDDED_FULL = 1
534  }
535}
536
537export default wantConstant;
538