
* Added a --system command line option to dbusxx-introspect (to use the system bus) * Added a simple client-side example using HAL to demonstrate how to receive signals git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@8519 30a43799-04e7-0310-8b2b-ea0d24f86d0e
44 lines
839 B
C++
44 lines
839 B
C++
#ifndef __DEMO_HAL_LISTEN_H
|
|
#define __DEMO_HAL_LISTEN_H
|
|
|
|
#include <dbus-c++/dbus.h>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
class HalDeviceProxy;
|
|
|
|
class HalManagerProxy
|
|
: public DBus::InterfaceProxy,
|
|
public DBus::ObjectProxy
|
|
{
|
|
public:
|
|
|
|
HalManagerProxy( DBus::Connection& connection );
|
|
|
|
std::vector< DBus::String > GetAllDevices();
|
|
|
|
private:
|
|
|
|
void DeviceAddedCb( const DBus::SignalMessage& sig );
|
|
|
|
void DeviceRemovedCb( const DBus::SignalMessage& sig );
|
|
|
|
std::map< DBus::String, DBus::RefPtr< HalDeviceProxy > > _devices;
|
|
};
|
|
|
|
class HalDeviceProxy
|
|
: public DBus::InterfaceProxy,
|
|
public DBus::ObjectProxy
|
|
{
|
|
public:
|
|
|
|
HalDeviceProxy( DBus::Connection& connection, DBus::Path& udi );
|
|
|
|
private:
|
|
|
|
void PropertyModifiedCb( const DBus::SignalMessage& sig );
|
|
|
|
void ConditionCb( const DBus::SignalMessage& sig );
|
|
};
|
|
|
|
#endif//__DEMO_HAL_LISTEN_H
|