[gnome-bluetooth/wip/hadess/lib-changes: 24/24] XXX lib: Add device-added signal
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/lib-changes: 24/24] XXX lib: Add device-added signal
- Date: Fri, 26 Nov 2021 15:29:56 +0000 (UTC)
commit 4a885024fd6b875a7b177425b1cff79827738115
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 26 13:28:35 2021 +0100
XXX lib: Add device-added signal
lib/bluetooth-client.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 0a251483..8137e7cd 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -77,6 +77,7 @@ enum {
};
enum {
+ DEVICE_ADDED,
DEVICE_REMOVED,
LAST_SIGNAL
};
@@ -1114,6 +1115,23 @@ static void bluetooth_client_class_init(BluetoothClientClass *klass)
object_class->get_property = bluetooth_client_get_property;
object_class->set_property = bluetooth_client_set_property;
+ /**
+ * BluetoothClient::device-added:
+ * @client: a #BluetoothClient object which received the signal
+ * @device: a #BluetoothDevice object
+ *
+ * The #BluetoothClient::device-added signal is launched when a
+ * device gets added to the model.
+ **/
+ signals[DEVICE_ADDED] =
+ g_signal_new ("device-added",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, G_TYPE_OBJECT);
+
/**
* BluetoothClient::device-removed:
* @client: a #BluetoothClient object which received the signal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]