Home · All Classes · All Namespaces · Modules · Functions · Files
Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
Tp::BaseConnection Class Reference

Base class for Connection implementations. More...

#include <TelepathyQt/BaseConnection>

Inherits Tp::DBusService.

List of all members.

Public Types

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions


Detailed Description

Base class for Connection implementations.


Member Typedef Documentation

typedef Callback2<BaseChannelPtr, const QVariantMap &, DBusError*> Tp::BaseConnection::CreateChannelCallback

Constructor & Destructor Documentation

Class destructor.

Tp::BaseConnection::BaseConnection ( const QDBusConnection &  dbusConnection,
const QString &  cmName,
const QString &  protocolName,
const QVariantMap &  parameters 
) [protected]

Construct a BaseConnection.

Parameters:
dbusConnectionThe D-Bus connection that will be used by this object.
cmNameThe name of the connection manager associated with this connection.
protocolNameThe name of the protocol associated with this connection.
parametersThe parameters of this connection.

Member Function Documentation

static BaseConnectionPtr Tp::BaseConnection::create ( const QString &  cmName,
const QString &  protocolName,
const QVariantMap &  parameters,
const QDBusConnection &  dbusConnection = QDBusConnection::sessionBus() 
) [inline, static]
template<typename BaseConnectionSubclass >
static SharedPtr<BaseConnectionSubclass> Tp::BaseConnection::create ( const QString &  cmName,
const QString &  protocolName,
const QVariantMap &  parameters,
const QDBusConnection &  dbusConnection = QDBusConnection::sessionBus() 
) [inline, static]
QString Tp::BaseConnection::cmName ( ) const

Return the name of the connection manager associated with this connection.

Returns:
The name of the connection manager associated with this connection.

Return the name of the protocol associated with this connection.

Returns:
The name of the protocol associated with this connection.
QVariantMap Tp::BaseConnection::parameters ( ) const

Return the parameters of this connection.

Returns:
The parameters of this connection.
QVariantMap Tp::BaseConnection::immutableProperties ( ) const [virtual]

Return the immutable properties of this connection object.

Immutable properties cannot change after the object has been registered on the bus with registerObject().

Returns:
The immutable properties of this connection object.

Implements Tp::DBusService.

void Tp::BaseConnection::setSelfHandle ( uint  selfHandle)
QString Tp::BaseConnection::selfID ( ) const
void Tp::BaseConnection::setSelfID ( const QString &  selfID)
void Tp::BaseConnection::setSelfContact ( uint  selfHandle,
const QString &  selfID 
)
void Tp::BaseConnection::setStatus ( uint  newStatus,
uint  reason 
)
Tp::BaseChannelPtr Tp::BaseConnection::createChannel ( const QVariantMap &  request,
bool  suppressHandler,
DBusError error 
)
QStringList Tp::BaseConnection::inspectHandles ( uint  handleType,
const Tp::UIntList handles,
DBusError error 
)
Tp::UIntList Tp::BaseConnection::requestHandles ( uint  handleType,
const QStringList &  identifiers,
DBusError error 
)
Tp::BaseChannelPtr Tp::BaseConnection::ensureChannel ( const QVariantMap &  request,
bool &  yours,
bool  suppressHandler,
DBusError error 
)

Return a new or exists channel, satisfying the given request.

This method iterate over exist channels to find the one satisfying the request. If there is no suitable channel, then new channel with given request details will be created. This method uses the matchChannel() method to check whether there exists a channel which confirms with the request.

If error is passed, any error that may occur will be stored there.

Parameters:
requestA dictionary containing the desirable properties.
yoursA returning argument. true if returned channel is a new one and false otherwise.
suppressHandlerAn option to suppress handler in case of a new channel creation.
errorA pointer to an empty DBusError where any possible error will be stored.
Returns:
A pointer to a channel, satisfying the given request.
See also:
matchChannel()
void Tp::BaseConnection::addChannel ( BaseChannelPtr  channel,
bool  suppressHandler = false 
)
QList< AbstractConnectionInterfacePtr > Tp::BaseConnection::interfaces ( ) const

Return a list of interfaces that have been plugged into this Protocol D-Bus object with plugInterface().

This property is immutable and cannot change after this Protocol object has been registered on the bus with registerObject().

Returns:
A list containing all the Protocol interface implementation objects.
See also:
plugInterface(), interface()
AbstractConnectionInterfacePtr Tp::BaseConnection::interface ( const QString &  interfaceName) const

Return a pointer to the interface with the given name.

Parameters:
interfaceNameThe D-Bus name of the interface, ex. TP_QT_IFACE_CONNECTION_INTERFACE_ADDRESSING.
Returns:
A pointer to the AbstractConnectionInterface object that implements the D-Bus interface with the given name, or a null pointer if such an interface has not been plugged into this object.
See also:
plugInterface(), interfaces()
bool Tp::BaseConnection::plugInterface ( const AbstractConnectionInterfacePtr &  interface)

Plug a new interface into this Connection D-Bus object.

This property is immutable and cannot change after this Protocol object has been registered on the bus with registerObject().

Parameters:
interfaceAn AbstractConnectionInterface instance that implements the interface that is to be plugged.
Returns:
true on success or false otherwise
See also:
interfaces(), interface()

Register this connection object on the bus.

If error is passed, any D-Bus error that may occur will be stored there.

Parameters:
errorA pointer to an empty DBusError where any possible D-Bus error will be stored.
Returns:
true on success and false if there was an error or this connection object is already registered.
See also:
isRegistered()
QString Tp::BaseConnection::uniqueName ( ) const [virtual]

Return a unique name for this connection.

Returns:
A unique name for this connection.

Emitted when this connection has been disconnected.

bool Tp::BaseConnection::registerObject ( const QString &  busName,
const QString &  objectPath,
DBusError error 
) [protected, virtual]

Reimplemented from DBusService.

Reimplemented from Tp::DBusService.

bool Tp::BaseConnection::matchChannel ( const Tp::BaseChannelPtr &  channel,
const QVariantMap &  request,
Tp::DBusError error 
) [protected, virtual]

Check channel on conformity with request.

This virtual method is used to check if a channel satisfying the given request. It is warranted, that the type of the channel meets the requested type.

The default implementation compares TargetHandleType and TargetHandle/TargetID. If error is passed, any error that may occur will be stored there.

Parameters:
channelA pointer to a channel to be checked.
requestA dictionary containing the desirable properties.
errorA pointer to an empty DBusError where any possible error will be stored.
Returns:
true if channel match the request and false otherwise.
See also:
ensureChannel()


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