summaryrefslogtreecommitdiff
path: root/src/services/bluetooth-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/bluetooth-service.h
initial commit
yup, i definitely wrote all of this in a single commit
Diffstat (limited to 'src/services/bluetooth-service.h')
-rw-r--r--src/services/bluetooth-service.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/services/bluetooth-service.h b/src/services/bluetooth-service.h
new file mode 100644
index 0000000..05083f2
--- /dev/null
+++ b/src/services/bluetooth-service.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include <glib-object.h>
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+#define FOOBAR_TYPE_BLUETOOTH_DEVICE_STATE foobar_bluetooth_device_state_get_type( )
+#define FOOBAR_TYPE_BLUETOOTH_DEVICE foobar_bluetooth_device_get_type( )
+#define FOOBAR_TYPE_BLUETOOTH_ADAPTER foobar_bluetooth_adapter_get_type( )
+#define FOOBAR_TYPE_BLUETOOTH_SERVICE foobar_bluetooth_service_get_type( )
+
+typedef enum
+{
+ FOOBAR_BLUETOOTH_DEVICE_STATE_DISCONNECTED,
+ FOOBAR_BLUETOOTH_DEVICE_STATE_CONNECTING,
+ FOOBAR_BLUETOOTH_DEVICE_STATE_CONNECTED,
+} FoobarBluetoothDeviceState;
+
+GType foobar_bluetooth_device_state_get_type( void );
+
+G_DECLARE_FINAL_TYPE( FoobarBluetoothDevice, foobar_bluetooth_device, FOOBAR, BLUETOOTH_DEVICE, GObject )
+
+gchar const* foobar_bluetooth_device_get_name ( FoobarBluetoothDevice* self );
+FoobarBluetoothDeviceState foobar_bluetooth_device_get_state ( FoobarBluetoothDevice* self );
+void foobar_bluetooth_device_toggle_connection( FoobarBluetoothDevice* self );
+
+G_DECLARE_FINAL_TYPE( FoobarBluetoothService, foobar_bluetooth_service, FOOBAR, BLUETOOTH_SERVICE, GObject )
+
+FoobarBluetoothService* foobar_bluetooth_service_new ( void );
+GListModel* foobar_bluetooth_service_get_devices ( FoobarBluetoothService* self );
+GListModel* foobar_bluetooth_service_get_connected_devices( FoobarBluetoothService* self );
+gboolean foobar_bluetooth_service_is_available ( FoobarBluetoothService* self );
+gboolean foobar_bluetooth_service_is_enabled ( FoobarBluetoothService* self );
+gboolean foobar_bluetooth_service_is_scanning ( FoobarBluetoothService* self );
+void foobar_bluetooth_service_set_enabled ( FoobarBluetoothService* self,
+ gboolean value );
+void foobar_bluetooth_service_set_scanning ( FoobarBluetoothService* self,
+ gboolean value );
+
+G_END_DECLS \ No newline at end of file