Tp::DBusService Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Member Functions | Protected Member Functions | List of all members
Tp::DBusService Class Referenceabstract
Service-side implementation

Base class for D-Bus services. More...

`#include <TelepathyQt/DBusService>`

Inherits Tp::Object.

Inherited by Tp::BaseCallContent, Tp::BaseChannel, Tp::BaseConnection, Tp::BaseConnectionManager, and Tp::BaseProtocol.

## Public Member Functions
| DBusService (const QDBusConnection &dbusConnection)
virtual | ~DBusService ()
virtual QVariantMap | immutableProperties () const =0
QDBusConnection | dbusConnection () const
QString | busName () const
QString | objectPath () const
DBusObject * | dbusObject () const
bool | isRegistered () const
Public Member Functions inherited from Tp::Object
virtual | ~Object ()
Public Member Functions inherited from Tp::RefCounted
| RefCounted ()
virtual | ~RefCounted ()

## Protected Member Functions
virtual bool | registerObject (const QString &busName, const QString &objectPath, DBusError *error)
Protected Member Functions inherited from Tp::Object
| Object ()
void | notify (const char *propertyName)

## Additional Inherited Members
Signals inherited from Tp::Object
void | propertyChanged (const QString &propertyName)

## Detailed Description

Base class for D-Bus services.

This class serves as a base for all the classes that are used to implement D-Bus services.

## Constructor & Destructor Documentation

Tp::DBusService::DBusService | ( | const QDBusConnection & | dbusConnection | ) |

Construct a DBusService that uses the given dbusConnection.

Parameters

  dbusConnection | The D-Bus connection that will be used by this service.

Tp::DBusService::~DBusService | ( |  | ) |
| virtual

Class destructor.

## Member Function Documentation

QVariantMap Tp::DBusService::immutableProperties | ( |  | ) | const
| pure virtual

Return the immutable properties of this D-Bus service object.

Immutable properties cannot change after the object has been registered on the bus with registerObject().

Returns
  The immutable properties of this D-Bus service object.

Implemented in Tp::BaseProtocol, Tp::BaseCallContent, Tp::BaseConnectionManager, Tp::BaseConnection, and Tp::BaseChannel.

QDBusConnection Tp::DBusService::dbusConnection | ( |  | ) | const

Return the D-Bus connection associated with this service.

Returns
  the D-Bus connection associated with this service.

QString Tp::DBusService::busName | ( |  | ) | const

Return the D-Bus service name of this service.

This is only valid after this service has been registered on the bus using registerObject().

Returns
  the D-Bus service name of this service.

QString Tp::DBusService::objectPath | ( |  | ) | const

Return the D-Bus object path of this service.

This is only valid after this service has been registered on the bus using registerObject().

Returns
  the D-Bus object path of this service.

DBusObject * Tp::DBusService::dbusObject | ( |  | ) | const

Return the DBusObject that is used for registering this service on the bus.

The DBusObject is the object on which all the interface adaptors for this service are plugged.

Returns
  a pointer to the DBusObject that is used for registering this service on the bus.

bool Tp::DBusService::isRegistered | ( |  | ) | const

Return whether this D-Bus service has been registered on the bus or not.

Returns
  `true` if the service has been registered, or `false` otherwise.

bool Tp::DBusService::registerObject | ( | const QString & | busName,
|  | const QString & | objectPath,
|  | DBusError * | error
| ) |  |
| protectedvirtual

Register this service object on the bus with the given busName and objectPath.

error needs to be a valid pointer to a DBusError instance, where any possible D-Bus error will be stored.

A service may only be registered once in its lifetime. Use isRegistered() to find out if it has already been registered or not.

You normally don't need to use this method directly. Subclasses should provide a simplified version of it.

Parameters

  busName | The D-Bus service name of this object.
  objectPath | The D-Bus object path of this object.
  error | A pointer to a valid DBusError instance, where any possible D-Bus error will be stored.

Returns
  `true` on success or `false` otherwise.

Reimplemented in Tp::BaseConnection, Tp::BaseProtocol, Tp::BaseCallContent, Tp::BaseConnectionManager, and Tp::BaseChannel.