Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ConnectionManagerInterface Class Reference

#include <TelepathyQt/ConnectionManager>

Inherits Tp::AbstractInterface.

Public Slots

QDBusPendingReply< Tp::ParamSpecListGetParameters (const QString &protocol, int timeout=-1)
 
QDBusPendingReply< QStringList > ListProtocols (int timeout=-1)
 
QDBusPendingReply< QString, QDBusObjectPath > RequestConnection (const QString &protocol, const QVariantMap &parameters, int timeout=-1)
 

Signals

void NewConnection (const QString &busName, const QDBusObjectPath &objectPath, const QString &protocol)
 
- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 

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)
 
Tp::PendingVariantrequestPropertyProtocols () const
 
Tp::PendingVariantrequestPropertyInterfaces () const
 
Tp::PendingVariantMaprequestAllProperties () const
 
- Public Member Functions inherited from Tp::AbstractInterface
virtual ~AbstractInterface ()
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
void setMonitorProperties (bool monitorProperties)
 
bool isMonitoringProperties () const
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 

Protected Member Functions

virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)
 
- Protected Member Functions inherited from Tp::AbstractInterface
 AbstractInterface (DBusProxy *proxy, const QLatin1String &interface)
 
 AbstractInterface (const QString &busName, const QString &path, const QLatin1String &interface, const QDBusConnection &connection, QObject *parent)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 

Additional Inherited Members

- Protected Slots inherited from Tp::AbstractInterface

Detailed Description

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

Constructor & Destructor Documentation

Tp::Client::ConnectionManagerInterface::ConnectionManagerInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

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

Parameters
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ConnectionManagerInterface::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
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ConnectionManagerInterface::ConnectionManagerInterface ( Tp::DBusProxy proxy)

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

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

Member Function Documentation

static QLatin1String Tp::Client::ConnectionManagerInterface::staticInterfaceName ( )
inlinestatic

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

Returns
The D-Bus interface name.
Tp::PendingVariant* Tp::Client::ConnectionManagerInterface::requestPropertyProtocols ( ) const
inline

Asynchronous getter for the remote object property Protocols of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionManagerInterface::requestPropertyInterfaces ( ) const
inline

Asynchronous getter for the remote object property Interfaces of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ConnectionManagerInterface::requestAllProperties ( ) const
inline

Request all of the DBus properties on the interface.

Returns
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply<Tp::ParamSpecList> Tp::Client::ConnectionManagerInterface::GetParameters ( const QString &  protocol,
int  timeout = -1 
)
inlineslot

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

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.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
protocol
The required protocol name
timeoutThe timeout in milliseconds.
Returns

An array of structs representing possible parameters.

QDBusPendingReply<QStringList> Tp::Client::ConnectionManagerInterface::ListProtocols ( int  timeout = -1)
inlineslot

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.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
timeoutThe timeout in milliseconds.
Returns
The keys of the Protocols map.
QDBusPendingReply<QString, QDBusObjectPath> Tp::Client::ConnectionManagerInterface::RequestConnection ( const QString &  protocol,
const QVariantMap &  parameters,
int  timeout = -1 
)
inlineslot

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

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.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

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.
timeoutThe timeout in milliseconds.
Returns
A D-Bus service name where the new Connection object can be found
The D-Bus object path to the Connection on this service
void Tp::Client::ConnectionManagerInterface::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
void Tp::Client::ConnectionManagerInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7