WvStreams
Public Member Functions | Static Public Member Functions | Protected Attributes
WvDBusError Class Reference
Inheritance diagram for WvDBusError:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WvDBusError (WvDBusMsg &in_reply_to, WvStringParm errname, WvStringParm message)
 WvDBusError (WvDBusMsg &in_reply_to, WvStringParm errname, WVSTRING_FORMAT_DECL)
 operator DBusMessage * () const
void marshal (WvBuf &buf)
 Locks this message, encodes it in DBus binary protocol format, and adds it to the given buffer.
WvString get_sender () const
WvString get_dest () const
WvString get_path () const
WvString get_interface () const
WvString get_member () const
WvString get_error () const
uint32_t get_serial () const
uint32_t get_replyserial () const
bool is_reply () const
 operator WvString () const
void get_arglist (WvStringList &list) const
WvString get_argstr () const
WvDBusMsgappend (const char *s)
 The following methods are designed to allow appending various arguments to the message.
WvDBusMsgappend (bool b)
WvDBusMsgappend (signed char c)
WvDBusMsgappend (unsigned char c)
WvDBusMsgappend (int16_t i)
WvDBusMsgappend (uint16_t i)
WvDBusMsgappend (int32_t i)
WvDBusMsgappend (uint32_t i)
WvDBusMsgappend (int64_t i)
WvDBusMsgappend (uint64_t i)
WvDBusMsgappend (double d)
WvDBusMsgvariant_start (WvStringParm element_type)
 Start a variant.
WvDBusMsgvariant_end ()
 End a variant.
WvDBusMsgstruct_start (WvStringParm element_type)
 Start a struct.
WvDBusMsgstruct_end ()
 End a struct started with struct_start().
WvDBusMsgarray_start (WvStringParm element_type)
 Start an array.
WvDBusMsgarray_end ()
 End an array started with array_start().
WvDBusMsgvarray_start (WvStringParm element_type)
 Start a variant-array.
WvDBusMsgvarray_end ()
 End an array started with array_start().
WvDBusMsg reply ()
 Generate a message that will be a reply to this one.
bool iserror () const
 Return true if this message is an error response.
void send (WvDBusConn &conn)
 A shortcut for sending this message on the given connection.

Static Public Member Functions

static WvDBusMsgdemarshal (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 be in the buffer in order for it to contain a whole message.

Protected Attributes

DBusMessagemsg
WvList< DBusMessageIter > itlist

Detailed Description

Definition at line 306 of file wvdbusmsg.h.


Member Function Documentation

WvDBusMsg * WvDBusMsg::demarshal ( WvBuf buf) [static, inherited]

Demarshals a new WvDBusMsg from a buffer containing its binary DBus protocol representation.

You're responsible for freeing the object when done. Returns NULL if the object can't be extracted from the buffer. (Implementation in wvdbusmarshal.cc)

Definition at line 14 of file wvdbusmarshal.cc.

References WvBufBaseCommonImpl< T >::get(), WvBufBaseCommonImpl< T >::peek(), WvBufBaseCommonImpl< T >::used(), and WvDBusMsg::WvDBusMsg().

size_t WvDBusMsg::demarshal_bytes_needed ( WvBuf buf) [static, inherited]

Given a buffer containing what might be the header of a DBus message, checks how many bytes need to be in the buffer in order for it to contain a whole message.

If the return value is <= the number of bytes already in the buffer, then demarshal() will succeed (or the incoming message is corrupt). (Implementation in wvdbusmarshal.cc)

Definition at line 31 of file wvdbusmarshal.cc.

References WvBufBaseCommonImpl< T >::peek(), and WvBufBaseCommonImpl< T >::used().

void WvDBusMsg::marshal ( WvBuf buf) [inherited]

Locks this message, encodes it in DBus binary protocol format, and adds it to the given buffer.

This message becomes locked and can no longer be append()ed to. You can marshal it more than once, however (but it will always have the same serial number!!) (Implementation in wvdbusmarshal.cc)

Definition at line 38 of file wvdbusmarshal.cc.

Referenced by WvDBusConn::send().

WvDBusMsg & WvDBusMsg::struct_start ( WvStringParm  element_type) [inherited]

Start a struct.

Elements append()ed after this will be inside the struct, and you should be careful that you append the right types in the right order. Finish using struct_end().

Definition at line 580 of file wvdbusmsg.cc.

References WvList< T >::first(), and WvList< T >::prepend().

WvDBusMsg & WvDBusMsg::array_start ( WvStringParm  element_type) [inherited]

Start an array.

Elements append()ed after this will be inside the array. Finish using array_end().

Definition at line 597 of file wvdbusmsg.cc.

References WvList< T >::first(), and WvList< T >::prepend().

Referenced by WvDBusMsg::varray_start().

WvDBusMsg & WvDBusMsg::varray_start ( WvStringParm  element_type) [inherited]

Start a variant-array.

Elements append()ed after this will be inside the array. Finish using varray_end().

A variant-array is like an array, but is enclosed automatically inside a variant object. This is useful for arrays of arrays, where each inner array is of a different type.

Definition at line 614 of file wvdbusmsg.cc.

References WvDBusMsg::array_start(), and WvDBusMsg::variant_start().

void WvDBusMsg::send ( WvDBusConn conn) [inherited]

A shortcut for sending this message on the given connection.

Equivalent to conn.send(*this).

Definition at line 641 of file wvdbusmsg.cc.

References WvDBusConn::send().


The documentation for this class was generated from the following files: