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

Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

# Tp::Connection Class Reference
[Connection proxies]

The Connection class provides an object representing a Telepathy connection. More...

`#include <TelepathyQt4/Connection>`

Inherits Tp::StatefulDBusProxy, OptionalInterfaceFactory< Connection >, Tp::ReadyObject, and Tp::RefCounted.

List of all members.

## Classes

- class ErrorDetails

## Public Types

- enum Status { StatusDisconnected, StatusConnecting, StatusConnected, StatusUnknown }

## Signals

- void statusChanged (Tp::Connection::Status newStatus)
- void statusChanged (Tp::Connection::Status newStatus, Tp::ConnectionStatusReason newStatusReason)
- void selfHandleChanged (uint newHandle)
- void selfContactChanged ()
- void accountBalanceChanged (const Tp::CurrencyAmount &accountBalance)

## Public Member Functions

- virtual ~Connection ()
- ChannelFactoryConstPtr channelFactory () const
- ContactFactoryConstPtr contactFactory () const
- QString cmName () const
- QString protocolName () const
- Status status () const
- ConnectionStatusReason statusReason () const
- const ErrorDetails & errorDetails () const
- uint selfHandle () const
- ContactPtr selfContact () const
- SimpleStatusSpecMap allowedPresenceStatuses () const
- PendingOperation * setSelfPresence (const QString &status, const QString &statusMessage)
- CurrencyAmount accountBalance () const
- ConnectionCapabilities * capabilities () const
- PendingChannel * createChannel (const QVariantMap &request)
- PendingChannel * ensureChannel (const QVariantMap &request)
- PendingReady * requestConnect (const Features &requestedFeatures=Features())
- PendingOperation * requestDisconnect ()
- PendingHandles * requestHandles (uint handleType, const QStringList &names)
- PendingHandles * referenceHandles (uint handleType, const UIntList &handles)
- PendingContactAttributes * contactAttributes (const UIntList &handles, const QStringList &interfaces, bool reference=true)
- QStringList contactAttributeInterfaces () const
- ContactManager * contactManager () const
- TELEPATHY_QT4_DEPRECATED
  Client::DBus::PropertiesInterface * propertiesInterface () const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceAliasingInterface * aliasingInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceAnonymityInterface * anonymityInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceAvatarsInterface * avatarsInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceCapabilitiesInterface * capabilitiesInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceClientTypesInterface * clientTypesInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceContactCapabilitiesInterface * contactCapabilitiesInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceContactGroupsInterface * contactGroupsInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceContactInfoInterface * contactInfoInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceContactListInterface * contactListInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceLocationInterface * locationInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfacePresenceInterface * presenceInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfacePowerSavingInterface * powerSavingInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceServicePointInterface * servicePointInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceSimplePresenceInterface * simplePresenceInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceRequestsInterface * requestsInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceBalanceInterface * balanceInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
- TELEPATHY_QT4_DEPRECATED
  Client::ConnectionInterfaceCellularInterface * cellularInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const

## Static Public Member Functions

- static
  TELEPATHY_QT4_DEPRECATED
  ConnectionPtr create (const QString &busName, const QString &objectPath)
- static
  TELEPATHY_QT4_DEPRECATED
  ConnectionPtr create (const QDBusConnection &bus, const QString &busName, const QString &objectPath)
- static ConnectionPtr create (const QString &busName, const QString &objectPath, const ChannelFactoryConstPtr &channelFactory, const ContactFactoryConstPtr &contactFactory)
- static ConnectionPtr create (const QDBusConnection &bus, const QString &busName, const QString &objectPath, const ChannelFactoryConstPtr &channelFactory, const ContactFactoryConstPtr &contactFactory)

## Static Public Attributes

- static const Feature FeatureCore
- static const Feature FeatureSelfContact
- static const Feature FeatureSimplePresence
- static const Feature FeatureRoster
- static const Feature FeatureRosterGroups
- static const Feature FeatureAccountBalance

## Protected Member Functions

- TELEPATHY_QT4_DEPRECATED Connection (const QString &busName, const QString &objectPath)
- TELEPATHY_QT4_DEPRECATED Connection (const QDBusConnection &bus, const QString &busName, const QString &objectPath)
- Connection (const QDBusConnection &bus, const QString &busName, const QString &objectPath, const ChannelFactoryConstPtr &channelFactory, const ContactFactoryConstPtr &contactFactory)
- Client::ConnectionInterface * baseInterface () const
- void connectNotify (const char *)

## Detailed Description

The Connection class provides an object representing a Telepathy connection.

This models a connection to a single user account on a communication service. Its basic capability is to provide the facility to request and receive channels of differing types (such as text channels or streaming media channels) which are used to carry out further communication.

Contacts, and server-stored lists (such as subscribed contacts, block lists, or allow lists) on a service are all represented using the ContactManager object on the connection, which is valid only for the lifetime of the connection object.

The remote object state accessor functions on this object (status(), statusReason(), and so on) don't make any DBus calls; instead, they return values cached from a previous introspection run. The introspection process populates their values in the most efficient way possible based on what the service implements. Their return value is mostly undefined until the introspection process is completed, i.e. isReady() returns true. See the individual accessor descriptions for more details. A status change to StatusConnected indicates that the introspection process is finished

Signals are emitted to indicate that properties have changed for example statusChanged()(), selfContactChanged(), etc.

## Usage

### Creating a connection object

The easiest way to create connection objects is through Account. One can just use the Account::connection method to get an account active connection.

If you already know the object path, you can just call create(). For example:

     ConnectionPtr conn = Connection::create(busName, objectPath);

A ConnectionPtr object is returned, which will automatically keep track of object lifetime.

You can also provide a D-Bus connection as a QDBusConnection:

     ConnectionPtr conn = Connection::create(QDBusConnection::sessionBus(),
             busName, objectPath);

### Making connection ready to use

A Connection object needs to become ready before usage, meaning that the introspection process finished and the object accessors can be used.

To make the object ready, use becomeReady() and wait for the PendingOperation::finished() signal to be emitted.

     class MyClass : public QObject
     {
         QOBJECT

     public:
         MyClass(QObject *parent = 0);
         ~MyClass() { }

     private Q_SLOTS:
         void onConnectionReady(Tp::PendingOperation*);

     private:
         ConnectionPtr conn;
     };

     MyClass::MyClass(const QString &busName, const QString &objectPath,
             QObject *parent)
         : QObject(parent)
           conn(Connection::create(busName, objectPath))
     {
         // connect and become ready
         connect(conn->requestConnect(),
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onConnectionReady(Tp::PendingOperation*)));
     }

     void MyClass::onConnectionReady(Tp::PendingOperation *op)
     {
         if (op->isError()) {
             qWarning() << "Account cannot become ready:" <<
                 op->errorName() << "-" << op->errorMessage();
             return;
         }

         // Connection is now ready
     }

See Asynchronous Object Model, Shared Pointer Usage

## Member Enumeration Documentation

enum Tp::Connection::Status

Enumerator:

  StatusDisconnected |
  StatusConnecting |
  StatusConnected |
  StatusUnknown |

## Constructor & Destructor Documentation

Tp::Connection::~Connection | ( |  | ) | `[virtual]`

Class destructor.

Tp::Connection::Connection | ( | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[protected]`

Construct a new connection object using QDBusConnection::sessionBus().

The instance will use a channel factory creating stock Telepathy-Qt4 channel subclasses, as appropriate, with no features ready.

Deprecated:

Parameters:

  | busName | The connection's well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.

Tp::Connection::Connection | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[protected]`

Construct a new connection object using the given .

The instance will use a channel factory creating stock Telepathy-Qt4 channel subclasses, as appropriate, with no features ready.

Deprecated:

Parameters:

  | bus | QDBusConnection to use.
  | busName | The connection's well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.

Tp::Connection::Connection | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | const ChannelFactoryConstPtr & | channelFactory,
|  | const ContactFactoryConstPtr & | contactFactory |
| ) |  |  | `[protected]`

Construct a new connection object using the given bus.

A warning is printed if the factories are not for bus.

Parameters:

  | bus | QDBusConnection to use.
  | busName | The connection's well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.
  | channelFactory | The channel factory to use.
  | contactFactory | The contact factory to use.

## Member Function Documentation

ConnectionPtr Tp::Connection::create | ( | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[static]`

Create a new connection object using QDBusConnection::sessionBus().

The instance will use a channel factory creating stock Telepathy-Qt4 channel subclasses, as appropriate, with no features ready.

Deprecated:
  Use other create() methods instead.

Parameters:

  | busName | The connection well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.

Returns:
  A ConnectionPtr pointing to the newly created Connection.

ConnectionPtr Tp::Connection::create | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath |
| ) |  |  | `[static]`

Create a new connection object using the given bus.

The instance will use a channel factory creating stock Telepathy-Qt4 channel subclasses, as appropriate, with no features ready.

Deprecated:
  Use other create() methods instead.

Parameters:

  | bus | QDBusConnection to use.
  | busName | The connection well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.

Returns:
  A ConnectionPtr pointing to the newly created Connection.

ConnectionPtr Tp::Connection::create | ( | const QString & | busName,
|  | const QString & | objectPath,
|  | const ChannelFactoryConstPtr & | channelFactory,
|  | const ContactFactoryConstPtr & | contactFactory |
| ) |  |  | `[static]`

Create a new connection object using QDBusConnection::sessionBus().

A warning is printed if the factories are not for QDBusConnection::sessionBus().

Parameters:

  | busName | The connection well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.
  | channelFactory | The channel factory to use.
  | contactFactory | The contact factory to use.

Returns:
  A ConnectionPtr pointing to the newly created Connection.

ConnectionPtr Tp::Connection::create | ( | const QDBusConnection & | bus,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | const ChannelFactoryConstPtr & | channelFactory,
|  | const ContactFactoryConstPtr & | contactFactory |
| ) |  |  | `[static]`

Create a new connection object using the given bus.

A warning is printed if the factories are not for bus.

Parameters:

  | bus | QDBusConnection to use.
  | busName | The connection well-known bus name (sometimes called a "service name").
  | objectPath | The connection object path.
  | channelFactory | The channel factory to use.
  | contactFactory | The contact factory to use.

Returns:
  A ConnectionPtr pointing to the newly created Connection.

ChannelFactoryConstPtr Tp::Connection::channelFactory | ( |  | ) | const

Get the channel factory used by this connection.

Only read access is provided. This allows constructing object instances and examining the object construction settings, but not changing settings. Allowing changes would lead to tricky situations where objects constructed at different times by the account would have unpredictably different construction settings (eg. subclass).

Returns:
  Read-only pointer to the factory.

ContactFactoryConstPtr Tp::Connection::contactFactory | ( |  | ) | const

Get the contact factory used by this connection.

Only read access is provided. This allows constructing object instances and examining the object construction settings, but not changing settings. Allowing changes would lead to tricky situations where objects constructed at different times by the account would have unpredictably different construction settings (eg. subclass).

Returns:
  Read-only pointer to the factory.

QString Tp::Connection::cmName | ( |  | ) | const

QString Tp::Connection::protocolName | ( |  | ) | const

Connection::Status Tp::Connection::status | ( |  | ) | const

Return the status of this connection.

This method requires Connection::FeatureCore to be enabled.

Returns:
  The status of this connection, as defined in Connection::Status.

See also:
  statusChanged()

ConnectionStatusReason Tp::Connection::statusReason | ( |  | ) | const

Return the reason for this connection's status (which is returned by status()). The validity and change rules are the same as for status().

This method requires Connection::FeatureCore to be enabled.

The status reason should be only used as a fallback in error handling when the application doesn't understand an error name given as the invalidation reason, which may in some cases be domain/UI-specific.

See also:
  invalidated(), invalidationReason()

Returns:
  The reason, as defined in ConnectionStatusReason.

const Connection::ErrorDetails & Tp::Connection::errorDetails | ( |  | ) | const

Returns detailed information about the reason for the connection going invalidated().

Some services may provide additional error information in the ConnectionError D-Bus signal, when a Connection is disconnected / has become unusable. If the service didn't provide any, or has not been invalidated yet, an invalid instance is returned.

The information provided by invalidationReason() and this method should always be used in error handling in preference to statusReason(). The status reason can be used as a fallback, however, if the client doesn't understand what a particular value returned by invalidationReason() means, as it may be domain-specific with some services.

Returns:
  The error details.

uint Tp::Connection::selfHandle | ( |  | ) | const

Return the handle which represents the user on this connection, which will remain valid for the lifetime of this connection, or until a change in the user's identifier is signalled by the selfHandleChanged() signal. If the connection is not yet in the StatusConnected state, the value of this property may be zero.

This method requires Connection::FeatureCore to be enabled.

Returns:
  Self handle.

ContactPtr Tp::Connection::selfContact | ( |  | ) | const

Return the object that represents the contact of this connection.

This method requires Connection::FeatureSelfContact to be enabled.

Returns:
  The connection self contact.

SimpleStatusSpecMap Tp::Connection::allowedPresenceStatuses | ( |  | ) | const

Return a dictionary of presence statuses valid for use in this connection.

The value may have changed arbitrarily during the time the Connection spends in status StatusConnecting, again staying fixed for the entire time in StatusConnected.

This method requires Connection::FeatureSimplePresence to be enabled.

Returns:
  Dictionary from string identifiers to structs for each valid status.

PendingOperation * Tp::Connection::setSelfPresence | ( | const QString & | status,
|  | const QString & | statusMessage |
| ) |  |  |

Set the self presence status.

status must be one of the allowed statuses returned by allowedPresenceStatuses().

Note that clients SHOULD set the status message for the local user to the empty string, unless the user has actually provided a specific message (i.e. one that conveys more information than the Status).

Parameters:

  | status | The desired status.
  | statusMessage | The desired status message.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also:
  allowedPresenceStatuses()

CurrencyAmount Tp::Connection::accountBalance | ( |  | ) | const

Return the user's balance on the account corresponding to this connection. A negative amount may be possible on some services, and indicates that the user owes money to the service provider.

Returns:
  The user's balance.

See also:
  accountBalanceChanged()

ConnectionCapabilities * Tp::Connection::capabilities | ( |  | ) | const

Return the capabilities that are expected to be available on this connection, i.e. those for which createChannel() can reasonably be expected to succeed. User interfaces can use this information to show or hide UI components.

This property cannot change after the connection has gone to state() TpConnection_Status_Connected, so there is no change notification.

This method requires Connection::FeatureCore to be enabled.

Returns:
  An object representing the connection capabilities or 0 if FeatureCore is not ready.

PendingChannel * Tp::Connection::createChannel | ( | const QVariantMap & | request | ) |

Asynchronously creates a channel satisfying the given request.

The request MUST contain the following keys: org.freedesktop.Telepathy.Channel.ChannelType org.freedesktop.Telepathy.Channel.TargetHandleType

Upon completion, the reply to the request can be retrieved through the returned PendingChannel object. The object also provides access to the parameters with which the call was made and a signal to connect to get notification of the request finishing processing. See the documentation for that class for more info.

The returned PendingChannel object should be freed using its QObject::deleteLater() method after it is no longer used. However, all PendingChannel objects resulting from requests to a particular Connection will be freed when the Connection itself is freed. Conversely, this means that the PendingChannel object should not be used after the Connection is destroyed.

See also:
  PendingChannel

Parameters:

  | request | A dictionary containing the desirable properties.

Returns:
  Pointer to a newly constructed PendingChannel object, tracking the progress of the request.

PendingChannel * Tp::Connection::ensureChannel | ( | const QVariantMap & | request | ) |

Asynchronously ensures a channel exists satisfying the given request.

The request MUST contain the following keys: org.freedesktop.Telepathy.Channel.ChannelType org.freedesktop.Telepathy.Channel.TargetHandleType

Upon completion, the reply to the request can be retrieved through the returned PendingChannel object. The object also provides access to the parameters with which the call was made and a signal to connect to get notification of the request finishing processing. See the documentation for that class for more info.

The returned PendingChannel object should be freed using its QObject::deleteLater() method after it is no longer used. However, all PendingChannel objects resulting from requests to a particular Connection will be freed when the Connection itself is freed. Conversely, this means that the PendingChannel object should not be used after the Connection is destroyed.

See also:
  PendingChannel

Parameters:

  | request | A dictionary containing the desirable properties.

Returns:
  Pointer to a newly constructed PendingChannel object, tracking the progress of the request.

PendingReady * Tp::Connection::requestConnect | ( | const Features & | requestedFeatures = `Features()` | ) |

Start an asynchronous request that the connection be connected.

The returned PendingOperation will finish successfully when the connection has reached StatusConnected and the requested features are all ready, or finish with an error if a fatal error occurs during that process.

Parameters:

  | requestedFeatures | The features which should be enabled

Returns:
  A PendingReady object which will emit finished when the Connection has reached StatusConnected, and initial setup for basic functionality, plus the given features, has succeeded or failed

PendingOperation * Tp::Connection::requestDisconnect | ( |  | ) |

Start an asynchronous request that the connection be disconnected. The returned PendingOperation object will signal the success or failure of this request; under normal circumstances, it can be expected to succeed.

Returns:
  A PendingOperation, which will emit finished when the request finishes.

PendingHandles * Tp::Connection::requestHandles | ( | uint | handleType,
|  | const QStringList & | names |
| ) |  |  |

Request handles of the given type for the given entities (contacts, rooms, lists, etc.).

Upon completion, the reply to the request can be retrieved through the returned PendingHandles object. The object also provides access to the parameters with which the call was made and a signal to connect to to get notification of the request finishing processing. See the documentation for that class for more info.

The returned PendingHandles object should be freed using its QObject::deleteLater() method after it is no longer used. However, all PendingHandles objects resulting from requests to a particular Connection will be freed when the Connection itself is freed. Conversely, this means that the PendingHandles object should not be used after the Connection is destroyed.

See also:
  PendingHandles

Parameters:

  | handleType | Type for the handles to request, as specified in HandleType.
  | names | Names of the entities to request handles for.

Returns:
  Pointer to a newly constructed PendingHandles object, tracking the progress of the request.

PendingHandles * Tp::Connection::referenceHandles | ( | uint | handleType,
|  | const UIntList & | handles |
| ) |  |  |

Request a reference to the given handles. Handles not explicitly requested (via requestHandles()) but eg. observed in a signal need to be referenced to guarantee them staying valid.

Upon completion, the reply to the operation can be retrieved through the returned PendingHandles object. The object also provides access to the parameters with which the call was made and a signal to connect to to get notification of the request finishing processing. See the documentation for that class for more info.

The returned PendingHandles object should be freed using its QObject::deleteLater() method after it is no longer used. However, all PendingHandles objects resulting from requests to a particular Connection will be freed when the Connection itself is freed. Conversely, this means that the PendingHandles object should not be used after the Connection is destroyed.

See also:
  PendingHandles

Parameters:

  | handleType | Type of the handles given, as specified in HandleType.
  | handles | Handles to request a reference to.

Returns:
  Pointer to a newly constructed PendingHandles object, tracking the progress of the request.

PendingContactAttributes * Tp::Connection::contactAttributes | ( | const UIntList & | handles,
|  | const QStringList & | interfaces,
|  | bool | reference = `true` |
| ) |  |  |

Requests attributes for contacts. Optionally, the handles of the contacts will be referenced automatically. Essentially, this method wraps ConnectionInterfaceContactsInterface::GetContactAttributes(), integrating it with the rest of the handle-referencing machinery.

Upon completion, the reply to the request can be retrieved through the returned PendingContactAttributes object. The object also provides access to the parameters with which the call was made and a signal to connect to to get notification of the request finishing processing. See the documentation for that class for more info.

If the remote object doesn't support the Contacts interface (as signified by the list returned by interfaces() not containing TELEPATHY_INTERFACE_CONNECTION_INTERFACE_CONTACTS), the returned PendingContactAttributes instance will fail instantly with the error TELEPATHY_ERROR_NOT_IMPLEMENTED.

Similarly, if the connection isn't both connected and ready (`status() == StatusConnected && isReady()`), the returned PendingContactAttributes instance will fail instantly with the error TELEPATHY_ERROR_NOT_AVAILABLE.

This method requires Connection::FeatureCore to be enabled.

See also:
  PendingContactAttributes

Parameters:

  | handles | A list of handles of type HandleTypeContact
  | interfaces | D-Bus interfaces for which the client requires information
  | reference | Whether the handles should additionally be referenced.

Returns:
  Pointer to a newly constructed PendingContactAttributes, tracking the progress of the request.

QStringList Tp::Connection::contactAttributeInterfaces | ( |  | ) | const

ContactManager * Tp::Connection::contactManager | ( |  | ) | const

Return the ContactManager object for this connection.

The contact manager is responsible for all contact handling in this connection, including adding, removing, authorizing, etc.

Returns:
  A pointer to this connection ContactManager object. The returned object is owned by this connection and should not be freed.

DBus::PropertiesInterface * Tp::Connection::propertiesInterface | ( |  | ) | const`[inline]`

Convenience function for getting a Properties interface proxy. The Properties interface is not necessarily reported by the services, so a `check` parameter is not provided, and the interface is always assumed to be present.

See also:
  optionalInterface()

Deprecated:
  Use optionalInterface() instead.

Returns:
  `optionalInterface<DBus::PropertiesInterface>(BypassInterfaceCheck)`

ConnectionInterfaceAliasingInterface * Tp::Connection::aliasingInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting an Aliasing interface proxy.

Deprecated:
  Use optionalInterface() instead.

Parameters:

  | check | Passed to optionalInterface()

Returns:
  `optionalInterface<ConnectionInterfaceAliasingInterface>(check)`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceAnonymityInterface* Tp::Connection::anonymityInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

ConnectionInterfaceAvatarsInterface * Tp::Connection::avatarsInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting an Avatars interface proxy.

Deprecated:
  Use optionalInterface() instead.

Parameters:

  | check | Passed to optionalInterface()

Returns:
  `optionalInterface<ConnectionInterfaceAvatarsInterface>(check)`

ConnectionInterfaceCapabilitiesInterface * Tp::Connection::capabilitiesInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting a Capabilities interface proxy.

Deprecated:
  Use optionalInterface() instead.

Parameters:

  | check | Passed to optionalInterface()

Returns:
  `optionalInterface<ConnectionInterfaceCapabilitiesInterface>(check)`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceClientTypesInterface* Tp::Connection::clientTypesInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceContactCapabilitiesInterface* Tp::Connection::contactCapabilitiesInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceContactGroupsInterface* Tp::Connection::contactGroupsInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceContactInfoInterface* Tp::Connection::contactInfoInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceContactListInterface* Tp::Connection::contactListInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceLocationInterface* Tp::Connection::locationInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

ConnectionInterfacePresenceInterface * Tp::Connection::presenceInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting a Presence interface proxy.

Deprecated:
  Use optionalInterface() instead.

Parameters:

  | check | Passed to optionalInterface()

Returns:
  `optionalInterface<ConnectionInterfacePresenceInterface>(check)`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfacePowerSavingInterface* Tp::Connection::powerSavingInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceServicePointInterface* Tp::Connection::servicePointInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

ConnectionInterfaceSimplePresenceInterface * Tp::Connection::simplePresenceInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

Convenience function for getting a SimplePresence interface proxy.

Deprecated:
  Use optionalInterface() instead.

Parameters:

  | check | Passed to optionalInterface()

Returns:
  `optionalInterface<ConnectionInterfaceSimplePresenceInterface>(check)`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceRequestsInterface* Tp::Connection::requestsInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceBalanceInterface* Tp::Connection::balanceInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

TELEPATHY_QT4_DEPRECATED Client::ConnectionInterfaceCellularInterface* Tp::Connection::cellularInterface | ( | InterfaceSupportedChecking | check = `CheckInterfaceSupported` | ) | const`[inline]`

void Tp::Connection::statusChanged | ( | Tp::Connection::Status | newStatus | ) | `[signal]`

Indicates that the connection's status has changed and that all previously requested features are now ready to use for the new status.

Legitimate uses for this signal, apart from waiting for a given connection status to be ready, include updating an animation based on the connection being in Status::Connecting, Status::Connected and Status::Disconnected, and otherwise showing progress indication to the user. It should, however, NEVER be used for error handling:

This signal doesn't contain the status reason as an argument, because statusChanged() shouldn't be used for error-handling. There are numerous cases in which a Connection may become unusable without there being an status change to Status::Disconnected. All of these cases, and being disconnected itself, are signaled by invalidated() with appropriate error names. On the other hand, the reason for the status going to Status::Connecting or Status::Connected will always be ConnectionStatusReasonRequested, so signaling that would be useless.

The status reason, as returned by statusReason(), may however be used as a fallback for error handling in slots connected to the invalidated() signal, if the client doesn't understand a particular (likely domain-specific if so) error name given by invalidateReason().

Parameters:

  | newStatus | The new status of the connection, as would be returned by status().

void Tp::Connection::statusChanged | ( | Tp::Connection::Status | newStatus,
|  | Tp::ConnectionStatusReason | reason |
| ) |  |  | `[signal]`

Deprecated:
  It is tempting to use the status reason parameter as a primary means of error handling, which must be avoided. Use statusReason(Tp::Connection::Status) instead.

Parameters:

  | newStatus | The new status of the connection, as would be returned by status().
  | newStatusReason | The reason for the change. Should not be used for error handling.

void Tp::Connection::selfHandleChanged | ( | uint | newHandle | ) | `[signal]`

void Tp::Connection::selfContactChanged | ( |  | ) | `[signal]`

void Tp::Connection::accountBalanceChanged | ( | const Tp::CurrencyAmount & | accountBalance | ) | `[signal]`

Client::ConnectionInterface * Tp::Connection::baseInterface | ( |  | ) | const`[protected]`

Return the ConnectionInterface for this Connection. This method is protected since the convenience methods provided by this class should generally be used instead of calling D-Bus methods directly.

Returns:
  A pointer to the existing ConnectionInterface for this Connection.

void Tp::Connection::connectNotify | ( | const char * | signalName | ) | `[protected]`

## Member Data Documentation

const Feature Tp::Connection::FeatureCore `[static]`

Feature representing the core that needs to become ready to make the Connection object usable.

Note that this feature must be enabled in order to use most Connection methods. See specific methods documentation for more details.

When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.

const Feature Tp::Connection::FeatureSelfContact `[static]`

Feature used to retrieve the connection self contact.

See self contact specific methods' documentation for more details.

const Feature Tp::Connection::FeatureSimplePresence `[static]`

Feature used to retrieve/keep track of the connection self presence.

See simple presence specific methods' documentation for more details.

const Feature Tp::Connection::FeatureRoster `[static]`

Feature used to enable roster support on Connection::contactManager.

See ContactManager roster specific methods' documentation for more details.

const Feature Tp::Connection::FeatureRosterGroups `[static]`

Feature used to enable roster groups support on Connection::contactManager.

See ContactManager roster groups specific methods' documentation for more details.

const Feature Tp::Connection::FeatureAccountBalance `[static]`

Feature used to retrieve/keep track of the connection account balance.

See account balance specific methods' documentation for more details.