Represents a DBus call message. More...
#include <callmessage.h>
Public Member Functions | |
std::shared_ptr< ReturnMessage > | create_reply () const |
Create a reply to this call message. More... | |
std::shared_ptr< ErrorMessage > | create_error_reply () const |
Create an error reply to this message. More... | |
void | set_path (const std::string &p) |
Path | path () const |
void | set_interface (const std::string &i) |
std::string | interface_name () const |
void | set_member (const std::string &m) |
std::string | member () const |
void | set_no_reply (bool no_reply=true) |
bool | expects_reply () const |
virtual MessageType | type () const |
Public Member Functions inherited from DBus::Message | |
virtual | ~Message () |
bool | operator== (const Message &other) |
bool | is_valid () const |
void | invalidate () |
operator bool () const | |
uint32_t | serial () const |
void | set_auto_start (bool auto_start) |
bool | auto_start () |
Returns true if the bus is allowed to start an owner for this message's destination if it is not running. More... | |
bool | set_destination (const std::string &s) |
Set the destination of this message. More... | |
std::string | destination () const |
std::string | sender () const |
Signature | signature () const |
template<typename T > | |
MessageIterator | operator>> (T &value) const |
template<typename T > | |
MessageAppendIterator | operator<< (const T &value) |
MessageIterator | begin () const |
MessageIterator | end () const |
MessageAppendIterator | append () |
bool | serialize_to_vector (std::vector< uint8_t > *vec, uint32_t serial) const |
Serialize this message to the given vector. More... | |
Variant | header_field (MessageHeaderFields field) const |
Returns the given header field(if it exists), otherwise returns a default constructed variant. More... | |
uint8_t | flags () const |
The message flags, as the marshaled byte. More... | |
Variant | set_header_field (MessageHeaderFields field, Variant value) |
Set the given header field. More... | |
Endianess | endianess () const |
const std::vector< int > & | filedescriptors () const |
Static Public Member Functions | |
static std::shared_ptr< CallMessage > | create () |
static std::shared_ptr< CallMessage > | create (const std::string &dest, const std::string &path, const std::string &iface, const std::string &method) |
static std::shared_ptr< CallMessage > | create (const std::string &path, const std::string &iface, const std::string &method) |
static std::shared_ptr< CallMessage > | create (const std::string &path, const std::string &method) |
Static Public Member Functions inherited from DBus::Message | |
static std::shared_ptr< Message > | create_from_data (uint8_t *data, uint32_t data_len, std::vector< int > fds=std::vector< int >()) |
Protected Member Functions | |
CallMessage () | |
CallMessage (const std::string &dest, const std::string &path, const std::string &iface, const std::string &method) | |
CallMessage (const std::string &path, const std::string &iface, const std::string &method) | |
CallMessage (const std::string &path, const std::string &method) | |
Protected Member Functions inherited from DBus::Message | |
Message () | |
void | append_signature (std::string toappend) |
void | clear_sig_and_data () |
Clears the signature and the data, so you can re-append data. More... | |
void | set_flags (uint8_t flags) |
Represents a DBus call message.
When this message is received, a matching exported method is called if found. Depending on the result, either the response or an error must be sent back to the sender. The reply should be created with either create_reply() or create_error_reply() depending on the type of error that should be returned.
|
protected |
Referenced by create().
|
protected |
References path(), DBus::Message::set_destination(), set_interface(), set_member(), set_path(), and SIMPLELOGGER_DEBUG.
|
protected |
References path(), set_interface(), set_member(), and set_path().
|
protected |
References path(), set_member(), and set_path().
|
static |
|
static |
References CallMessage(), and path().
|
static |
References CallMessage(), and path().
|
static |
References CallMessage(), and path().
std::shared_ptr< ErrorMessage > DBus::CallMessage::create_error_reply | ( | ) | const |
Create an error reply to this message.
If no reply is expected, this will return a valid pointer, but an invalid ErrorMessage so that the reply can be built but will be dropped before it gets sent out.
References DBus::ErrorMessage::create(), DBUSCXX_MESSAGE_NO_REPLY_EXPECTED, DBus::Message::flags(), DBus::Message::is_valid(), DBus::Message::sender(), and DBus::Message::serial().
std::shared_ptr< ReturnMessage > DBus::CallMessage::create_reply | ( | ) | const |
Create a reply to this call message.
If no reply is expected, this will return a valid pointer, but an invalid ReturnMessage so that the reply can be built but will be dropped before it gets sent out.
References DBus::ReturnMessage::create(), DBUSCXX_MESSAGE_NO_REPLY_EXPECTED, DBus::Message::flags(), DBus::Message::is_valid(), DBus::Message::sender(), and DBus::Message::serial().
bool DBus::CallMessage::expects_reply | ( | ) | const |
References DBUSCXX_MESSAGE_NO_REPLY_EXPECTED, and DBus::Message::flags().
std::string DBus::CallMessage::interface_name | ( | ) | const |
std::string DBus::CallMessage::member | ( | ) | const |
References DBus::Message::header_field(), DBus::Member, and DBus::STRING.
Path DBus::CallMessage::path | ( | ) | const |
References DBus::Message::header_field(), DBus::OBJECT_PATH, DBus::Path, DBus::Variant::to_path(), and DBus::Variant::type().
Referenced by CallMessage(), and create().
void DBus::CallMessage::set_interface | ( | const std::string & | i | ) |
References DBus::Interface, and DBus::Message::set_header_field().
Referenced by CallMessage().
void DBus::CallMessage::set_member | ( | const std::string & | m | ) |
References DBus::Member, and DBus::Message::set_header_field().
Referenced by CallMessage().
void DBus::CallMessage::set_no_reply | ( | bool | no_reply = true | ) |
void DBus::CallMessage::set_path | ( | const std::string & | p | ) |
References DBus::Path, and DBus::Message::set_header_field().
Referenced by CallMessage().
|
virtual |
Implements DBus::Message.
References DBus::CALL.