# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
DBus::ObjectAdaptor Class Reference

`#include <object.h>`

Inheritance diagram for DBus::ObjectAdaptor:

## Classes

class | Continuation
struct | Private

## Public Member Functions

| ObjectAdaptor (Connection &conn, const Path &path)
| ~ObjectAdaptor ()
const ObjectAdaptor * | object () const
Public Member Functions inherited from DBus::Object
virtual | ~Object ()
const DBus::Path & | path () const
const std::string & | service () const
Connection & | conn ()
void | set_timeout (int new_timeout=-1)
int | get_timeout () const

## Static Public Member Functions

static ObjectAdaptor * | from_path (const Path &path)
static ObjectAdaptorPList | from_path_prefix (const std::string &prefix)
static ObjectPathList | child_nodes_from_prefix (const std::string &prefix)

## Protected Member Functions

void | return_later (const Tag *tag)
void | return_now (Continuation *ret)
void | return_error (Continuation *ret, const Error error)
Continuation * | find_continuation (const Tag *tag)
Protected Member Functions inherited from DBus::Object
| Object (Connection &conn, const Path &path, const char *service)
Protected Member Functions inherited from DBus::AdaptorBase
InterfaceAdaptor * | find_interface (const std::string &name)
virtual | ~AdaptorBase ()

## Private Types

typedef std::map< const Tag *, Continuation * > | ContinuationMap

## Private Member Functions

void | _emit_signal (SignalMessage &)
bool | handle_message (const Message &)
void | register_obj ()
void | unregister_obj (bool throw_on_error=true)

## Private Attributes

ContinuationMap | _continuations

## Friends

struct | Private

## Additional Inherited Members

Protected Attributes inherited from DBus::AdaptorBase
InterfaceAdaptorTable | _interfaces

## Detailed Description

Definition at line 116 of file object.h.

## Member Typedef Documentation

## ◆ ContinuationMap

typedef std::map<const Tag *, Continuation *> DBus::ObjectAdaptor::ContinuationMap

private

Definition at line 174 of file object.h.

## Constructor & Destructor Documentation

## ◆ ObjectAdaptor()

ObjectAdaptor::ObjectAdaptor | ( | Connection & | conn,
|  | const Path & | path )

Definition at line 159 of file object.cpp.

References DBus::Object::conn(), DBus::Object::Object(), DBus::Object::path(), and register_obj().

Referenced by from_path(), DBus::ObjectAdaptor::Private::message_function_stub(), and object().

## ◆ ~ObjectAdaptor()

ObjectAdaptor::~ObjectAdaptor | ( |  | ) |

Definition at line 165 of file object.cpp.

References unregister_obj().

## Member Function Documentation

## ◆ _emit_signal()

void ObjectAdaptor::_emit_signal | ( | SignalMessage & | sig | ) |

private virtual

Implements DBus::AdaptorBase.

Definition at line 191 of file object.cpp.

References DBus::Object::conn(), DBus::Object::path(), DBus::SignalMessage::path(), and DBus::Connection::send().

## ◆ child_nodes_from_prefix()

ObjectPathList ObjectAdaptor::child_nodes_from_prefix | ( | const std::string & | prefix | ) |

static

Definition at line 134 of file object.cpp.

References _adaptor_table.

Referenced by DBus::IntrospectableAdaptor::Introspect().

## ◆ find_continuation()

ObjectAdaptor::Continuation * ObjectAdaptor::find_continuation | ( | const Tag * | tag | ) |

protected

Definition at line 274 of file object.cpp.

References _continuations.

## ◆ from_path()

ObjectAdaptor * ObjectAdaptor::from_path | ( | const Path & | path | ) |

static

Definition at line 105 of file object.cpp.

References _adaptor_table, ObjectAdaptor(), and DBus::Object::path().

## ◆ from_path_prefix()

ObjectAdaptorPList ObjectAdaptor::from_path_prefix | ( | const std::string & | prefix | ) |

static

Definition at line 115 of file object.cpp.

References _adaptor_table.

## ◆ handle_message()

bool ObjectAdaptor::handle_message | ( | const Message & | msg | ) |

private virtual

Implements DBus::Object.

Definition at line 203 of file object.cpp.

References _continuations, DBus::Object::conn(), DBus::debug_log, DBus::InterfaceAdaptor::dispatch_method(), DBus::AdaptorBase::find_interface(), DBus::CallMessage::member(), DBus::Error::message(), DBus::Error::name(), DBus::Connection::send(), ReturnLaterError::tag, and DBus::Message::type().

Referenced by DBus::ObjectAdaptor::Private::message_function_stub().

## ◆ object()

const ObjectAdaptor * DBus::ObjectAdaptor::object | ( |  | ) | const

inline virtual

Implements DBus::AdaptorBase.

Definition at line 180 of file object.h.

References ObjectAdaptor().

## ◆ register_obj()

void ObjectAdaptor::register_obj | ( |  | ) |

private virtual

Implements DBus::Object.

Definition at line 170 of file object.cpp.

References _adaptor_table, _vtable, DBus::Object::conn(), DBus::debug_log, and DBus::Object::path().

Referenced by ObjectAdaptor().

## ◆ return_error()

void ObjectAdaptor::return_error | ( | Continuation * | ret,
|  | const Error | error )

protected

Definition at line 263 of file object.cpp.

References DBus::ObjectAdaptor::Continuation::_call, DBus::ObjectAdaptor::Continuation::_conn, _continuations, DBus::ObjectAdaptor::Continuation::_tag, DBus::Error::message(), DBus::Error::name(), and DBus::Connection::send().

## ◆ return_later()

void ObjectAdaptor::return_later | ( | const Tag * | tag | ) |

protected

Definition at line 246 of file object.cpp.

## ◆ return_now()

void ObjectAdaptor::return_now | ( | Continuation * | ret | ) |

protected

Definition at line 252 of file object.cpp.

References DBus::ObjectAdaptor::Continuation::_conn, _continuations, DBus::ObjectAdaptor::Continuation::_return, DBus::ObjectAdaptor::Continuation::_tag, and DBus::Connection::send().

## ◆ unregister_obj()

void ObjectAdaptor::unregister_obj | ( | bool | throw_on_error = true | ) |

private virtual

Implements DBus::Object.

Definition at line 182 of file object.cpp.

References _adaptor_table, DBus::Object::conn(), DBus::debug_log, and DBus::Object::path().

Referenced by ~ObjectAdaptor().

## Friends And Related Symbol Documentation

## ◆ Private

friend struct Private

friend

Definition at line 177 of file object.h.

## Member Data Documentation

## ◆ _continuations

ContinuationMap DBus::ObjectAdaptor::_continuations

private

Definition at line 175 of file object.h.

Referenced by find_continuation(), handle_message(), return_error(), and return_now().

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

- object.h
- object.cpp