195489c19Sopenharmony_ci/*
295489c19Sopenharmony_ci * Copyright (C) 2024 Huawei Device Co., Ltd.
395489c19Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
495489c19Sopenharmony_ci * you may not use this file except in compliance with the License.
595489c19Sopenharmony_ci * You may obtain a copy of the License at
695489c19Sopenharmony_ci *
795489c19Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
895489c19Sopenharmony_ci *
995489c19Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1095489c19Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1195489c19Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1295489c19Sopenharmony_ci * See the License for the specific language governing permissions and
1395489c19Sopenharmony_ci * limitations under the License.
1495489c19Sopenharmony_ci */
1595489c19Sopenharmony_ci
1695489c19Sopenharmony_ci#ifndef BLUETOOTH_BATTERY_INFO_H
1795489c19Sopenharmony_ci#define BLUETOOTH_BATTERY_INFO_H
1895489c19Sopenharmony_ci
1995489c19Sopenharmony_ci#include "bluetooth_def.h"
2095489c19Sopenharmony_ci#include "bluetooth_types.h"
2195489c19Sopenharmony_ci
2295489c19Sopenharmony_cinamespace OHOS {
2395489c19Sopenharmony_cinamespace Bluetooth {
2495489c19Sopenharmony_ci/**
2595489c19Sopenharmony_ci * @brief bluetooth battery information define.
2695489c19Sopenharmony_ci *
2795489c19Sopenharmony_ci * @since 12
2895489c19Sopenharmony_ci */
2995489c19Sopenharmony_ci
3095489c19Sopenharmony_ci/**
3195489c19Sopenharmony_ci * @brief Enum for the charge state.
3295489c19Sopenharmony_ci *
3395489c19Sopenharmony_ci * @since 12
3495489c19Sopenharmony_ci */
3595489c19Sopenharmony_ci
3695489c19Sopenharmony_cienum class DeviceChargeState : int32_t {
3795489c19Sopenharmony_ci    // not support super charge, and not charged
3895489c19Sopenharmony_ci    DEVICE_NORMAL_CHARGE_NOT_CHARGED = 0,
3995489c19Sopenharmony_ci
4095489c19Sopenharmony_ci    // not support super charge, and in charged
4195489c19Sopenharmony_ci    DEVICE_NORMAL_CHARGE_IN_CHARGING = 1,
4295489c19Sopenharmony_ci
4395489c19Sopenharmony_ci    // support super charge, and not charged
4495489c19Sopenharmony_ci    DEVICE_SUPER_CHARGE_NOT_CHARGED = 2,
4595489c19Sopenharmony_ci
4695489c19Sopenharmony_ci    // support super charge, and in charged
4795489c19Sopenharmony_ci    DEVICE_SUPER_CHARGE_IN_CHARGING = 3,
4895489c19Sopenharmony_ci};
4995489c19Sopenharmony_ci
5095489c19Sopenharmony_cistruct DeviceBatteryInfo {
5195489c19Sopenharmony_ci    // The device
5295489c19Sopenharmony_ci    std::string deviceId_;
5395489c19Sopenharmony_ci
5495489c19Sopenharmony_ci    // Electricity value of the general device. -1 means no power infomation.
5595489c19Sopenharmony_ci    int32_t batteryLevel_;
5695489c19Sopenharmony_ci
5795489c19Sopenharmony_ci    // Electricity value of the left ear. -1 means no power infomation.
5895489c19Sopenharmony_ci    int32_t leftEarBatteryLevel_;
5995489c19Sopenharmony_ci
6095489c19Sopenharmony_ci    // The charge state of the left ear.
6195489c19Sopenharmony_ci    DeviceChargeState leftEarChargeState_;
6295489c19Sopenharmony_ci
6395489c19Sopenharmony_ci    // Electricity value of the right ear. -1 means no power infomation.
6495489c19Sopenharmony_ci    int32_t rightEarBatteryLevel_;
6595489c19Sopenharmony_ci
6695489c19Sopenharmony_ci    // The charge state of the right ear.
6795489c19Sopenharmony_ci    DeviceChargeState rightEarChargeState_;
6895489c19Sopenharmony_ci
6995489c19Sopenharmony_ci    // Electricity value of the box. -1 means no power infomation.
7095489c19Sopenharmony_ci    int32_t boxBatteryLevel_;
7195489c19Sopenharmony_ci
7295489c19Sopenharmony_ci    // The charge state of the box
7395489c19Sopenharmony_ci    DeviceChargeState boxChargeState_;
7495489c19Sopenharmony_ci};
7595489c19Sopenharmony_ci} // namespace Bluetooth
7695489c19Sopenharmony_ci} // namespace OHOS
7795489c19Sopenharmony_ci#endif