From 481c1b6f2ea85acf9f283c8a2436a4a120bd37c5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Sep 2023 09:53:57 +0200 Subject: [PATCH] lib/dbus/ReadIter: add method GetBool() --- src/lib/dbus/ReadIter.hxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/dbus/ReadIter.hxx b/src/lib/dbus/ReadIter.hxx index 274adccf6..8a31a1745 100644 --- a/src/lib/dbus/ReadIter.hxx +++ b/src/lib/dbus/ReadIter.hxx @@ -41,6 +41,12 @@ public: dbus_message_iter_get_basic(&iter, value); } + bool GetBool() noexcept { + dbus_bool_t value; + GetBasic(&value); + return value; + } + const char *GetString() noexcept { const char *value; GetBasic(&value);