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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ChannelTypeDBusTubeAdaptor Class Reference
Service-side implementation » Channel service implementation

`#include <TelepathyQt/_gen/svc-channel.h>`

Inheritance diagram for Tp::Service::ChannelTypeDBusTubeAdaptor:
[legend]

## Public Slots

QString | Offer (const QVariantMap &parameters, uint accesscontrol, const QDBusMessage &dbusMessage)
QString | Accept (uint accesscontrol, const QDBusMessage &dbusMessage)

## Signals

void | DBusNamesChanged (const Tp::DBusTubeParticipants &added, const Tp::UIntList &removed)

## Public Member Functions

QString | ServiceName () const
Tp::DBusTubeParticipants | DBusNames () const
Tp::UIntList | SupportedAccessControls () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const
Public Member Functions inherited from QDBusAbstractAdaptor
| ~QDBusAbstractAdaptor ()
Public Member Functions inherited from QObject
| QObject (QObject *parent)
virtual | ~QObject ()
virtual bool | event (QEvent *e)
virtual bool | eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
const QObjectList & | children () const
void | setParent (QObject *parent)
void | installEventFilter (QObject *filterObj)
void | removeEventFilter (QObject *obj)
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool | disconnect (const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *receiver, const char *method)
void | dumpObjectTree ()
void | dumpObjectInfo ()
bool | setProperty (const char *name, const QVariant &value)
QVariant | property (const char *name) const
QList< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () const
bool | inherits (const char *className) const
void | deleteLater ()
| QObject (QObject *parent, const char *name)
void | insertChild (QObject *object)
void | removeChild (QObject *object)
bool | isA (const char *className) const
const char * | className () const
const char * | name () const
const char * | name (const char *defaultName) const
void | setName (const char *name)

## Additional Inherited Members

Static Public Member Functions inherited from QObject
QString | tr (const char *sourceText, const char *disambiguation, int n)
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n)
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
Protected Member Functions inherited from QDBusAbstractAdaptor
| QDBusAbstractAdaptor (QObject *obj)
void | setAutoRelaySignals (bool enable)
bool | autoRelaySignals () const
Protected Member Functions inherited from QObject
QObject * | sender () const
int | senderSignalIndex () const
int | receivers (const char *signal) const
virtual void | timerEvent (QTimerEvent *event)
virtual void | childEvent (QChildEvent *event)
virtual void | customEvent (QEvent *event)
virtual void | connectNotify (const char *signal)
virtual void | disconnectNotify (const char *signal)
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method)
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Type.DBusTube".

## Member Function Documentation

## § ServiceName()

QString Tp::Service::ChannelTypeDBusTubeAdaptor::ServiceName | ( |  | ) | const

Return the value of the exported D-Bus object property `ServiceName` of type `QString`.

Adaptees should export this property as a Qt property named 'serviceName' with type QString.

A string representing the service name that will be used over the tube. It SHOULD be a well-known D-Bus service name, of the form `com.example.ServiceName`.

When the tube is offered, the service name is transmitted to the other end.

When requesting a channel with ConnectionInterfaceRequestsInterface::CreateChannel() , this property MUST be included in the request.

Returns
  The value of exported property `ServiceName`.

## § DBusNames()

Tp::DBusTubeParticipants Tp::Service::ChannelTypeDBusTubeAdaptor::DBusNames | ( |  | ) | const

Return the value of the exported D-Bus object property `DBusNames` of type `Tp::DBusTubeParticipants`.

Adaptees should export this property as a Qt property named 'dbusNames' with type Tp::DBusTubeParticipants.

For a multi-user (i.e. Handle_Type_Room) D-Bus tube, a mapping between contact handles and their unique bus names on this tube. For a peer-to-peer (i.e. Handle_Type_Contact) D-Bus tube, the empty dictionary. Change notification is via DBusNamesChanged.

Returns
  The value of exported property `DBusNames`.

## § SupportedAccessControls()

Tp::UIntList Tp::Service::ChannelTypeDBusTubeAdaptor::SupportedAccessControls | ( |  | ) | const

Return the value of the exported D-Bus object property `SupportedAccessControls` of type `Tp::UIntList`.

Adaptees should export this property as a Qt property named 'supportedAccessControls' with type Tp::UIntList.

A list of the access control types that are supported with this channel. Note that only Socket_Access_Control_Localhost and Socket_Access_Control_Credentials can be used with D-Bus tubes. Using Socket_Access_Control_Credentials is recommended.

Socket_Access_Control_Credentials is easy to implement for a D-Bus tube, because typical D-Bus library implementations like libdbus and GDBus already have to support it to be able to connect to the system or session bus, and usually enable it by default; so there's typically no good reason to relax access control to Localhost.

When requesting a channel with ConnectionInterfaceRequestsInterface::CreateChannel() , this property MUST NOT be included in the request.

Returns
  The value of exported property `SupportedAccessControls`.

## § Offer

QString Tp::Service::ChannelTypeDBusTubeAdaptor::Offer | ( | const QVariantMap & | parameters,
|  | uint | accesscontrol,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `Offer` on this object.

Adaptees should export this method as a Qt slot with the following signature: void offer(const QVariantMap& parameters, uint accesscontrol, const Tp::Service::ChannelTypeDBusTubeAdaptor::OfferContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Offers a D-Bus tube providing the service specified.

Parameters

  parameters

      The dictionary of arbitrary Parameters to send with the tube offer.

  accesscontrol

      The access control the connection manager applies to the D-Bus
      socket.

Returns

      The string describing the address of the private bus. The client
      SHOULD NOT attempt to connect to the address until the tube is open.

## § Accept

QString Tp::Service::ChannelTypeDBusTubeAdaptor::Accept | ( | uint | accesscontrol,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `Accept` on this object.

Adaptees should export this method as a Qt slot with the following signature: void accept(uint accesscontrol, const Tp::Service::ChannelTypeDBusTubeAdaptor::AcceptContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Accept a D-Bus tube that's in the "local pending" state. The connection manager will attempt to open the tube. The tube remains in the "local pending" state until the TubeChannelStateChanged signal is emitted.

Parameters

  accesscontrol

      The access control the connection manager applies to the D-Bus
      socket.

Returns

      The string describing the address of the private bus. The client
      SHOULD NOT attempt to connect to the address until the tube is open.

## § DBusNamesChanged

void Tp::Service::ChannelTypeDBusTubeAdaptor::DBusNamesChanged | ( | const Tp::DBusTubeParticipants & | added,
|  | const Tp::UIntList & | removed
| ) |  |

signal

Represents the exported D-Bus signal `DBusNamesChanged` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void dbusNamesChanged(const Tp::DBusTubeParticipants& added, const Tp::UIntList& removed);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  added

      Array of handles and D-Bus names of new participants.

  removed

      Array of handles of former participants.