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

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

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

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

## Public Slots

Tp::ParamSpecList | GetParameters (const QString &protocol, const QDBusMessage &dbusMessage)
QStringList | ListProtocols (const QDBusMessage &dbusMessage)
QString | RequestConnection (const QString &protocol, const QVariantMap &parameters, const QDBusMessage &dbusMessage, QDBusObjectPath &objectPath)

## Signals

void | NewConnection (const QString &busName, const QDBusObjectPath &objectPath, const QString &protocol)

## Public Member Functions

Tp::ProtocolPropertiesMap | Protocols () const
QStringList | Interfaces () 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.ConnectionManager".

## Member Function Documentation

## § Protocols()

Tp::ProtocolPropertiesMap Tp::Service::ConnectionManagerAdaptor::Protocols | ( |  | ) | const

Return the value of the exported D-Bus object property `Protocols` of type `Tp::ProtocolPropertiesMap`.

Adaptees should export this property as a Qt property named 'protocols' with type Tp::ProtocolPropertiesMap.

A map from protocol identifiers supported by this connection manager to the immutable properties of the corresponding ProtocolInterface objects.

Providing the immutable properties here means that when the API of Protocol objects has been finalized, most clients will only need one D-Bus round trip to interrogate the ConnectionManager about all its protocols.

If this map is empty or missing, clients SHOULD fall back to calling ListProtocols() and GetParameters() .

Returns
  The value of exported property `Protocols`.

## § Interfaces()

QStringList Tp::Service::ConnectionManagerAdaptor::Interfaces | ( |  | ) | const

Return the value of the exported D-Bus object property `Interfaces` of type `QStringList`.

Adaptees should export this property as a Qt property named 'interfaces' with type QStringList.

A list of the extra interfaces provided by this connection manager (i.e. extra functionality that can be provided even before a connection has been created).

No interfaces suitable for listing in this property are currently defined; it's provided as a hook for possible future functionality.

To be compatible with older connection managers, if retrieving this property fails, clients SHOULD assume that its value is an empty list.

Connection managers with a non-empty list of Interfaces MUST represent them in the `.manager` file, if they have one, as an `Interfaces` key in the group headed `[ConnectionManager]`, whose value is a list of strings each followed by a semicolon.

Returns
  The value of exported property `Interfaces`.

## § GetParameters

Tp::ParamSpecList Tp::Service::ConnectionManagerAdaptor::GetParameters | ( | const QString & | protocol,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void getParameters(const QString& protocol, const Tp::Service::ConnectionManagerAdaptor::GetParametersContextPtr &context);

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

Get a list of the parameters which may be specified in the Parameters of an Account (or, for specialised applications which do not use the account manager, passed to RequestConnection). Some parameters are mandatory, and some parameters only make sense when registering new accounts with the server; see the Param_Spec documentation for more details.

Parameters

  protocol

      The required protocol name

Returns

An array of structs representing possible parameters.

## § ListProtocols

QStringList Tp::Service::ConnectionManagerAdaptor::ListProtocols | ( | const QDBusMessage & | dbusMessage | ) |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void listProtocols(const Tp::Service::ConnectionManagerAdaptor::ListProtocolsContextPtr &context);

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

Get a list of protocol identifiers that are implemented by this connection manager.

Returns

      The keys of the Protocols map.

## § RequestConnection

QString Tp::Service::ConnectionManagerAdaptor::RequestConnection | ( | const QString & | protocol,
|  | const QVariantMap & | parameters,
|  | const QDBusMessage & | dbusMessage,
|  | QDBusObjectPath & | objectPath
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void requestConnection(const QString& protocol, const QVariantMap& parameters, const Tp::Service::ConnectionManagerAdaptor::RequestConnectionContextPtr &context);

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

Request a ConnectionInterface object representing a given account on a given protocol with the given parameters. The method returns the bus name and the object path where the new Connection object can be found, which should have the status of Connection_Status_Disconnected, to allow signal handlers to be attached before connecting is started with the ConnectionInterface::Connect() method.

Most applications should not use this method: they should instead use the the AccountInterface::Connection property on an AccountInterface object obtained from the AccountManagerInterface . This method is used internally by the account manager to create connections when needed.

The parameters which must and may be provided in the parameters dictionary can be discovered with the GetParameters() method. These parameters, their types, and their default values may be cached in files so that all available connection managers do not need to be started to discover which protocols are available.

To request values for these parameters from the user, a client must have prior knowledge of the meaning of the parameter names, so the well-known names and types defined by the Connection_Parameter_Name type should be used where appropriate.

Connection manager authors SHOULD avoid introducing parameters whose default values would not be serializable in a `.manager` file.

The same serialization format is used in Mission Control to store accounts.

Every successful RequestConnection call will cause the emission of a NewConnection() signal for the same newly created connection. The requester can use the returned object path and service name independently of the emission of that signal. In that case this signal emission is most useful for, e.g. other processes that are monitoring the creation of new connections.

Parameters

  protocol

      The protocol identifier

  parameters

      A dictionary mapping parameter names to values of the appropriate
      type, as indicated by GetParameters and the well-known list of
      names and value types documented on the Connection_Parameter_Name
      type.

  objectPath

  Output parameter

      The D-Bus object path to the Connection on this service

Returns

      A D-Bus service name where the new Connection object can be found

## § NewConnection

void Tp::Service::ConnectionManagerAdaptor::NewConnection | ( | const QString & | busName,
|  | const QDBusObjectPath & | objectPath,
|  | const QString & | protocol
| ) |  |

signal

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

Adaptees should export this signal as a Qt signal with the following signature: void newConnection(const QString& busName, const QDBusObjectPath& objectPath, const QString& protocol);

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

Parameters

  busName

      The D-Bus service where the connection object can be found

  objectPath

      The object path of the Connection object on this service

  protocol

      The identifier for the protocol this connection uses