TpPrototype::ConnectionFacade Class Reference
[Convenience Classes]

#include <TelepathyQt4/Prototype/ConnectionFacade.h>

Collaboration diagram for TpPrototype::ConnectionFacade:

Collaboration graph
[legend]

List of all members.

Public Member Functions

QStringList listOfConnectionManagers ()
QStringList listOfProtocolsForConnectionManager (const QString &connectionManager)
Telepathy::ParamSpecList paramSpecListForConnectionManagerAndProtocol (const QString &connectionManager, const QString &protocol)
QVariantMap parameterListForConnectionManagerAndProtocol (const QString &connectionManager, const QString &protocol)
QVariantMap parameterListForProtocol (const QString &protocol, int account_number=1) ATTRIBUTE_DEPRECATED
TpPrototype::ConnectionconnectionWithAccount (Account *account, int account_number=1) ATTRIBUTE_DEPRECATED
int selfHandleForConnectionInterface (Telepathy::Client::ConnectionInterface *connectionInterface)

Static Public Member Functions

static ConnectionFacadeinstance ()


Detailed Description

Class to access to Telepathy and Mission control services. This class is used to encapsulate the low level D-BUS Interface to Telepathy and MissionControl. It provides a series of helper functions.
This class follows the facade pattern.
Todo:
Move as much functions as possible into adequate classes.

Member Function Documentation

TpPrototype::Connection * ConnectionFacade::connectionWithAccount ( Account account,
int  account_number = 1 
)

Connects to account. Connects an account to a service using the default connection manager.

Deprecated:
Use Account::connection() instead!
Parameters:
account The account to use.
Returns:
A connection. A null pointer is returned if the connection was not successful.

References TpPrototype::Account::connection(), listOfConnectionManagers(), parameterListForProtocol(), TpPrototype::registerTypes(), and TpPrototype::Account::setParameters().

ConnectionFacade * ConnectionFacade::instance (  )  [static]

QStringList ConnectionFacade::listOfConnectionManagers (  ) 

Returns a list of all connection managers registered.

Returns:
List of connection manager names.

References TpPrototype::DBusInterface::listActivatableNames(), and TpPrototype::registerTypes().

Referenced by connectionWithAccount(), and listOfProtocolsForConnectionManager().

QStringList ConnectionFacade::listOfProtocolsForConnectionManager ( const QString &  connectionManager  ) 

Returns a list of supported protocols of a connection manager.

Returns:
List of supported protocols.

References listOfConnectionManagers(), Telepathy::Client::ConnectionManagerInterface::ListProtocols(), and TpPrototype::registerTypes().

QVariantMap ConnectionFacade::parameterListForConnectionManagerAndProtocol ( const QString &  connectionManager,
const QString &  protocol 
)

Returns a list of parameters for the given protocol and connection manager.

Parameters:
connectionManager The connection manager for the protocol.
protocol Name of the protocol that is supported by the connection manager.
Returns:
A map with all supported parameters with default values.

References Telepathy::ParamSpec::defaultValue, Telepathy::ParamSpec::flags, Telepathy::ParamSpec::name, and paramSpecListForConnectionManagerAndProtocol().

QVariantMap ConnectionFacade::parameterListForProtocol ( const QString &  protocol,
int  account_number = 1 
)

Returns a list of parameters for the given protocol.

Deprecated:
Use parameterListForConnectionManagerAndProtocol() instead!
Parameters:
protocol Name of the protocol.
Returns:
A map with all supported parameters with default values.

References TpPrototype::registerTypes().

Referenced by connectionWithAccount().

Telepathy::ParamSpecList ConnectionFacade::paramSpecListForConnectionManagerAndProtocol ( const QString &  connectionManager,
const QString &  protocol 
)

Returns a Telepathy::ParamSpecList from the given protocol an connection manager.

Parameters:
connectionManager The connection manager for the protocol.
protocol Name of the protocol that is supported by the connection manager.
Returns:
A map with all supported parameters with default values.

References Telepathy::Client::ConnectionManagerInterface::GetParameters(), and TpPrototype::registerTypes().

Referenced by parameterListForConnectionManagerAndProtocol().

int ConnectionFacade::selfHandleForConnectionInterface ( Telepathy::Client::ConnectionInterface connectionInterface  ) 

Returns the self handle. The self handle is needed by various interfaces to request information about myself

Todo:
: This is more or less a local function and should not be part of a public API. But I don't have a better place right now!
Returns:
The local handle is usually 1 but may change on demand. -1 is returned on error.

References Telepathy::Client::ConnectionInterface::GetSelfHandle().

Referenced by TpPrototype::CapabilitiesManager::capabilities(), TpPrototype::ContactManager::localHandle(), TpPrototype::AvatarManager::requestAvatar(), TpPrototype::AvatarManager::slotAvatarRetrieved(), TpPrototype::AvatarManager::slotAvatarUpdated(), and TpPrototype::CapabilitiesManager::slotCapabilitiesChanged().


Generated on Thu Mar 5 18:52:15 2009 for TelepathyQt4-0.1.1 by  doxygen 1.5.8