# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
DBus::MessageIter Class Reference

`#include <message.h>`

## Public Member Functions

| MessageIter ()
int | type ()
bool | at_end ()
bool | has_next ()
MessageIter & | operator++ ()
MessageIter | operator++ (int)
bool | append_byte (unsigned char byte)
unsigned char | get_byte ()
bool | append_bool (bool b)
bool | get_bool ()
bool | append_int16 (signed short i)
signed short | get_int16 ()
bool | append_uint16 (unsigned short u)
unsigned short | get_uint16 ()
bool | append_int32 (signed int i)
signed int | get_int32 ()
bool | append_uint32 (unsigned int u)
unsigned int | get_uint32 ()
bool | append_int64 (signed long long i)
signed long long | get_int64 ()
bool | append_uint64 (unsigned long long i)
unsigned long long | get_uint64 ()
bool | append_double (double d)
double | get_double ()
bool | append_string (const char *chars)
const char * | get_string ()
bool | append_path (const char *chars)
const char * | get_path ()
bool | append_signature (const char *chars)
const char * | get_signature ()
char * | signature () const
MessageIter | recurse ()
bool | append_array (char type, const void *ptr, size_t length)
int | array_type ()
int | get_array (void *ptr)
bool | is_array ()
bool | is_dict ()
MessageIter | new_array (const char *sig)
MessageIter | new_variant (const char *sig)
MessageIter | new_struct ()
MessageIter | new_dict_entry ()
void | close_container (MessageIter &container)
void | copy_data (MessageIter &to)
Message & | msg () const

## Private Member Functions

DXXAPILOCAL | MessageIter (Message &msg)
DXXAPILOCAL bool | append_basic (int type_id, void *value)
DXXAPILOCAL void | get_basic (int type_id, void *ptr)

## Private Attributes

unsigned char | _iter [sizeof(void *) *3+sizeof(int) *11]
Message * | _msg

## Friends

class | Message

## Detailed Description

Definition at line 44 of file message.h.

## Constructor & Destructor Documentation

## ◆ MessageIter() [1/2]

DBus::MessageIter::MessageIter | ( |  | ) |

inline

Definition at line 48 of file message.h.

Referenced by close_container(), copy_data(), new_array(), new_dict_entry(), new_struct(), new_variant(), operator++(), operator++(), and recurse().

## ◆ MessageIter() [2/2]

DXXAPILOCAL DBus::MessageIter::MessageIter | ( | Message & | msg | ) |

inline private

Definition at line 141 of file message.h.

References _msg, DXXAPILOCAL, Message, and msg().

## Member Function Documentation

## ◆ append_array()

bool MessageIter::append_array | ( | char | type,
|  | const void * | ptr,
|  | size_t | length )

Definition at line 239 of file message.cpp.

References _iter, and type().

Referenced by DBus::operator<<().

## ◆ append_basic()

bool MessageIter::append_basic | ( | int | type_id,
|  | void * | value )

private

Definition at line 69 of file message.cpp.

References _iter.

Referenced by append_bool(), append_byte(), append_double(), append_int16(), append_int32(), append_int64(), append_path(), append_signature(), append_string(), append_uint16(), append_uint32(), append_uint64(), and copy_data().

## ◆ append_bool()

bool MessageIter::append_bool | ( | bool | b | ) |

Definition at line 94 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_byte()

bool MessageIter::append_byte | ( | unsigned char | byte | ) |

Definition at line 82 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_double()

bool MessageIter::append_double | ( | double | d | ) |

Definition at line 186 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_int16()

bool MessageIter::append_int16 | ( | signed short | i | ) |

Definition at line 107 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_int32()

bool MessageIter::append_int32 | ( | signed int | i | ) |

Definition at line 131 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_int64()

bool MessageIter::append_int64 | ( | signed long long | i | ) |

Definition at line 162 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_path()

bool MessageIter::append_path | ( | const char * | chars | ) |

Definition at line 203 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_signature()

bool MessageIter::append_signature | ( | const char * | chars | ) |

Definition at line 215 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_string()

bool MessageIter::append_string | ( | const char * | chars | ) |

Definition at line 191 of file message.cpp.

References append_basic().

Referenced by DBus::IntrospectableAdaptor::Introspect(), and DBus::operator<<().

## ◆ append_uint16()

bool MessageIter::append_uint16 | ( | unsigned short | u | ) |

Definition at line 119 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_uint32()

bool MessageIter::append_uint32 | ( | unsigned int | u | ) |

Definition at line 143 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ append_uint64()

bool MessageIter::append_uint64 | ( | unsigned long long | i | ) |

Definition at line 174 of file message.cpp.

References append_basic().

Referenced by DBus::operator<<().

## ◆ array_type()

int MessageIter::array_type | ( |  | ) |

Definition at line 244 of file message.cpp.

References _iter.

Referenced by DBus::operator>>().

## ◆ at_end()

bool MessageIter::at_end | ( |  | ) |

Definition at line 46 of file message.cpp.

References type().

Referenced by DBus::operator>>(), and DBus::operator>>().

## ◆ close_container()

void MessageIter::close_container | ( | MessageIter & | container | ) |

Definition at line 302 of file message.cpp.

References _iter, and MessageIter().

Referenced by copy_data(), DBus::operator<<(), DBus::operator<<(), DBus::operator<<(), DBus::operator<<(), and DBus::operator<<().

## ◆ copy_data()

void MessageIter::copy_data | ( | MessageIter & | to | ) |

Definition at line 329 of file message.cpp.

References _iter, append_basic(), close_container(), copy_data(), DBus::debug_log, is_basic_type(), MessageIter(), msg(), and signature().

Referenced by copy_data(), DBus::operator<<(), DBus::operator>>(), and DBus::Variant::Variant().

## ◆ get_array()

int MessageIter::get_array | ( | void * | ptr | ) |

Definition at line 249 of file message.cpp.

References _iter.

Referenced by DBus::operator>>().

## ◆ get_basic()

void MessageIter::get_basic | ( | int | type_id,
|  | void * | ptr )

private

Definition at line 74 of file message.cpp.

References _iter, and type().

Referenced by get_bool(), get_byte(), get_double(), get_int16(), get_int32(), get_int64(), get_path(), get_signature(), get_string(), get_uint16(), get_uint32(), and get_uint64().

## ◆ get_bool()

bool MessageIter::get_bool | ( |  | ) |

Definition at line 100 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_byte()

unsigned char MessageIter::get_byte | ( |  | ) |

Definition at line 87 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_double()

double MessageIter::get_double | ( |  | ) |

Definition at line 179 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_int16()

signed short MessageIter::get_int16 | ( |  | ) |

Definition at line 112 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_int32()

signed int MessageIter::get_int32 | ( |  | ) |

Definition at line 136 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_int64()

signed long long MessageIter::get_int64 | ( |  | ) |

Definition at line 155 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_path()

const char * MessageIter::get_path | ( |  | ) |

Definition at line 208 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_signature()

const char * MessageIter::get_signature | ( |  | ) |

Definition at line 220 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_string()

const char * MessageIter::get_string | ( |  | ) |

Definition at line 196 of file message.cpp.

References get_basic().

Referenced by DBus::IntrospectableProxy::Introspect(), and DBus::operator>>().

## ◆ get_uint16()

unsigned short MessageIter::get_uint16 | ( |  | ) |

Definition at line 124 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_uint32()

unsigned int MessageIter::get_uint32 | ( |  | ) |

Definition at line 148 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ get_uint64()

unsigned long long MessageIter::get_uint64 | ( |  | ) |

Definition at line 167 of file message.cpp.

References get_basic().

Referenced by DBus::operator>>().

## ◆ has_next()

bool MessageIter::has_next | ( |  | ) |

Definition at line 51 of file message.cpp.

References _iter.

## ◆ is_array()

bool MessageIter::is_array | ( |  | ) |

Definition at line 256 of file message.cpp.

References _iter.

Referenced by is_dict(), DBus::operator>>(), and DBus::operator>>().

## ◆ is_dict()

bool MessageIter::is_dict | ( |  | ) |

Definition at line 261 of file message.cpp.

References _iter, and is_array().

Referenced by DBus::operator>>().

## ◆ msg()

Message & DBus::MessageIter::msg | ( |  | ) | const

inline

Definition at line 134 of file message.h.

References _msg, and Message.

Referenced by copy_data(), MessageIter(), new_array(), new_dict_entry(), new_struct(), new_variant(), and recurse().

## ◆ new_array()

MessageIter MessageIter::new_array | ( | const char * | sig | ) |

Definition at line 266 of file message.cpp.

References _iter, MessageIter(), and msg().

Referenced by DBus::operator<<(), DBus::operator<<(), and DBus::operator<<().

## ◆ new_dict_entry()

MessageIter MessageIter::new_dict_entry | ( |  | ) |

Definition at line 293 of file message.cpp.

References _iter, MessageIter(), and msg().

Referenced by DBus::operator<<().

## ◆ new_struct()

MessageIter MessageIter::new_struct | ( |  | ) |

Definition at line 284 of file message.cpp.

References _iter, MessageIter(), and msg().

Referenced by DBus::operator<<().

## ◆ new_variant()

MessageIter MessageIter::new_variant | ( | const char * | sig | ) |

Definition at line 275 of file message.cpp.

References _iter, MessageIter(), and msg().

Referenced by DBus::operator<<().

## ◆ operator++() [1/2]

MessageIter & MessageIter::operator++ | ( |  | ) |

Definition at line 56 of file message.cpp.

References _iter, and MessageIter().

## ◆ operator++() [2/2]

MessageIter MessageIter::operator++ | ( | int |  | ) |

Definition at line 62 of file message.cpp.

References MessageIter().

## ◆ recurse()

MessageIter MessageIter::recurse | ( |  | ) |

Definition at line 227 of file message.cpp.

References _iter, MessageIter(), and msg().

Referenced by DBus::operator>>(), DBus::operator>>(), DBus::operator>>(), DBus::operator>>(), DBus::operator>>(), and DBus::Variant::Variant().

## ◆ signature()

char * MessageIter::signature | ( |  | ) | const

Definition at line 234 of file message.cpp.

References _iter.

Referenced by copy_data(), and DBus::Variant::signature().

## ◆ type()

int MessageIter::type | ( |  | ) |

Definition at line 41 of file message.cpp.

References _iter.

Referenced by append_array(), at_end(), get_basic(), and DBus::operator>>().

## Friends And Related Symbol Documentation

## ◆ Message

friend class Message

friend

Definition at line 155 of file message.h.

References Message.

Referenced by Message, MessageIter(), and msg().

## Member Data Documentation

## ◆ _iter

unsigned char DBus::MessageIter::_iter[sizeof(void *) *3+sizeof(int) *11]

private

Definition at line 151 of file message.h.

Referenced by append_array(), append_basic(), array_type(), close_container(), copy_data(), get_array(), get_basic(), has_next(), is_array(), is_dict(), new_array(), new_dict_entry(), new_struct(), new_variant(), operator++(), DBus::Message::reader(), recurse(), signature(), type(), and DBus::Message::writer().

## ◆ _msg

Message* DBus::MessageIter::_msg

private

Definition at line 153 of file message.h.

Referenced by MessageIter(), and msg().

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

- message.h
- message.cpp