• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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 */
15export const Action = {
16    ACTION_HOME: "ohos.want.action.home",
17    ACTION_DIAL: "ohos.want.action.dial",
18    ACTION_SEARCH: "ohos.want.action.search",
19    ACTION_WIRELESS_SETTINGS: "ohos.settings.wireless",
20    ACTION_MANAGE_APPLICATIONS_SETTINGS: "ohos.settings.manage.applications",
21    ACTION_APPLICATION_DETAILS_SETTINGS: "ohos.settings.application.details",
22    ACTION_SET_ALARM: "ohos.want.action.setAlarm",
23    ACTION_SHOW_ALARMS: "ohos.want.action.showAlarms",
24    ACTION_SNOOZE_ALARM: "ohos.want.action.snoozeAlarm",
25    ACTION_DISMISS_ALARM: "ohos.want.action.dismissAlarm",
26    ACTION_DISMISS_TIMER: "ohos.want.action.dismissTimer",
27    ACTION_SEND_SMS: "ohos.want.action.sendSms",
28    ACTION_CHOOSE: "ohos.want.action.choose",
29    ACTION_IMAGE_CAPTURE: "ohos.want.action.imageCapture",
30    ACTION_VIDEO_CAPTURE: "ohos.want.action.videoCapture",
31    ACTION_SELECT: "ohos.want.action.select",
32    ACTION_SEND_DATA: "ohos.want.action.sendData",
33    ACTION_SEND_MULTIPLE_DATA: "ohos.want.action.sendMultipleData",
34    ACTION_SCAN_MEDIA_FILE: "ohos.want.action.scanMediaFile",
35    ACTION_VIEW_DATA: "ohos.want.action.viewData",
36    ACTION_EDIT_DATA: "ohos.want.action.editData",
37    INTENT_PARAMS_INTENT: "ability.want.params.INTENT",
38    INTENT_PARAMS_TITLE: "ability.want.params.TITLE",
39    ACTION_FILE_SELECT: "ohos.action.fileSelect",
40    PARAMS_STREAM: "ability.params.stream",
41    ACTION_APP_ACCOUNT_OAUTH: "ohos.account.appAccount.action.oauth",
42    ACTION_MARKER_DOWNLOAD: "ohos.want.action.marketDownload"
43}
44export const Entity = {
45    ENTITY_DEFAULT: "entity.system.default",
46    ENTITY_HOME: "entity.system.home",
47    ENTITY_VOICE: "entity.system.voice",
48    ENTITY_BROWSABLE: "entity.system.browsable",
49    ENTITY_VIDEO: "entity.system.video"
50}
51export const Flags = {
52    FLAG_AUTH_READ_URI_PERMISSION: 0x00000001,
53    FLAG_AUTH_WRITE_URI_PERMISSION: 0x00000002,
54    FLAG_ABILITY_FORWARD_RESULT: 0x00000004,
55    FLAG_ABILITY_CONTINUATION: 0x00000008,
56    FLAG_NOT_OHOS_COMPONENT: 0x00000010,
57    FLAG_ABILITY_FORM_ENABLED: 0x00000020,
58    FLAG_AUTH_PERSISTABLE_URI_PERMISSION: 0x00000040,
59    FLAG_AUTH_PREFIX_URI_PERMISSION: 0x00000080,
60    FLAG_ABILITYSLICE_MULTI_DEVICE: 0x00000100,
61    FLAG_START_FOREGROUND_ABILITY: 0x00000200,
62    FLAG_ABILITY_CONTINUATION_REVERSIBLE: 0x00000400,
63    FLAG_INSTALL_ON_DEMAND: 0x00000800,
64    FLAG_INSTALL_WITH_BACKGROUND_MODE: 0x80000000,
65    FLAG_ABILITY_CLEAR_MISSION: 0x00008000,
66    FLAG_ABILITY_NEW_MISSION: 0x10000000,
67    FLAG_ABILITY_MISSION_TOP: 0x20000000
68}
69export function mockWantConstant() {
70    const wantConstant = {
71        Action,
72        Entity,
73        Flags
74    }
75    return wantConstant;
76}