forked from Kistler-Group/sdbus-cpp
feat: add cookie-related API to Message (#491)
Add `Message::getCookie()` and `MethodReply::getReplyCookie()` functions, based on underlying sd-bus cookie functions. They can be useful when pairing method call messages and method call reply messages. --------- Co-authored-by: Dylan Howey <dylan.howey@evgo.com> Co-authored-by: Stanislav Angelovič <stanislav.angelovic@protonmail.com>
This commit is contained in:
co-authored by
Dylan Howey
Stanislav Angelovič
parent
4389ea39bf
commit
6212b12159
@@ -215,6 +215,7 @@ namespace sdbus {
|
||||
const char* getSender() const;
|
||||
const char* getPath() const;
|
||||
const char* getDestination() const;
|
||||
uint64_t getCookie() const;
|
||||
// TODO: short docs in whole Message API
|
||||
std::pair<char, const char*> peekType() const;
|
||||
bool isValid() const;
|
||||
@@ -296,6 +297,7 @@ namespace sdbus {
|
||||
public:
|
||||
MethodReply() = default;
|
||||
void send() const;
|
||||
uint64_t getReplyCookie() const;
|
||||
};
|
||||
|
||||
class Signal : public Message
|
||||
|
||||
Reference in New Issue
Block a user