17#include "wvstringlist.h"
21struct DBusMessageIter;
52 operator DBusMessage* ()
const;
88 uint32_t get_serial()
const;
89 uint32_t get_replyserial()
const;
90 bool is_reply()
const;
179 DBusMessageIter *
const first, *
const it;
185 Iter(
const DBusMessageIter &_first);
223 {
next();
return *
this; }
251 operator int64_t()
const {
return get_int(); }
252 operator int32_t()
const {
return get_int(); }
253 operator int16_t()
const {
return get_int(); }
254 operator int8_t()
const {
return get_int(); }
255 operator bool()
const {
return get_int() != 0; }
262 operator uint64_t()
const {
return get_uint(); }
263 operator uint32_t()
const {
return get_uint(); }
264 operator uint16_t()
const {
return get_uint(); }
265 operator uint8_t()
const {
return get_uint(); }
272 operator double()
const {
return get_double(); }
273 operator float()
const {
return get_double(); }
286 mutable DBusMessage *msg;
301 DBusMessage *setup1(
WvDBusMsg &in_reply_to,
307 :
WvDBusMsg(setup1(in_reply_to, errname, message))
uint64_t get_uint() const
Get the current element as a uint64_t (possible for all integer types)
Iter open() const
Returns a sub-iterator for walking through recursive types, such as arrays, structs,...
bool next()
Moves the iterator along the list to point to the next element.
bool cur() const
Returns: true if the current link is valid.
int type() const
Returns the data type of the current element.
double get_double() const
Get the current element as a double (possible for all integer and floating point types)
WvString get_all()
Return a WvString representation of all elements in a single string.
Iter & getnext()
Same as next(), but returns *this instead so you can convert the new item to the right value type.
WvString get_str() const
Get the current element as a string (possible for all types).
WvString * ptr() const
Returns a pointer to the WvString at the iterator's current location.
void rewind()
Rewinds the iterator to make it point to an imaginary element preceeding the first element of the lis...
int64_t get_int() const
Get the current element as an int64_t (possible for all integer types)
WvDBusMsg reply()
Generate a message that will be a reply to this one.
void send(WvDBusConn &conn)
A shortcut for sending this message on the given connection.
WvDBusMsg & struct_start(WvStringParm element_type)
Start a struct.
WvDBusMsg & append(const char *s)
The following methods are designed to allow appending various arguments to the message.
WvDBusMsg & varray_start(WvStringParm element_type)
Start a variant-array.
WvDBusMsg & variant_end()
End a variant.
WvDBusMsg & struct_end()
End a struct started with struct_start().
static WvDBusMsg * demarshal(WvBuf &buf)
Demarshals a new WvDBusMsg from a buffer containing its binary DBus protocol representation.
static size_t demarshal_bytes_needed(WvBuf &buf)
Given a buffer containing what might be the header of a DBus message, checks how many bytes need to b...
WvDBusMsg & variant_start(WvStringParm element_type)
Start a variant.
bool iserror() const
Return true if this message is an error response.
void marshal(WvBuf &buf)
Locks this message, encodes it in DBus binary protocol format, and adds it to the given buffer.
WvDBusMsg & array_start(WvStringParm element_type)
Start an array.
WvDBusMsg & varray_end()
End an array started with array_start().
WvDBusMsg & array_end()
End an array started with array_start().
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
A linked list container class.
This is a WvList of WvStrings, and is a really handy way to parse strings.
WvString is an implementation of a simple and efficient printable-string class.