• 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 notification from '../@ohos.notification';
17
18/**
19 * Describes a NotificationSlot instance.
20 *
21 * @name NotificationSlot
22 * @since 7
23 * @permission N/A
24 * @syscap SystemCapability.Notification.Notification
25 */
26export interface NotificationSlot {
27  /**
28   * Obtains the type of a notification slot.
29   */
30  type: notification.SlotType;
31
32  /**
33   * Obtains the level of a notification slot
34   */
35  level?: notification.SlotLevel;
36
37  /**
38   * Obtains the description of a notification slot.
39   */
40  desc?: string;
41
42  /**
43   * Obtains the application icon badge status of a notification slot.
44   */
45  badgeFlag?: boolean;
46
47  /**
48   * Obtains whether DND mode is bypassed for a notification slot.
49   */
50  bypassDnd?: boolean;
51
52  /**
53   * Whether and how to display notifications on the lock screen.
54   */
55  lockscreenVisibility?: number;
56
57  /**
58   * Obtains the vibration status of the notification slot.
59   */
60  vibrationEnabled?: boolean;
61
62  /**
63   * Obtains the prompt tone of the notification slot.
64   */
65  sound?: string;
66
67  /**
68   * Obtains whether the notification light is enabled in a notification slot.
69   */
70  lightEnabled?: boolean;
71
72  /**
73   * Obtains the color of the notification light in a notification slot.
74   */
75  lightColor?: number;
76
77  /**
78   * Obtains the vibration style of notifications in this notification slot.
79   */
80  vibrationValues?: Array<number>;
81
82  /**
83   * Read-only enabled status in this notification slot.
84   *
85   * @since 9
86   */
87  readonly enabled?: boolean;
88}
89