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