• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2022 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
16export default class Constants {
17  static readonly WH_45_100 = '45%';
18  static readonly WH_50_100 = '50%';
19  static readonly WH_60_100 = '60%';
20  static readonly WH_70_100 = '70%';
21  static readonly WH_90_100 = '90%';
22  static readonly WH_100_100 = '100%';
23  static readonly MAX_LINES_1 = 1;
24  static readonly MAX_LINES_2 = 2;
25  static readonly MAX_LINES_3 = 3;
26  static readonly TIME_EMPTY = '00:00';
27  static readonly DATE_YEAR_IDX = 0;
28  static readonly DATE_MONTH_IDX = 1;
29  static readonly DATE_DAY_IDX = 2;
30  static readonly DATE_HOUR_IDX = 3;
31  static readonly DATE_MINUTE_IDX = 4;
32}
33
34/**
35   * The type of the Do Not Disturb.
36   *
37   * @since 8
38   * @systemapi Hide this for inner system use.
39   */
40export enum DoNotDisturbType {
41    /**
42     * Non do not disturb type notification
43     */
44    TYPE_NONE = 0,
45
46    /**
47     * Execute do not disturb once in the set time period (only watch hours and minutes)
48     */
49    TYPE_ONCE = 1,
50
51    /**
52     * Execute do not disturb every day with a set time period (only watch hours and minutes)
53     */
54    TYPE_DAILY = 2,
55
56    /**
57     * Execute in the set time period (specify the time, month, day and hour)
58     */
59    TYPE_CLEARLY = 3,
60}