• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 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
18 * @kit BasicServicesKit
19 */
20
21/**
22 * Provides charger information includes type and protocol.
23 *
24 * @namespace charger
25 * @syscap SystemCapability.PowerManager.BatteryManager.Core
26 * @systemapi
27 * @since 10
28 */
29declare namespace charger {
30  /**
31   * Indicates the type of the charger plugged-in.
32   *
33   * @enum { number }
34   * @syscap SystemCapability.PowerManager.BatteryManager.Core
35   * @systemapi
36   * @since 10
37   */
38  export enum ChargeType {
39    /**
40     * Unknown type
41     *
42     * @syscap SystemCapability.PowerManager.BatteryManager.Core
43     * @systemapi
44     * @since 10
45     */
46    NONE,
47    /**
48     * Wired normal type
49     *
50     * @syscap SystemCapability.PowerManager.BatteryManager.Core
51     * @systemapi
52     * @since 10
53     */
54    WIRED_NORMAL,
55    /**
56     * Wired quick type
57     *
58     * @syscap SystemCapability.PowerManager.BatteryManager.Core
59     * @systemapi
60     * @since 10
61     */
62    WIRED_QUICK,
63    /**
64     * Wired super quick type
65     *
66     * @syscap SystemCapability.PowerManager.BatteryManager.Core
67     * @systemapi
68     * @since 10
69     */
70    WIRED_SUPER_QUICK,
71    /**
72     * Wireless normal type
73     *
74     * @syscap SystemCapability.PowerManager.BatteryManager.Core
75     * @systemapi
76     * @since 10
77     */
78    WIRELESS_NORMAL,
79    /**
80     * Wireless quick type
81     *
82     * @syscap SystemCapability.PowerManager.BatteryManager.Core
83     * @systemapi
84     * @since 10
85     */
86    WIRELESS_QUICK,
87    /**
88     * Wireless super quick type
89     *
90     * @syscap SystemCapability.PowerManager.BatteryManager.Core
91     * @systemapi
92     * @since 10
93     */
94    WIRELESS_SUPER_QUICK
95  }
96}
97export default charger;
98