summaryrefslogtreecommitdiff
path: root/src/services/battery-service.h
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2024-05-06 13:42:55 +0200
committerHannes Schulze <haschu0103@outlook.de>2024-05-06 14:33:54 +0200
commit37d5ef75306c45ca95550f4af40d9750c5b9cb88 (patch)
tree7125c8e8445eeecb86097bc99bb2d1febfb7e2a5 /src/services/battery-service.h
initial commit
yup, i definitely wrote all of this in a single commit
Diffstat (limited to 'src/services/battery-service.h')
-rw-r--r--src/services/battery-service.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/services/battery-service.h b/src/services/battery-service.h
new file mode 100644
index 0000000..9813679
--- /dev/null
+++ b/src/services/battery-service.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define FOOBAR_TYPE_BATTERY_STATE foobar_battery_state_get_type( )
+#define FOOBAR_TYPE_BATTERY_SERVICE foobar_battery_service_get_type( )
+
+typedef struct _FoobarBatteryState FoobarBatteryState;
+
+GType foobar_battery_state_get_type ( void );
+FoobarBatteryState* foobar_battery_state_new ( void );
+FoobarBatteryState* foobar_battery_state_copy ( FoobarBatteryState const* self );
+void foobar_battery_state_free ( FoobarBatteryState* self );
+gboolean foobar_battery_state_equal ( FoobarBatteryState const* a,
+ FoobarBatteryState const* b );
+gboolean foobar_battery_state_is_charging ( FoobarBatteryState const* self );
+gboolean foobar_battery_state_is_charged ( FoobarBatteryState const* self );
+gint foobar_battery_state_get_percentage ( FoobarBatteryState const* self );
+gint foobar_battery_state_get_time_remaining( FoobarBatteryState const* self );
+void foobar_battery_state_set_charging ( FoobarBatteryState* self,
+ gboolean value );
+void foobar_battery_state_set_charged ( FoobarBatteryState* self,
+ gboolean value );
+void foobar_battery_state_set_percentage ( FoobarBatteryState* self,
+ gint value );
+void foobar_battery_state_set_time_remaining( FoobarBatteryState* self,
+ gint value );
+
+G_DECLARE_FINAL_TYPE( FoobarBatteryService, foobar_battery_service, FOOBAR, BATTERY_SERVICE, GObject )
+
+FoobarBatteryService* foobar_battery_service_new ( void );
+FoobarBatteryState const* foobar_battery_service_get_state( FoobarBatteryService* self );
+
+G_END_DECLS \ No newline at end of file