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 * @file Some states and flags for notifications
18 * @kit NotificationKit
19 */
20
21/**
22 * The status of the notification flag.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.Notification.Notification
26 * @systemapi
27 * @since 8
28 */
29/**
30 * The status of the notification flag.
31 *
32 * @enum { number }
33 * @syscap SystemCapability.Notification.Notification
34 * @since 11
35 */
36export enum NotificationFlagStatus {
37  /**
38   * notification flag default value
39   *
40   * @syscap SystemCapability.Notification.Notification
41   * @systemapi
42   * @since 8
43   */
44  /**
45   * notification flag default value
46   *
47   * @syscap SystemCapability.Notification.Notification
48   * @since 11
49   */
50  TYPE_NONE = 0,
51
52  /**
53   * notification flag open
54   *
55   * @syscap SystemCapability.Notification.Notification
56   * @systemapi
57   * @since 8
58   */
59  /**
60   * notification flag open
61   *
62   * @syscap SystemCapability.Notification.Notification
63   * @since 11
64   */
65  TYPE_OPEN = 1,
66
67  /**
68   * notification flag close
69   *
70   * @syscap SystemCapability.Notification.Notification
71   * @systemapi
72   * @since 8
73   */
74  /**
75   * notification flag close
76   *
77   * @syscap SystemCapability.Notification.Notification
78   * @since 11
79   */
80  TYPE_CLOSE = 2
81}
82
83/**
84 * Describes a NotificationFlags instance.
85 *
86 * @typedef NotificationFlags
87 * @syscap SystemCapability.Notification.Notification
88 * @since 8
89 */
90export interface NotificationFlags {
91  /**
92   * Whether to enable sound reminder.
93   *
94   * @type { ?NotificationFlagStatus }
95   * @readonly
96   * @syscap SystemCapability.Notification.Notification
97   * @since 8
98   */
99  readonly soundEnabled?: NotificationFlagStatus;
100
101  /**
102   * Whether to enable vibration reminder.
103   *
104   * @type { ?NotificationFlagStatus }
105   * @readonly
106   * @syscap SystemCapability.Notification.Notification
107   * @since 8
108   */
109  readonly vibrationEnabled?: NotificationFlagStatus;
110
111  /**
112   * Read-only the prompt entry information allowed by the current channel.
113   *
114   * @type { ?number }
115   * @readonly
116   * @syscap SystemCapability.Notification.Notification
117   * @systemapi
118   * @since 11
119   */
120  readonly reminderFlags?: number;
121}
122