AudioManager  7.6.6
Native Application Runtime Environment
am::CAmDbusWrapper Class Reference

This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins). More...

#include <CAmDbusWrapper.h>

Public Member Functions

 CAmDbusWrapper (CAmSocketHandler *socketHandler, DBusBusType type=DBUS_BUS_SESSION, const std::string &prefix=DBUS_SERVICE_PREFIX, const std::string &objectPath=DBUS_SERVICE_OBJECT_PATH)
 
virtual ~CAmDbusWrapper ()
 
void registerCallback (const DBusObjectPathVTable *vtable, const std::string &path, void *userdata, const std::string &prefix=DBUS_SERVICE_OBJECT_PATH)
 registers a callback that is entered as path below the main path. More...
 
void registerSignalWatch (DBusHandleMessageFunction handler, const std::string &rule, void *userdata)
 register signal watch callback to matching rule More...
 
void getDBusConnection (DBusConnection *&connection) const
 returns the dbus connection More...
 
void dbusPrepareCallback (const sh_pollHandle_t handle, void *userData)
 
bool dbusDispatchCallback (const sh_pollHandle_t handle, void *userData)
 
void dbusFireCallback (const pollfd pollfd, const sh_pollHandle_t handle, void *userData)
 
bool dbusCheckCallback (const sh_pollHandle_t handle, void *userData)
 
void dbusTimerCallback (sh_timerHandle_t handle, void *userData)
 

Static Public Member Functions

static dbus_bool_t addWatch (DBusWatch *watch, void *userData)
 
static void removeWatch (DBusWatch *watch, void *userData)
 
static void toogleWatch (DBusWatch *watch, void *userData)
 
static dbus_bool_t addTimeout (DBusTimeout *timeout, void *userData)
 
static void removeTimeout (DBusTimeout *timeout, void *userData)
 
static void toggleTimeout (DBusTimeout *timeout, void *userData)
 

Public Attributes

TAmShPollPrepare< CAmDbusWrapperpDbusPrepareCallback
 
TAmShPollDispatch< CAmDbusWrapperpDbusDispatchCallback
 
TAmShPollFired< CAmDbusWrapperpDbusFireCallback
 
TAmShPollCheck< CAmDbusWrapperpDbusCheckCallback
 
TAmShTimerCallBack< CAmDbusWrapperpDbusTimerCallback
 

Detailed Description

This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins).

Works on the basis of CAmSocketHandler

Definition at line 37 of file CAmDbusWrapper.h.

Constructor & Destructor Documentation

am::CAmDbusWrapper::CAmDbusWrapper ( CAmSocketHandler socketHandler,
DBusBusType  type = DBUS_BUS_SESSION,
const std::string &  prefix = DBUS_SERVICE_PREFIX,
const std::string &  objectPath = DBUS_SERVICE_OBJECT_PATH 
)

Definition at line 52 of file CAmDbusWrapper.cpp.

am::CAmDbusWrapper::~CAmDbusWrapper ( )
virtual

Definition at line 151 of file CAmDbusWrapper.cpp.

Member Function Documentation

dbus_bool_t am::CAmDbusWrapper::addTimeout ( DBusTimeout *  timeout,
void *  userData 
)
static

Definition at line 360 of file CAmDbusWrapper.cpp.

dbus_bool_t am::CAmDbusWrapper::addWatch ( DBusWatch *  watch,
void *  userData 
)
static

Definition at line 273 of file CAmDbusWrapper.cpp.

bool am::CAmDbusWrapper::dbusCheckCallback ( const sh_pollHandle_t  handle,
void *  userData 
)

Definition at line 440 of file CAmDbusWrapper.cpp.

bool am::CAmDbusWrapper::dbusDispatchCallback ( const sh_pollHandle_t  handle,
void *  userData 
)

Definition at line 427 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::dbusFireCallback ( const pollfd  pollfd,
const sh_pollHandle_t  handle,
void *  userData 
)

Definition at line 453 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::dbusPrepareCallback ( const sh_pollHandle_t  handle,
void *  userData 
)

Definition at line 477 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::dbusTimerCallback ( sh_timerHandle_t  handle,
void *  userData 
)

Definition at line 512 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::getDBusConnection ( DBusConnection *&  connection) const

returns the dbus connection

Parameters
connectionpointer to the connection

Definition at line 268 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::registerCallback ( const DBusObjectPathVTable *  vtable,
const std::string &  path,
void *  userdata,
const std::string &  prefix = DBUS_SERVICE_OBJECT_PATH 
)

registers a callback that is entered as path below the main path.

The configuration of the mainpath is done via DBusConfiguration.h

Parameters
vtablethe vtable that holds a pointer to the callback that is called when the path is called from the dbus
paththe name of the path
userdatapointer to the class that will handle the callback
prefixbefore the path which is optional

Definition at line 173 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::registerSignalWatch ( DBusHandleMessageFunction  handler,
const std::string &  rule,
void *  userdata 
)

register signal watch callback to matching rule

Parameters
handlerpointer to the callback function
rulesignal watch rule like "type='signal',interface='org.genivi.audiomanager.something'"
userdatauserdata

Definition at line 194 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::removeTimeout ( DBusTimeout *  timeout,
void *  userData 
)
static

Definition at line 393 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::removeWatch ( DBusWatch *  watch,
void *  userData 
)
static

Definition at line 309 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::toggleTimeout ( DBusTimeout *  timeout,
void *  userData 
)
static

Definition at line 420 of file CAmDbusWrapper.cpp.

void am::CAmDbusWrapper::toogleWatch ( DBusWatch *  watch,
void *  userData 
)
static

Definition at line 333 of file CAmDbusWrapper.cpp.

Member Data Documentation

TAmShPollCheck<CAmDbusWrapper> am::CAmDbusWrapper::pDbusCheckCallback

Definition at line 66 of file CAmDbusWrapper.h.

TAmShPollDispatch<CAmDbusWrapper> am::CAmDbusWrapper::pDbusDispatchCallback

Definition at line 60 of file CAmDbusWrapper.h.

TAmShPollFired<CAmDbusWrapper> am::CAmDbusWrapper::pDbusFireCallback

Definition at line 63 of file CAmDbusWrapper.h.

TAmShPollPrepare<CAmDbusWrapper> am::CAmDbusWrapper::pDbusPrepareCallback

Definition at line 57 of file CAmDbusWrapper.h.

TAmShTimerCallBack<CAmDbusWrapper> am::CAmDbusWrapper::pDbusTimerCallback

Definition at line 69 of file CAmDbusWrapper.h.


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