refactor: use sd-bus API to get current message

This commit is contained in:
Stanislav Angelovic authored and Stanislav Angelovič committed 2024-04-24 20:20:29 +02:00
1 parent c6afa26541
commit 9412940d1e
18 files changed
+125 -99

No files matched your search

+18
View File
@@ -36,6 +36,9 @@
struct sd_bus;
struct sd_event;
namespace sdbus {
class Message;
}
namespace sdbus {
@@ -209,6 +212,21 @@ namespace sdbus {
*/
virtual bool processPendingEvent() = 0;
/*!
* @brief Provides access to the currently processed D-Bus message
*
* This method provides access to the currently processed incoming D-Bus message.
* "Currently processed" means that the registered callback handler(s) for that message
* are being invoked. This method is meant to be called from within a callback handler
* (e.g. from a D-Bus signal handler, or async method reply handler, etc.). In such a case it is
* guaranteed to return a valid D-Bus message instance for which the handler is called.
* If called from other contexts/threads, it may return a valid or invalid message, depending
* on whether a message was processed or not at the time of the call.
*
* @return Currently processed D-Bus message
*/
virtual Message getCurrentlyProcessedMessage() const = 0;
/*!
* @brief Sets general method call timeout
*