Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties
Tp::ConnectionManager Class Reference

The ConnectionManager class represents a Telepathy connection manager. More...

#include <TelepathyQt4/ConnectionManager>

Inherits Tp::StatelessDBusProxy, and Tp::OptionalInterfaceFactory< ConnectionManager >.

List of all members.

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Member Functions

Properties


Detailed Description

The ConnectionManager class represents a Telepathy connection manager.

Connection managers allow connections to be made on one or more protocols.

Most client applications should use this functionality via the AccountManager, to allow connections to be shared between client applications.


Constructor & Destructor Documentation

Tp::ConnectionManager::~ConnectionManager ( ) [virtual]

Class destructor.

Tp::ConnectionManager::ConnectionManager ( const QDBusConnection bus,
const QString name,
const ConnectionFactoryConstPtr &  connectionFactory,
const ChannelFactoryConstPtr &  channelFactory,
const ContactFactoryConstPtr &  contactFactory 
) [protected]

Construct a new ConnectionManager object using the given bus.

Parameters:
busQDBusConnection to use.
nameName of the connection manager.

Member Function Documentation

ConnectionManagerPtr Tp::ConnectionManager::create ( const QDBusConnection bus,
const QString name 
) [static]

Create a new ConnectionManager object.

The instance will use a connection factory creating Tp::Connection objects with no features ready, and a channel factory creating stock Telepathy-Qt4 channel subclasses, as appropriate, with no features ready.

Parameters:
busQDBusConnection to use.
nameName of the connection manager.
Returns:
A ConnectionManagerPtr object pointing to the newly created ConnectionManager object.
ConnectionManagerPtr Tp::ConnectionManager::create ( const QString name,
const ConnectionFactoryConstPtr &  connectionFactory = ConnectionFactory::create(QDBusConnection::sessionBus()),
const ChannelFactoryConstPtr &  channelFactory = ChannelFactory::create(QDBusConnection::sessionBus()),
const ContactFactoryConstPtr &  contactFactory = ContactFactory::create() 
) [static]

Create a new ConnectionManager using QDBusConnection::sessionBus() and the given factories.

The channel factory is passed to any Connection objects created by this manager object. In fact, they're not used directly by ConnectionManager at all.

A warning is printed if the factories are for a bus different from QDBusConnection::sessionBus().

Parameters:
nameName of the connection manager.
connectionFactoryThe connection factory to use.
channelFactoryThe channel factory to use.
contactFactoryThe contact factory to use.
Returns:
A ConnectionManagerPtr object pointing to the newly created ConnectionManager object.
ConnectionManagerPtr Tp::ConnectionManager::create ( const QDBusConnection bus,
const QString name,
const ConnectionFactoryConstPtr &  connectionFactory,
const ChannelFactoryConstPtr &  channelFactory,
const ContactFactoryConstPtr &  contactFactory = ContactFactory::create() 
) [static]

Create a new ConnectionManager using the given bus and the given factories.

The channel factory is passed to any Connection objects created by this manager object. In fact, they're not used directly by ConnectionManager at all.

A warning is printed if the factories are for a bus different from QDBusConnection::sessionBus().

Parameters:
busQDBusConnection to use.
nameName of the connection manager.
connectionFactoryThe connection factory to use.
channelFactoryThe channel factory to use.
contactFactoryThe contact factory to use.
Returns:
A ConnectionManagerPtr object pointing to the newly created ConnectionManager object.
QString Tp::ConnectionManager::name ( ) const

Reimplemented from QObject.

ConnectionFactoryConstPtr Tp::ConnectionManager::connectionFactory ( ) const

Return the connection factory used by this manager.

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 manager would have unpredictably different construction settings (eg. subclass).

Returns:
A read-only pointer to the ConnectionFactory object.
ChannelFactoryConstPtr Tp::ConnectionManager::channelFactory ( ) const

Return the channel factory used by this manager.

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 manager would have unpredictably different construction settings (eg. subclass).

Returns:
A read-only pointer to the ChannelFactory object.
ContactFactoryConstPtr Tp::ConnectionManager::contactFactory ( ) const

Return the contact factory used by this manager.

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 manager would have unpredictably different construction settings (eg. subclass).

Returns:
A read-only pointer to the ContactFactory object.
QStringList Tp::ConnectionManager::supportedProtocols ( ) const
const ProtocolInfoList& Tp::ConnectionManager::protocols ( ) const
bool Tp::ConnectionManager::hasProtocol ( const QString protocolName) const

Return whether this connection manager implements the protocol specified by protocolName.

This method requires ConnectionManager::FeatureCore to be ready.

Returns:
true if the protocol is supported, false otherwise.
See also:
protocol(), protocols()
ProtocolInfo Tp::ConnectionManager::protocol ( const QString protocolName) const

Return the ProtocolInfo object for the protocol specified by protocolName.

This method requires ConnectionManager::FeatureCore to be ready.

Parameters:
protocolNameThe name of the protocol.
Returns:
A ProtocolInfo object which will return for ProtocolInfo::isValid() if the protocol specified by protocolName is not supported.
See also:
hasProtocol()
PendingStringList * Tp::ConnectionManager::listNames ( const QDBusConnection bus = QDBusConnection::sessionBus()) [static]

Return a pending operation from which a list of all installed connection manager short names (such as "gabble" or "haze") can be retrieved if it succeeds.

Returns:
A PendingStringList which will emit PendingStringList::finished when this object has finished or failed getting the connection manager names.
Client::ConnectionManagerInterface * Tp::ConnectionManager::baseInterface ( ) const [protected]

Return the Client::ConnectionManagerInterface for this ConnectionManager. 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 Client::ConnectionManagerInterface for this ConnectionManager object.

Member Data Documentation

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

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

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


Property Documentation

QString Tp::ConnectionManager::name [read]

Return the short name of the connection manager (e.g. "gabble").

Returns:
The name of the connection manager.
QStringList Tp::ConnectionManager::supportedProtocols [read]

Return a list of strings identifying the protocols supported by this connection manager, as described in the Telepathy specification (e.g. "jabber").

These identifiers are not intended to be displayed to users directly; user interfaces are responsible for mapping them to localized strings.

This method requires ConnectionManager::FeatureCore to be ready.

Returns:
A list of supported protocols.
const ProtocolInfoList & Tp::ConnectionManager::protocols [read]

Return a list of protocols info for this connection manager.

Note that the returned ProtocolInfoList contents should not be freed.

This method requires ConnectionManager::FeatureCore to be ready.

Returns:
A list of á¹”rotocolInfo.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.8.0