diff options
Diffstat (limited to 'include/swaybar')
-rw-r--r-- | include/swaybar/tray/dbus.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/swaybar/tray/dbus.h b/include/swaybar/tray/dbus.h index 51754464..125ce96f 100644 --- a/include/swaybar/tray/dbus.h +++ b/include/swaybar/tray/dbus.h | |||
@@ -12,6 +12,23 @@ extern DBusConnection *conn; | |||
12 | bool dbus_message_iter_check_signature(DBusMessageIter *iter, const char *sig); | 12 | bool dbus_message_iter_check_signature(DBusMessageIter *iter, const char *sig); |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * Fetches the property and calls `callback` with a message iter pointing it. | ||
16 | * Performs error handling and signature checking. | ||
17 | * | ||
18 | * Returns: true if message is successfully sent (will not necessarily arrive) | ||
19 | * and false otherwise | ||
20 | * | ||
21 | * NOTE: `expected_signature` must remain valid until the message reply is | ||
22 | * received, please only use 'static signatures. | ||
23 | */ | ||
24 | bool dbus_get_prop_async(const char *destination, | ||
25 | const char *path, | ||
26 | const char *iface, | ||
27 | const char *prop, | ||
28 | const char *expected_signature, | ||
29 | void(*callback)(DBusMessageIter *iter, void *data), | ||
30 | void *data); | ||
31 | /** | ||
15 | * Should be called in main loop to dispatch events | 32 | * Should be called in main loop to dispatch events |
16 | */ | 33 | */ |
17 | void dispatch_dbus(); | 34 | void dispatch_dbus(); |