![]() |
dbus-cxx
|
Represents a DBus Error message. More...
#include <errormessage.h>

Public Member Functions | |
| std::string | name () const |
| void | set_name (const std::string &n) |
| std::string | message () const |
| void | set_message (const std::string &message) |
| bool | operator== (const ErrorMessage &) const |
| virtual MessageType | type () const |
| bool | set_reply_serial (uint32_t) |
| uint32_t | reply_serial () const |
| void | throw_error () |
| Throw the error associated with this ErrorMessage. More... | |
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 |
| virtual MessageType | type () const =0 |
| 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< ErrorMessage > | create () |
| static std::shared_ptr< ErrorMessage > | create (std::shared_ptr< const CallMessage > callMessage, const std::string &name, const std::string &message) |
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 | |
| ErrorMessage () | |
| ErrorMessage (std::shared_ptr< const CallMessage > callMessage, const std::string &name, const std::string &message) | |
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 Error message.
This class inherits from Message and uses the dbus_message_* methods to create an interface for an error message.
|
protected |
Referenced by create().
|
protected |
|
static |
References ErrorMessage().
Referenced by DBus::CallMessage::create_error_reply(), DBus::Message::create_from_data(), and DBus::Connection::process_call_message().
|
static |
References ErrorMessage(), message(), and name().
| std::string DBus::ErrorMessage::message | ( | ) | const |
References DBus::Message::begin(), DBus::Message::header_field(), retval, DBus::SIGNATURE, DBus::Signature, DBus::Message::signature(), DBus::STRING, and value.
Referenced by create(), ErrorMessage(), operator==(), set_message(), and throw_error().
| std::string DBus::ErrorMessage::name | ( | ) | const |
References DBus::Error_Name, DBus::Message::header_field(), DBus::STRING, DBus::Variant::to_string(), and DBus::Variant::type().
Referenced by create(), ErrorMessage(), operator==(), and throw_error().
| bool DBus::ErrorMessage::operator== | ( | const ErrorMessage & | m | ) | const |
| uint32_t DBus::ErrorMessage::reply_serial | ( | ) | const |
| void DBus::ErrorMessage::set_message | ( | const std::string & | message | ) |
References DBus::Message::append(), DBus::Message::clear_sig_and_data(), and message().
| void DBus::ErrorMessage::set_name | ( | const std::string & | n | ) |
References DBus::Error_Name, and DBus::Message::set_header_field().
| bool DBus::ErrorMessage::set_reply_serial | ( | uint32_t | s | ) |
References DBus::Reply_Serial, and DBus::Message::set_header_field().
| void DBus::ErrorMessage::throw_error | ( | ) |
Throw the error associated with this ErrorMessage.
If this error is of a well-known type, the well-known type will be thrown. Otherwise, a generic DBus::Error will be thrown.
References DBUS_ERROR_CHECK, DBUSCXX_ERROR_ACCESS_DENIED, DBUSCXX_ERROR_ADDRESS_IN_USE, DBUSCXX_ERROR_AUTH_FAILED, DBUSCXX_ERROR_BAD_ADDRESS, DBUSCXX_ERROR_DISCONNECTED, DBUSCXX_ERROR_FAILED, DBUSCXX_ERROR_FILE_EXISTS, DBUSCXX_ERROR_FILE_NOT_FOUND, DBUSCXX_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED, DBUSCXX_ERROR_INVALID_ARGS, DBUSCXX_ERROR_IO_ERROR, DBUSCXX_ERROR_LIMITS_EXCEEDED, DBUSCXX_ERROR_MATCH_RULE_INVALID, DBUSCXX_ERROR_MATCH_RULE_NOT_FOUND, DBUSCXX_ERROR_NAME_HAS_NO_OWNER, DBUSCXX_ERROR_NO_NETWORK, DBUSCXX_ERROR_NO_REPLY, DBUSCXX_ERROR_NO_SERVER, DBUSCXX_ERROR_NOT_SUPPORTED, DBUSCXX_ERROR_PROPERTY_READ_ONLY, DBUSCXX_ERROR_SERVICE_UNKNOWN, DBUSCXX_ERROR_TIMED_OUT, DBUSCXX_ERROR_TIMEOUT, DBUSCXX_ERROR_UNKNOWN_INTERFACE, DBUSCXX_ERROR_UNKNOWN_METHOD, DBUSCXX_ERROR_UNKNOWN_OBJECT, DBUSCXX_ERROR_UNKNOWN_PROPERTY, message(), and name().
|
virtual |
Implements DBus::Message.
References DBus::ERROR.