• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Want from '../@ohos.app.ability.Want';
17import wantAgent from '../@ohos.wantAgent'
18
19/**
20 * Provides the information required for triggering a WantAgent.
21 *
22 * @name WantAgentInfo
23 * @since 7
24 * @syscap SystemCapability.Ability.AbilityRuntime.Core
25 * @permission N/A
26 */
27export interface WantAgentInfo {
28  /**
29   * An array of all Wants for starting abilities or sending common events. Only Wants can be displayed.
30   */
31  wants: Array<Want>;
32
33  /**
34   * Type of the action specified in a Want.
35   */
36  operationType: wantAgent.OperationType;
37
38  /**
39   * Request code defined by the user.
40   */
41  requestCode: number;
42
43  /**
44   * An array of flags for using the WantAgent.
45   */
46  wantAgentFlags?: Array<wantAgent.WantAgentFlags>;
47
48  /**
49   * Extra information about how the Want starts an ability.
50   * If there is no extra information to set, this constant can be left empty.
51   */
52  extraInfo?: {[key: string]: any};
53}