#include <TelepathyQt4/Client/ConnectionManager>
Most client applications should use this functionality via the AccountManager, to allow connections to be shared between client applications.
Public Types | |
enum | Feature { _Padding = 0xFFFFFFFF } |
Public Member Functions | |
ConnectionManager (const QString &name, QObject *parent=0) | |
ConnectionManager (const QDBusConnection &bus, const QString &name, QObject *parent=0) | |
virtual | ~ConnectionManager () |
QString | name () const |
QStringList | interfaces () const |
QStringList | supportedProtocols () const |
const ProtocolInfoList & | protocols () const |
PendingConnection * | requestConnection (const QString &protocol, const QVariantMap ¶meters) |
DBus::PropertiesInterface * | propertiesInterface () const |
bool | isReady (Features features=0) const |
PendingReadyConnectionManager * | becomeReady (Features features=0) |
Static Public Member Functions | |
static PendingStringList * | listNames (const QDBusConnection &bus=QDBusConnection::sessionBus()) |
Protected Member Functions | |
ConnectionManagerInterface * | baseInterface () const |
Friends | |
struct | Private |
class | PendingConnection |
Classes | |
struct | Private |
Telepathy::Client::ConnectionManager::ConnectionManager | ( | const QString & | name, | |
QObject * | parent = 0 | |||
) |
Construct a new ConnectionManager object.
name | Name of the connection manager. | |
parent | Object parent. |
References Telepathy::Client::ConnectionManager::Private::introspectQueue, and Telepathy::Client::DBusProxy::isValid().
Telepathy::Client::ConnectionManager::ConnectionManager | ( | const QDBusConnection & | bus, | |
const QString & | name, | |||
QObject * | parent = 0 | |||
) |
Construct a new ConnectionManager object.
bus | QDBusConnection to use. | |
name | Name of the connection manager. | |
parent | Object parent. |
References Telepathy::Client::ConnectionManager::Private::introspectQueue, and Telepathy::Client::DBusProxy::isValid().
Telepathy::Client::ConnectionManager::~ConnectionManager | ( | ) | [virtual] |
Class destructor.
QString Telepathy::Client::ConnectionManager::name | ( | ) | const |
Get the short name of the connection manager (e.g. "gabble").
References Telepathy::Client::ConnectionManager::Private::name.
QStringList Telepathy::Client::ConnectionManager::interfaces | ( | ) | const |
QStringList Telepathy::Client::ConnectionManager::supportedProtocols | ( | ) | const |
Get a list of strings identifying the protocols supported by this connection manager, as described in the Telepathy D-Bus API 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.
References Telepathy::Client::ProtocolInfo::name(), Telepathy::Client::ConnectionManager::Private::protocols, and protocols().
const ProtocolInfoList & Telepathy::Client::ConnectionManager::protocols | ( | ) | const |
Get a list of protocols info for this connection manager.
References Telepathy::Client::ConnectionManager::Private::protocols.
Referenced by supportedProtocols().
PendingConnection * Telepathy::Client::ConnectionManager::requestConnection | ( | const QString & | protocol, | |
const QVariantMap & | parameters | |||
) |
Request a Connection object representing a given account on a given protocol with the given parameters.
Return a pending operation representing the Connection object which will succeed when the connection has been created or fail if an error occurred.
protocol | Name of the protocol to create the account for. | |
parameters | Account parameters. |
References PendingConnection.
DBus::propertiesInterface * Telepathy::Client::ConnectionManager::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.
bool Telepathy::Client::ConnectionManager::isReady | ( | Features | features = 0 |
) | const |
Return whether this object has finished its initial setup.
This is mostly useful as a sanity check, in code that shouldn't be run until the object is ready. To wait for the object to be ready, call becomeReady() and connect to the finished signal on the result.
true
if the object has finished initial setup. References Telepathy::Client::ConnectionManager::Private::features, and Telepathy::Client::ConnectionManager::Private::ready.
Referenced by becomeReady().
PendingReadyConnectionManager * Telepathy::Client::ConnectionManager::becomeReady | ( | Features | requestedFeatures = 0 |
) |
Return a pending operation which will succeed when this object finishes its initial setup, or will fail if a fatal error occurs during this initial setup.
References isReady(), Telepathy::Client::DBusProxy::isValid(), Telepathy::Client::ConnectionManager::Private::pendingReady, Telepathy::Client::PendingOperation::setFinished(), Telepathy::Client::PendingOperation::setFinishedWithError(), and TELEPATHY_ERROR_NOT_AVAILABLE.
PendingStringList * Telepathy::Client::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.
ConnectionManagerInterface * Telepathy::Client::ConnectionManager::baseInterface | ( | ) | const [protected] |
Get the 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.
References Telepathy::Client::ConnectionManager::Private::baseInterface.
friend struct Private [friend] |
Reimplemented from Telepathy::Client::StatelessDBusProxy.
friend class PendingConnection [friend] |
Referenced by requestConnection().