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

# ConnectionManagerInterface Class Reference
[Connection manager proxies]

`#include <TelepathyQt4/ConnectionManager>`

Inherits Tp::AbstractInterface.

List of all members.

## Public Slots

- QDBusPendingReply
  < Tp::ParamSpecList > GetParameters (const QString &protocol)
- QDBusPendingReply< QStringList > ListProtocols ()
- QDBusPendingReply< QString,
  QDBusObjectPath > RequestConnection (const QString &protocol, const QVariantMap &parameters)

## Signals

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

## Public Member Functions

- ConnectionManagerInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
- ConnectionManagerInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
- ConnectionManagerInterface (Tp::DBusProxy *proxy)
- QStringList Interfaces () const TELEPATHY_GNUC_DEPRECATED

## Static Public Member Functions

- static const char * staticInterfaceName ()

## Protected Member Functions

- virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)

## Properties

- QStringList Interfaces

## Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ConnectionManager."

## Constructor & Destructor Documentation

ConnectionManagerInterface | ( | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ConnectionManagerInterface associated with the given object on the session bus.

Parameters:

  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ConnectionManagerInterface | ( | const QDBusConnection & | connection,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ConnectionManagerInterface associated with the given object on the given bus.

Parameters:

  | connection | The bus via which the object can be reached.
  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ConnectionManagerInterface | ( | Tp::DBusProxy * | proxy | ) |

Creates a ConnectionManagerInterface associated with the same object as the given proxy.

Parameters:

  | proxy | The proxy to use. It will also be the QObject::parent() for this object.

## Member Function Documentation

static const char* staticInterfaceName | ( |  | ) | `[inline, static]`

Returns the name of the interface "org.freedesktop.Telepathy.ConnectionManager", which this class represents.

Returns:
  The D-Bus interface name.

QStringList Interfaces | ( |  | ) | const`[inline]`

Getter for the remote object property "Interfaces".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

QDBusPendingReply<Tp::ParamSpecList> GetParameters | ( | const QString & | protocol | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetParameters" on the remote object.

Get a list of the parameters which must or may be provided to the RequestConnection method when connecting to the given protocol, or registering (the boolean "register" parameter is available, and set to true).

Parameters:

  | protocol | The required protocol name

Returns:

An array of structs representing possible parameters.

QDBusPendingReply<QStringList> ListProtocols | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "ListProtocols" on the remote object.

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

Returns:

A array of string protocol identifiers supported by this manager

QDBusPendingReply<QString, QDBusObjectPath> RequestConnection | ( | const QString & | protocol,
|  | const QVariantMap & | parameters |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "RequestConnection" on the remote object.

Request a <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> 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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">Connect</tp:dbus-ref> method.

The parameters which must and may be provided in the parameters dictionary can be discovered with the <tp:member-ref>GetParameters</tp:member-ref> 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 following well-known names and types should be used where appropriate:

account (s)

  The identifier for the user's account on the server

server (s)

  A fully qualified domain name or numeric IPv4 or IPv6 address. Using the fully-qualified domain name form is recommended whenever possible. If this parameter is specified and the account for that protocol also specifies a server, this parameter should override that in the user id.

port (q)

  A TCP or UDP port number. If this parameter is specified and the account for that protocol also specifies a port, this parameter should override that in the account.

password (s)

  A password associated with the account.

require-encryption (b)

  Require encryption for this connection. A connection should fail to connect if require-encryption is set and an encrypted connection is not possible.

register (b)

  This account should be created on the server if it does not already exist.

ident (s)

  The local username to report to the server if necessary, such as in IRC.

fullname (s)

  The user's full name if the service requires this when authenticating or registering.

stun-server (s)

  The IP address or FQDN of a STUN server to use for NAT traversal, without any ":port" suffix.

stun-port (q)

  The UDP port number on the stun-server to use for STUN. Only significant if the stun-server is also supplied.

keepalive-interval (u)
  The time in seconds between pings sent to the server to ensure that the connection is still alive, or `0` to disable such pings.

Every successful RequestConnection call will cause the emission of a <tp:member-ref>NewConnection</tp:member-ref> 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 above well-known list.

Returns:

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

Returns:

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

void NewConnection | ( | const QString & | busName,
|  | const QDBusObjectPath & | objectPath,
|  | const QString & | protocol |
| ) |  |  | `[signal]`

Represents the signal "NewConnection" on the remote object.

Emitted when a new Connection object is created.

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

virtual void invalidate | ( | Tp::DBusProxy * | ,
|  | const QString & | ,
|  | const QString & |  |
| ) |  |  | `[protected, virtual]`

## Property Documentation

QStringList Interfaces`[read]`

Represents property "Interfaces" on the remote object.

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.