Public Slots | Signals | Public Member Functions

ContextProvider::PropertyAdaptor Class Reference

A DBus adaptor for implementing the org.maemo.contextkit.Property. More...

#include <propertyadaptor.h>

List of all members.

Public Slots

void Subscribe (const QDBusMessage &msg, QVariantList &values, quint64 &timestamp)
 Implementation of the D-Bus method Subscribe.
void Unsubscribe (const QDBusMessage &msg)
 Implementation of the D-Bus method Unsubscribe.
void Get (QVariantList &values, quint64 &timestamp)
 Implementation of the D-Bus method Get.

Signals

void ValueChanged (const QVariantList &values, const quint64 &timestamp)

Public Member Functions

 PropertyAdaptor (PropertyPrivate *property, QDBusConnection *connection)
 Constructor.
QString objectPath () const
 Object path where the corresponding PropertyPrivate object should be registered at.
void forgetClients ()
 Called when the service is stopped and will disappear from D-Bus.

Detailed Description

A DBus adaptor for implementing the org.maemo.contextkit.Property.

PropertyAdaptor represents the Property object on D-Bus. It also keeps track of its clients and sets the PropertyPrivate to subscribed or unsubscribed accordingly.

PropertyAdaptor also listens to values sent by other providers on D-Bus and notifies the PropertyPrivate about them.


Constructor & Destructor Documentation

ContextProvider::PropertyAdaptor::PropertyAdaptor ( PropertyPrivate propertyPrivate,
QDBusConnection *  conn 
)

Constructor.

Creates new adaptor for the given manager with the given dbus connection. The connection conn is not retained.


Member Function Documentation

void ContextProvider::PropertyAdaptor::forgetClients (  ) 

Called when the service is stopped and will disappear from D-Bus.

If it appears again, the clients will resubscribe, and it shouldn't be a MultipleSubscribe error. Thus, we need to forget the clients when the service is stopped.

void ContextProvider::PropertyAdaptor::Get ( QVariantList &  values,
quint64 &  timestamp 
) [slot]

Implementation of the D-Bus method Get.

QString ContextProvider::PropertyAdaptor::objectPath (  )  const

Object path where the corresponding PropertyPrivate object should be registered at.

For a core propertiy Property.Name (not starting with /), the path is /org/maemo/contextkit/Property/Name. For a non-core property /com/my/property, the object path is /com/my/property.

void ContextProvider::PropertyAdaptor::Subscribe ( const QDBusMessage &  msg,
QVariantList &  values,
quint64 &  timestamp 
) [slot]

Implementation of the D-Bus method Subscribe.

void ContextProvider::PropertyAdaptor::Unsubscribe ( const QDBusMessage &  msg  )  [slot]

Implementation of the D-Bus method Unsubscribe.

void ContextProvider::PropertyAdaptor::ValueChanged ( const QVariantList &  values,
const quint64 &  timestamp 
) [signal]

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