• 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
16/**
17 * the information of the subscriber
18 * @name CommonEventSubscribeInfo
19 * @since 7
20 * @permission N/A
21 */
22export interface CommonEventSubscribeInfo {
23  /**
24   * The permission that the publisher must have in order to send a common event to this subscriber.
25   * This subscriber receives only common events sent by publishers granted with this permission.
26   *
27   * @default ""
28   * @since 7
29   */
30  events: Array<string>;
31
32  /**
33   * The permission that the publisher must have in order to send a common event to this subscriber.
34   * This subscriber receives only common events sent by publishers granted with this permission.
35   *
36   * @default ""
37   * @since 7
38   */
39  publisherPermission?: string;
40
41  /**
42   * deviceId Indicates the device ID. The value must be an existing device ID on the same ohos network.
43   *
44   * @default ""
45   * @since 7
46   */
47  publisherDeviceId?: string;
48
49  /**
50   * Indicates the user ID. This parameter is optional, and the default value is the ID of the
51  * current user. If this parameter is specified, the value must be an existing user ID in the system.
52   *
53   * @default ""
54   * @since 7
55   */
56  userId?: number;
57
58  /**
59   * Indicates the subscriber priority. The value ranges from -100 to 1000.
60   *
61   * @default ""
62   * @since 7
63   */
64  priority?: number;
65}