[gnome-bluetooth/wip/hadess/battery-reporting: 8/11] lib: Add BluetoothBatteryType enum




commit f62e6e7551b59d918368d4706306c2a1ceb24c5d
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Jan 23 13:27:51 2022 +0100

    lib: Add BluetoothBatteryType enum

 .../libgnome-bluetooth/gnome-bluetooth-sections.txt        |  1 +
 lib/bluetooth-enums.h                                      | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
---
diff --git a/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt 
b/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
index 5b38d08a..93bcccb0 100644
--- a/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
+++ b/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
@@ -23,6 +23,7 @@ bluetooth_client_get_type
 BLUETOOTH_TYPE_AUDIO
 BLUETOOTH_TYPE_INPUT
 BluetoothType
+BluetoothBatteryType
 </SECTION>
 
 <SECTION>
diff --git a/lib/bluetooth-enums.h b/lib/bluetooth-enums.h
index 2105786f..9bbe2dad 100644
--- a/lib/bluetooth-enums.h
+++ b/lib/bluetooth-enums.h
@@ -98,3 +98,17 @@ typedef enum {
  * Use this value to select any Bluetooth audio device where a #BluetoothType enum is required.
  */
 #define BLUETOOTH_TYPE_AUDIO (BLUETOOTH_TYPE_HEADSET | BLUETOOTH_TYPE_HEADPHONES | 
BLUETOOTH_TYPE_OTHER_AUDIO | BLUETOOTH_TYPE_SPEAKERS)
+
+/**
+ * BluetoothBatteryType:
+ * @BLUETOOTH_BATTERY_TYPE_NONE: no battery reporting
+ * @BLUETOOTH_BATTERY_TYPE_PERCENTAGE: battery reported in percentage
+ * @BLUETOOTH_BATTERY_TYPE_COARSE: battery reported coarsely
+ *
+ * The type of battery reporting supported by the device.
+ **/
+typedef enum {
+       BLUETOOTH_BATTERY_TYPE_NONE,
+       BLUETOOTH_BATTERY_TYPE_PERCENTAGE,
+       BLUETOOTH_BATTERY_TYPE_COARSE
+} BluetoothBatteryType;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]