#include <DBusMsg.h>
Public Member Functions | |
| DBusMsg () | |
| ~DBusMsg () | |
| DBusMsg (const DBusMsg &) | |
| DBusMsg & | operator= (const DBusMsg &) |
| void | createCall (const std::string &service, const std::string &object, const std::string &interface, const std::string &method) |
| void | createReply (const DBusMsg &m) |
| void | createError (const DBusMsg &m, const std::string &error_msg, const std::string &error_code=std::string(DBUS_ERROR_FAILED)) |
| bool | addString (const std::string &val) |
| bool | addInt64 (dbus_int64_t val) |
| bool | addInt32 (dbus_int32_t val) |
| bool | addBoolean (bool val) |
| bool | addDouble (double val) |
| bool | addYCPValue (const YCPValue &val) |
| YCPValue | getYCPValue (int index) |
| bool | isMethodCall (const std::string &interface, const std::string &method) const |
| int | arguments () const |
| int | type () const |
| bool | empty () const |
| DBusMessage * | getMessage () const |
| void | setMessage (DBusMessage *message) |
| std::string | interface () const |
| std::string | method () const |
| std::string | path () const |
| std::string | sender () const |
Private Member Functions | |
| bool | addValue (int type, void *data) |
| bool | addValue (int type, void *data, DBusMessageIter *i) |
| bool | addYCPValue (const YCPValue &v, DBusMessageIter *i) |
| bool | addYCPValueRaw (const YCPValue &val, DBusMessageIter *i) |
| void | release () |
| int | typeInt (const YCPValue &val) const |
| const char * | typeStr (const YCPValue &val) const |
| YCPValue | getYCPValue (DBusMessageIter *it) |
| YCPValue | getYCPValueRaw (DBusMessageIter *it, const std::string &ycp_type=std::string()) |
Private Attributes | |
| DBusMessage * | msg |
| DBusMsg::DBusMsg | ( | ) |
| DBusMsg::~DBusMsg | ( | ) |
References release().
| void DBusMsg::createCall | ( | const std::string & | service, | |
| const std::string & | object, | |||
| const std::string & | interface, | |||
| const std::string & | method | |||
| ) |
| void DBusMsg::createReply | ( | const DBusMsg & | m | ) |
| void DBusMsg::createError | ( | const DBusMsg & | m, | |
| const std::string & | error_msg, | |||
| const std::string & | error_code = std::string(DBUS_ERROR_FAILED) | |||
| ) |
| bool DBusMsg::addString | ( | const std::string & | val | ) |
| bool DBusMsg::addInt64 | ( | dbus_int64_t | val | ) |
References addValue().
| bool DBusMsg::addInt32 | ( | dbus_int32_t | val | ) |
References addValue().
| bool DBusMsg::addBoolean | ( | bool | val | ) |
References addValue().
| bool DBusMsg::addDouble | ( | double | val | ) |
References addValue().
| bool DBusMsg::addYCPValue | ( | const YCPValue & | val | ) |
References YCPElement::isNull(), msg, y2debug, and y2milestone.
Referenced by addYCPValueRaw(), and DBusServer::run().
| YCPValue DBusMsg::getYCPValue | ( | int | index | ) |
| bool DBusMsg::isMethodCall | ( | const std::string & | interface, | |
| const std::string & | method | |||
| ) | const |
References msg.
| int DBusMsg::arguments | ( | ) | const |
References msg, and y2milestone.
| int DBusMsg::type | ( | ) | const |
| bool DBusMsg::empty | ( | ) | const |
| DBusMessage * DBusMsg::getMessage | ( | ) | const |
| void DBusMsg::setMessage | ( | DBusMessage * | message | ) |
| std::string DBusMsg::interface | ( | ) | const |
References msg.
| std::string DBusMsg::method | ( | ) | const |
References msg.
| std::string DBusMsg::path | ( | ) | const |
References msg.
| std::string DBusMsg::sender | ( | ) | const |
References msg.
| bool DBusMsg::addValue | ( | int | type, | |
| void * | data | |||
| ) | [private] |
References msg.
Referenced by addBoolean(), addDouble(), addInt32(), addInt64(), addString(), and addYCPValueRaw().
| bool DBusMsg::addValue | ( | int | type, | |
| void * | data, | |||
| DBusMessageIter * | i | |||
| ) | [private] |
References msg.
| bool DBusMsg::addYCPValue | ( | const YCPValue & | v, | |
| DBusMessageIter * | i | |||
| ) | [private] |
References addYCPValueRaw(), YCPElement::isNull(), toString(), typeStr(), Type::vt2type(), and y2debug.
| bool DBusMsg::addYCPValueRaw | ( | const YCPValue & | val, | |
| DBusMessageIter * | i | |||
| ) | [private] |
References addValue(), addYCPValue(), YCPTerm::args(), YCPMap::begin(), YCPMap::end(), YCPTerm::name(), YCPList::size(), str, toString(), type(), typeInt(), YCPList::value(), Type::vt2type(), y2debug, and y2error.
Referenced by addYCPValue().
| void DBusMsg::release | ( | ) | [private] |
Referenced by createCall(), createError(), createReply(), DBusMsg(), operator=(), and ~DBusMsg().
| int DBusMsg::typeInt | ( | const YCPValue & | val | ) | const [private] |
| const char * DBusMsg::typeStr | ( | const YCPValue & | val | ) | const [private] |
References YCPMap::begin(), YCPElement::isNull(), YCPMapIterator::key(), YCPMap::size(), toString(), Type::vt2type(), y2error, and y2warning.
Referenced by addYCPValue().
| YCPValue DBusMsg::getYCPValue | ( | DBusMessageIter * | it | ) | [private] |
References getYCPValueRaw(), str, type(), y2debug, and y2error.
| YCPValue DBusMsg::getYCPValueRaw | ( | DBusMessageIter * | it, | |
| const std::string & | ycp_type = std::string() | |||
| ) | [private] |
References YCPMap::add(), YCPList::add(), getYCPValue(), YCPElement::isNull(), Parser::parse(), parser, Parser::setBuffered(), type(), y2debug, y2error, and y2warning.
Referenced by getYCPValue().
DBusMessage* DBusMsg::msg [private] |
Referenced by addValue(), addYCPValue(), arguments(), createCall(), createError(), createReply(), DBusMsg(), empty(), getMessage(), getYCPValue(), interface(), isMethodCall(), method(), operator=(), path(), release(), sender(), setMessage(), and type().
1.5.6