Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions | Static Public Member Functions | Protected Member Functions

Tp::ChannelFactory Class Reference

Constructs Channel objects. More...

#include <TelepathyQt4/ChannelFactory>

Inherits Tp::DBusProxyFactory.

List of all members.

Public Member Functions

Static Public Member Functions

Protected Member Functions


Detailed Description

Constructs Channel objects.

Todo:
This class is currently only a placeholder to enable using factories in general in other classes. There is no actual configurability in the construction behavior, although a factory-style construction API is provided.

Constructor & Destructor Documentation

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

Class destructor.

Tp::ChannelFactory::ChannelFactory ( const QDBusConnection &  bus  )  [protected]

Class constructor.

The constructed factory will construct channel subclasses provided by TelepathyQt4 as appropriate for the channel immutable properties, but not make any features ready.

Parameters:
bus The QDBusConnection the proxies constructed using this factory should use.

Member Function Documentation

ChannelFactoryPtr Tp::ChannelFactory::create ( const QDBusConnection &  bus  )  [static]

Create a new ChannelFactory object for the given bus.

The returned factory will construct channel subclasses provided by TelepathyQt4 as appropriate for the channel immutable properties, but not make any features ready.

Parameters:
bus The QDBusConnection the proxies constructed using this factory should use.
Returns:
An ChannelFactoryPtr pointing to the newly created factory.
PendingReady * Tp::ChannelFactory::proxy ( const ConnectionPtr connection,
const QString &  channelPath,
const QVariantMap &  immutableProperties 
) const

Constructs a Channel proxy (and someday begins making it ready.)

If a valid proxy already exists in the factory cache for the given combination of busName and objectPath, it is returned instead. All newly created proxies are automatically cached until they're either DBusProxy::invalidated() or the last reference to them outside the factory has been dropped.

The proxy can be accessed immediately after this function returns using PendingReady::proxy().

Todo:
Make it configurable which subclass is constructed and which features, if any, are made ready on it.
Parameters:
connection Proxy for the owning connection of the channel.
channelPath The object path of the channel.
immutableProperties The immutable properties of the channel.
Returns:
A PendingReady operation with the proxy in PendingReady::proxy().
QString Tp::ChannelFactory::finalBusNameFrom ( const QString &  uniqueOrWellKnown  )  const [protected, virtual]

Transforms well-known names to the corresponding unique names, as is appropriate for Channel

Parameters:
uniqueOrWellKnown The name to transform.
Returns:
The unique name corresponding to uniqueOrWellKnown (which may be it itself).

Implements Tp::DBusProxyFactory.

Features Tp::ChannelFactory::featuresFor ( const SharedPtr< RefCounted > &  proxy  )  const [protected, virtual]

Returns features as configured for the channel class given by the Channel::immutableProperties() of proxy.

Todo:
Make the features configurable - currently an empty set is always returned.
Parameters:
proxy The Channel proxy to determine the features for.
Returns:
The channel class-specific features.

Implements Tp::DBusProxyFactory.


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.3.10