Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::AccountFactory Class Reference

The AccountFactory class is responsible for constructing Account objects according to application-defined settings. More...

#include <TelepathyQt/AccountFactory>

Inheritance diagram for Tp::AccountFactory:
Inheritance graph
[legend]

Public Member Functions

virtual ~AccountFactory ()
 
PendingReadyproxy (const QString &busName, const QString &objectPath, const ConnectionFactoryConstPtr &connFactory, const ChannelFactoryConstPtr &chanFactory, const ContactFactoryConstPtr &contactFactory) const
 
- Public Member Functions inherited from Tp::FixedFeatureFactory
virtual ~FixedFeatureFactory ()
 
Features features () const
 
void addFeature (const Feature &feature)
 
void addFeatures (const Features &features)
 
- Public Member Functions inherited from Tp::DBusProxyFactory
virtual ~DBusProxyFactory ()
 
const QDBusConnectiondbusConnection () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual  ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 
 QObject (QObject *parent, const char *name)
 
void insertChild (QObject *object)
 
void removeChild (QObject *object)
 
bool isA (const char *className) const
 
const char * className () const
 
const char * name () const
 
const char * name (const char *defaultName) const
 
void setName (const char *name)
 
- Public Member Functions inherited from Tp::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 

Static Public Member Functions

static AccountFactoryPtr create (const QDBusConnection &bus, const Features &features=Features())
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 

Protected Member Functions

 AccountFactory (const QDBusConnection &bus, const Features &features)
 
virtual AccountPtr construct (const QString &busName, const QString &objectPath, const ConnectionFactoryConstPtr &connFactory, const ChannelFactoryConstPtr &chanFactory, const ContactFactoryConstPtr &contactFactory) const
 
virtual QString finalBusNameFrom (const QString &uniqueOrWellKnown) const
 
- Protected Member Functions inherited from Tp::FixedFeatureFactory
 FixedFeatureFactory (const QDBusConnection &bus)
 
virtual Features featuresFor (const DBusProxyPtr &proxy) const
 
- Protected Member Functions inherited from Tp::DBusProxyFactory
 DBusProxyFactory (const QDBusConnection &bus)
 
DBusProxyPtr cachedProxy (const QString &busName, const QString &objectPath) const
 
PendingReadynowHaveProxy (const DBusProxyPtr &proxy) const
 
virtual PendingOperationinitialPrepare (const DBusProxyPtr &proxy) const
 
virtual PendingOperationreadyPrepare (const DBusProxyPtr &proxy) const
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 

Additional Inherited Members

- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The AccountFactory class is responsible for constructing Account objects according to application-defined settings.

The class is used by AccountManager and other classes which construct Account proxy instances to enable sharing instances of application-defined Account subclasses with certain features always ready.

Constructor & Destructor Documentation

Tp::AccountFactory::~AccountFactory ( )
virtual

Class destructor.

Tp::AccountFactory::AccountFactory ( const QDBusConnection bus,
const Features features 
)
protected

Construct a new AccountFactory object.

As in create(), it should be noted that unlike Account::becomeReady(), FeatureCore isn't assumed. If no features are specified, no Account::becomeReady() call is made at all and the proxy won't be Account::isReady().

Parameters
busThe QDBusConnection for proxies constructed using this factory to use.
featuresThe features to make ready on constructed Accounts.

Member Function Documentation

AccountFactoryPtr Tp::AccountFactory::create ( const QDBusConnection bus,
const Features features = Features() 
)
static

Create a new AccountFactory object.

Optionally, the features to make ready on all constructed proxies can be specified. The default is to make no features ready. It should be noted that unlike Account::becomeReady(), FeatureCore isn't assumed. If no features are specified, which is the default behavior, no Account::becomeReady() call is made at all and the proxy won't be Account::isReady().

Parameters
busThe QDBusConnection for proxies constructed using this factory to use.
featuresThe features to make ready on constructed Accounts.
Returns
An AccountFactoryPtr object pointing to the newly created AccountFactory object.
PendingReady * Tp::AccountFactory::proxy ( const QString busName,
const QString objectPath,
const ConnectionFactoryConstPtr &  connFactory,
const ChannelFactoryConstPtr &  chanFactory,
const ContactFactoryConstPtr &  contactFactory 
) const

Constructs an Account proxy and 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(). The ready operation only finishes, however, when the features specified by features(), if any, are made ready as much as possible. If the service doesn't support a given feature, they won't obviously be ready even if the operation finished successfully, as is the case for Account::becomeReady().

Parameters
busNameThe bus/service name of the D-Bus account object the proxy is constructed for. (Usually TP_QT_ACCOUNT_MANAGER_BUS_NAME).
objectPathThe object path of the account.
connFactoryThe connection factory to use for the Account.
chanFactoryThe channel factory to use for the Account.
contactFactoryThe channel factory to use for the Account.
Returns
A PendingReady operation with the proxy in PendingReady::proxy().
AccountPtr Tp::AccountFactory::construct ( const QString busName,
const QString objectPath,
const ConnectionFactoryConstPtr &  connFactory,
const ChannelFactoryConstPtr &  chanFactory,
const ContactFactoryConstPtr &  contactFactory 
) const
protectedvirtual

Can be used by subclasses to override the Account subclass constructed by the factory.

This is automatically called by proxy() to construct proxy instances if no valid cached proxy is found.

The default implementation constructs Tp::Account objects.

Parameters
busNameThe bus/service name of the D-Bus account object the proxy is constructed for. (Usually TP_QT_ACCOUNT_MANAGER_BUS_NAME).
objectPathThe object path of the account.
connFactoryThe connection factory to use for the Account.
chanFactoryThe channel factory to use for the Account.
contactFactoryThe channel factory to use for the Account.
Returns
A pointer to the constructed Account object.
QString Tp::AccountFactory::finalBusNameFrom ( const QString uniqueOrWellKnown) const
protectedvirtual

Identity transform, as is appropriate for Account objects.

Parameters
uniqueOrWellKnownThe name to transform.
Returns
uniqueOrWellKnown

Implements Tp::DBusProxyFactory.


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