• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 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 status of the notification flag.
18 *
19 * @enum { number }
20 * @syscap SystemCapability.Notification.Notification
21 * @systemapi
22 * @since 8
23 */
24export enum NotificationFlagStatus {
25  /**
26   * notification flag default value
27   *
28   * @syscap SystemCapability.Notification.Notification
29   * @systemapi
30   * @since 8
31   */
32  TYPE_NONE = 0,
33
34  /**
35   * notification flag open
36   *
37   * @syscap SystemCapability.Notification.Notification
38   * @systemapi
39   * @since 8
40   */
41  TYPE_OPEN = 1,
42
43  /**
44   * notification flag close
45   *
46   * @syscap SystemCapability.Notification.Notification
47   * @systemapi
48   * @since 8
49   */
50  TYPE_CLOSE = 2
51}
52
53/**
54 * Describes a NotificationFlags instance.
55 *
56 * @typedef NotificationFlags
57 * @syscap SystemCapability.Notification.Notification
58 * @since 8
59 */
60export interface NotificationFlags {
61  /**
62   * Whether to enable sound reminder.
63   *
64   * @type { ?NotificationFlagStatus }
65   * @readonly
66   * @syscap SystemCapability.Notification.Notification
67   * @since 8
68   */
69  readonly soundEnabled?: NotificationFlagStatus;
70
71  /**
72   * Whether to enable vibration reminder.
73   *
74   * @type { ?NotificationFlagStatus }
75   * @readonly
76   * @syscap SystemCapability.Notification.Notification
77   * @since 8
78   */
79  readonly vibrationEnabled?: NotificationFlagStatus;
80}
81