The ConnectionManager class represents a Telepathy connection manager.
More...
#include <TelepathyQt/ConnectionManager>
Inherits Tp::StatelessDBusProxy, and Tp::OptionalInterfaceFactory< ConnectionManager >.
|
static ConnectionManagerPtr | create (const QDBusConnection &bus, const QString &name) |
|
static ConnectionManagerPtr | create (const QString &name, const ConnectionFactoryConstPtr &connectionFactory=ConnectionFactory::create(QDBusConnection::sessionBus()), const ChannelFactoryConstPtr &channelFactory=ChannelFactory::create(QDBusConnection::sessionBus()), const ContactFactoryConstPtr &contactFactory=ContactFactory::create()) |
|
static ConnectionManagerPtr | create (const QDBusConnection &bus, const QString &name, const ConnectionFactoryConstPtr &connectionFactory, const ChannelFactoryConstPtr &channelFactory, const ContactFactoryConstPtr &contactFactory=ContactFactory::create()) |
|
static PendingStringList * | listNames (const QDBusConnection &bus=QDBusConnection::sessionBus()) |
|
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.
Tp::ConnectionManager::~ConnectionManager |
( |
| ) |
|
|
virtual |
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
-
bus | QDBusConnection to use. |
name | Name of the connection manager. |
connectionFactory | The connection factory to use. |
channelFactory | The channel factory to use. |
contactFactory | The contact factory to use. |
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-Qt channel subclasses, as appropriate, with no features ready.
- Parameters
-
bus | QDBusConnection to use. |
name | Name 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
-
name | Name of the connection manager. |
connectionFactory | The connection factory to use. |
channelFactory | The channel factory to use. |
contactFactory | The 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
-
bus | QDBusConnection to use. |
name | Name of the connection manager. |
connectionFactory | The connection factory to use. |
channelFactory | The channel factory to use. |
contactFactory | The contact factory to use. |
- Returns
- A ConnectionManagerPtr object pointing to the newly created ConnectionManager object.
QString Tp::ConnectionManager::name |
( |
| ) |
const |
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 |
bool Tp::ConnectionManager::hasProtocol |
( |
const QString & |
protocolName | ) |
const |
ProtocolInfo Tp::ConnectionManager::protocol |
( |
const QString & |
protocolName | ) |
const |
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.
const Feature Tp::ConnectionManager::FeatureCore |
|
static |
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.
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.
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.