• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 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 */
19
20/**
21 * the constant for action and entity in the want
22 *
23 * @namespace wantConstant
24 * @syscap SystemCapability.Ability.AbilityBase
25 * @since 6
26 * @deprecated since 9
27 * @useinstead ohos.app.ability.wantConstant/wantConstant
28 */
29declare namespace wantConstant {
30  /**
31   * the constant for action of the want
32   *
33   * @enum { string }
34   * @syscap SystemCapability.Ability.AbilityBase
35   * @since 6
36   * @deprecated since 9
37   */
38  export enum Action {
39    /**
40     * Indicates the action of backing home.
41     *
42     * @syscap SystemCapability.Ability.AbilityBase
43     * @since 6
44     * @deprecated since 9
45     */
46    ACTION_HOME = 'ohos.want.action.home',
47
48    /**
49     * Indicates the action of starting a Page ability that displays a keypad.
50     *
51     * @syscap SystemCapability.Ability.AbilityBase
52     * @since 6
53     * @deprecated since 9
54     */
55    ACTION_DIAL = 'ohos.want.action.dial',
56
57    /**
58     * Indicates the action of starting a Page ability for search.
59     *
60     * @syscap SystemCapability.Ability.AbilityBase
61     * @since 6
62     * @deprecated since 9
63     */
64    ACTION_SEARCH = 'ohos.want.action.search',
65
66    /**
67     * Indicates the action of starting a Page ability that provides wireless network settings, for example,
68     * Wi-Fi options.
69     *
70     * @syscap SystemCapability.Ability.AbilityBase
71     * @since 6
72     * @deprecated since 9
73     */
74    ACTION_WIRELESS_SETTINGS = 'ohos.settings.wireless',
75
76    /**
77     * Indicates the action of starting a Page ability that manages installed applications.
78     *
79     * @syscap SystemCapability.Ability.AbilityBase
80     * @since 6
81     * @deprecated since 9
82     */
83    ACTION_MANAGE_APPLICATIONS_SETTINGS = 'ohos.settings.manage.applications',
84
85    /**
86     * Indicates the action of starting a Page ability that displays details of a specified application.
87     * <p>You must specify the application bundle name in the {@code package} attribute of the {@code Intent}
88     * containing this action.
89     *
90     * @syscap SystemCapability.Ability.AbilityBase
91     * @since 6
92     * @deprecated since 9
93     */
94    ACTION_APPLICATION_DETAILS_SETTINGS = 'ohos.settings.application.details',
95
96    /**
97     * Indicates the action of starting a Page ability for setting an alarm clock.
98     *
99     * @syscap SystemCapability.Ability.AbilityBase
100     * @since 6
101     * @deprecated since 9
102     */
103    ACTION_SET_ALARM = 'ohos.want.action.setAlarm',
104
105    /**
106     * Indicates the action of starting a Page ability that displays all alarm
107     * clocks.
108     *
109     * @syscap SystemCapability.Ability.AbilityBase
110     * @since 6
111     * @deprecated since 9
112     */
113    ACTION_SHOW_ALARMS = 'ohos.want.action.showAlarms',
114
115    /**
116     * Indicates the action of starting a Page ability for snoozing an alarm clock.
117     *
118     * @syscap SystemCapability.Ability.AbilityBase
119     * @since 6
120     * @deprecated since 9
121     */
122    ACTION_SNOOZE_ALARM = 'ohos.want.action.snoozeAlarm',
123
124    /**
125     * Indicates the action of starting a Page ability for deleting an alarm clock.
126     *
127     * @syscap SystemCapability.Ability.AbilityBase
128     * @since 6
129     * @deprecated since 9
130     */
131    ACTION_DISMISS_ALARM = 'ohos.want.action.dismissAlarm',
132
133    /**
134     * Indicates the action of starting a Page ability for dismissing a timer.
135     *
136     * @syscap SystemCapability.Ability.AbilityBase
137     * @since 6
138     * @deprecated since 9
139     */
140    ACTION_DISMISS_TIMER = 'ohos.want.action.dismissTimer',
141
142    /**
143     * Indicates the action of starting a Page ability for sending a sms.
144     *
145     * @syscap SystemCapability.Ability.AbilityBase
146     * @since 6
147     * @deprecated since 9
148     */
149    ACTION_SEND_SMS = 'ohos.want.action.sendSms',
150
151    /**
152     * Indicates the action of starting a Page ability for opening contacts or pictures.
153     *
154     * @syscap SystemCapability.Ability.AbilityBase
155     * @since 6
156     * @deprecated since 9
157     */
158    ACTION_CHOOSE = 'ohos.want.action.choose',
159
160    /**
161     * Indicates the action of starting a Page ability for take a picture.
162     *
163     * @syscap SystemCapability.Ability.AbilityBase
164     * @since 8
165     * @deprecated since 9
166     */
167    ACTION_IMAGE_CAPTURE = 'ohos.want.action.imageCapture',
168
169    /**
170     * Indicates the action of starting a Page ability for Take a video.
171     *
172     * @syscap SystemCapability.Ability.AbilityBase
173     * @since 8
174     * @deprecated since 9
175     */
176    ACTION_VIDEO_CAPTURE = 'ohos.want.action.videoCapture',
177
178    /**
179     * Indicates the action of showing the application selection dialog box.
180     *
181     * @syscap SystemCapability.Ability.AbilityBase
182     * @since 6
183     * @deprecated since 9
184     */
185    ACTION_SELECT = 'ohos.want.action.select',
186
187    /**
188     * Indicates the action of sending a single data record.
189     *
190     * @syscap SystemCapability.Ability.AbilityBase
191     * @since 6
192     * @deprecated since 9
193     */
194    ACTION_SEND_DATA = 'ohos.want.action.sendData',
195
196    /**
197     * Indicates the action of sending multiple data records.
198     *
199     * @syscap SystemCapability.Ability.AbilityBase
200     * @since 6
201     * @deprecated since 9
202     */
203    ACTION_SEND_MULTIPLE_DATA = 'ohos.want.action.sendMultipleData',
204
205    /**
206     * Indicates the action of requesting the media scanner to scan files and adding the files to the media library.
207     *
208     * @syscap SystemCapability.Ability.AbilityBase
209     * @since 6
210     * @deprecated since 9
211     */
212    ACTION_SCAN_MEDIA_FILE = 'ohos.want.action.scanMediaFile',
213
214    /**
215     * Indicates the action of viewing data.
216     *
217     * @syscap SystemCapability.Ability.AbilityBase
218     * @since 6
219     * @deprecated since 9
220     */
221    ACTION_VIEW_DATA = 'ohos.want.action.viewData',
222
223    /**
224     * Indicates the action of editing data.
225     *
226     * @syscap SystemCapability.Ability.AbilityBase
227     * @since 6
228     * @deprecated since 9
229     */
230    ACTION_EDIT_DATA = 'ohos.want.action.editData',
231
232    /**
233     * Indicates the choices you will show with {@link #ACTION_PICKER}.
234     *
235     * @syscap SystemCapability.Ability.AbilityBase
236     * @since 6
237     * @deprecated since 9
238     */
239    INTENT_PARAMS_INTENT = 'ability.want.params.INTENT',
240
241    /**
242     * Indicates the CharSequence dialog title when used with a {@link #ACTION_PICKER}.
243     *
244     * @syscap SystemCapability.Ability.AbilityBase
245     * @since 6
246     * @deprecated since 9
247     */
248    INTENT_PARAMS_TITLE = 'ability.want.params.TITLE',
249
250    /**
251     * Indicates the action of select file.
252     *
253     * @syscap SystemCapability.Ability.AbilityBase
254     * @since 7
255     * @deprecated since 9
256     */
257    ACTION_FILE_SELECT = 'ohos.action.fileSelect',
258
259    /**
260     * Indicates the URI holding a stream of data associated with the Intent when used with a {@link #ACTION_SEND_DATA}.
261     *
262     * @syscap SystemCapability.Ability.AbilityBase
263     * @since 7
264     * @deprecated since 9
265     */
266    PARAMS_STREAM = 'ability.params.stream',
267
268    /**
269     * Indicates the action of providing oauth service.
270     *
271     * @syscap SystemCapability.Ability.AbilityBase
272     * @since 8
273     * @deprecated since 9
274     */
275    ACTION_APP_ACCOUNT_OAUTH = 'ohos.account.appAccount.action.oauth'
276  }
277
278  /**
279   * the constant for Entity of the want
280   *
281   * @enum { string }
282   * @syscap SystemCapability.Ability.AbilityBase
283   * @since 6
284   * @deprecated since 9
285   */
286  export enum Entity {
287    /**
288     * Indicates the default entity, which is used if the entity is not specified.
289     *
290     * @syscap SystemCapability.Ability.AbilityBase
291     * @since 6
292     * @deprecated since 9
293     */
294    ENTITY_DEFAULT = 'entity.system.default',
295
296    /**
297     * Indicates the home screen entity.
298     *
299     * @syscap SystemCapability.Ability.AbilityBase
300     * @since 6
301     * @deprecated since 9
302     */
303    ENTITY_HOME = 'entity.system.home',
304
305    /**
306     * Indicates the voice interaction entity.
307     *
308     * @syscap SystemCapability.Ability.AbilityBase
309     * @since 6
310     * @deprecated since 9
311     */
312    ENTITY_VOICE = 'entity.system.voice',
313
314    /**
315     * Indicates the browser category.
316     *
317     * @syscap SystemCapability.Ability.AbilityBase
318     * @since 6
319     * @deprecated since 9
320     */
321    ENTITY_BROWSABLE = 'entity.system.browsable',
322
323    /**
324     * Indicates the video category.
325     *
326     * @syscap SystemCapability.Ability.AbilityBase
327     * @since 6
328     * @deprecated since 9
329     */
330    ENTITY_VIDEO = 'entity.system.video'
331  }
332
333  /**
334   * Used to indicate how Want is handled.
335   *
336   * @enum { number }
337   * @syscap SystemCapability.Ability.AbilityBase
338   * @since 6
339   * @deprecated since 9
340   * @useinstead ohos.app.ability.wantConstant/wantConstant#Flags
341   */
342  export enum Flags {
343    /**
344     * Indicates the grant to perform read operations on the URI.
345     *
346     * @syscap SystemCapability.Ability.AbilityBase
347     * @since 6
348     * @deprecated since 9
349     * @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_AUTH_READ_URI_PERMISSION
350     */
351    FLAG_AUTH_READ_URI_PERMISSION = 0x00000001,
352
353    /**
354     * Indicates the grant to perform write operations on the URI.
355     *
356     * @syscap SystemCapability.Ability.AbilityBase
357     * @since 6
358     * @deprecated since 9
359     * @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_AUTH_WRITE_URI_PERMISSION
360     */
361    FLAG_AUTH_WRITE_URI_PERMISSION = 0x00000002,
362
363    /**
364     * Returns the result to the source ability.
365     *
366     * @syscap SystemCapability.Ability.AbilityBase
367     * @since 6
368     * @deprecated since 9
369     */
370    FLAG_ABILITY_FORWARD_RESULT = 0x00000004,
371
372    /**
373     * Determines whether an ability on the local device can be migrated to a remote device.
374     *
375     * @syscap SystemCapability.Ability.AbilityBase
376     * @since 6
377     * @deprecated since 9
378     */
379    FLAG_ABILITY_CONTINUATION = 0x00000008,
380
381    /**
382     * Specifies whether a component does not belong to OHOS.
383     *
384     * @syscap SystemCapability.Ability.AbilityBase
385     * @since 6
386     * @deprecated since 9
387     */
388    FLAG_NOT_OHOS_COMPONENT = 0x00000010,
389
390    /**
391     * Specifies whether an ability is started.
392     *
393     * @syscap SystemCapability.Ability.AbilityBase
394     * @since 6
395     * @deprecated since 9
396     */
397    FLAG_ABILITY_FORM_ENABLED = 0x00000020,
398
399    /**
400     * Indicates the grant for possible persisting on the URI.
401     *
402     * @syscap SystemCapability.Ability.AbilityBase
403     * @systemapi
404     * @since 6
405     * @deprecated since 9
406     */
407    FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040,
408
409    /**
410     * Returns the result to the source ability slice.
411     *
412     * @syscap SystemCapability.Ability.AbilityBase
413     * @systemapi
414     * @since 6
415     * @deprecated since 9
416     */
417    FLAG_AUTH_PREFIX_URI_PERMISSION = 0x00000080,
418
419    /**
420     * Supports multi-device startup in the distributed scheduling system.
421     *
422     * @syscap SystemCapability.Ability.AbilityBase
423     * @since 6
424     * @deprecated since 9
425     */
426    FLAG_ABILITYSLICE_MULTI_DEVICE = 0x00000100,
427
428    /**
429     * Indicates that an ability using the Service template is started regardless of whether the host application has
430     * been started.
431     *
432     * @syscap SystemCapability.Ability.AbilityBase
433     * @since 6
434     * @deprecated since 9
435     */
436    FLAG_START_FOREGROUND_ABILITY = 0x00000200,
437
438    /**
439     * Indicates the continuation is reversible.
440     *
441     * @syscap SystemCapability.Ability.AbilityBase
442     * @systemapi
443     * @since 6
444     * @deprecated since 9
445     */
446    FLAG_ABILITY_CONTINUATION_REVERSIBLE = 0x00000400,
447
448    /**
449     * Install the specified ability if it's not installed.
450     *
451     * @syscap SystemCapability.Ability.AbilityBase
452     * @since 6
453     * @deprecated since 9
454     * @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_INSTALL_ON_DEMAND
455     */
456    FLAG_INSTALL_ON_DEMAND = 0x00000800,
457
458    /**
459     * Install the specified ability with background mode if it's not installed.
460     *
461     * @syscap SystemCapability.Ability.AbilityBase
462     * @since 6
463     * @deprecated since 9
464     */
465    FLAG_INSTALL_WITH_BACKGROUND_MODE = 0x80000000,
466
467    /**
468     * Indicates the operation of clearing other missions. This flag can be set for the {@code Intent} passed to
469     * {@link ohos.app.Context#startAbility} and must be used together with {@link FLAG_ABILITY_NEW_MISSION}.
470     *
471     * @syscap SystemCapability.Ability.AbilityBase
472     * @since 6
473     * @deprecated since 9
474     */
475    FLAG_ABILITY_CLEAR_MISSION = 0x00008000,
476
477    /**
478     * Indicates the operation of creating a task on the historical mission stack.
479     *
480     * @syscap SystemCapability.Ability.AbilityBase
481     * @since 6
482     * @deprecated since 9
483     */
484    FLAG_ABILITY_NEW_MISSION = 0x10000000,
485
486    /**
487     * Indicates that the existing instance of the ability to start will be reused if it is already at the top of
488     * the mission stack. Otherwise, a new ability instance will be created.
489     *
490     * @syscap SystemCapability.Ability.AbilityBase
491     * @since 6
492     * @deprecated since 9
493     */
494    FLAG_ABILITY_MISSION_TOP = 0x20000000
495  }
496}
497
498export default wantConstant;
499