Home · All Classes · All Namespaces · Modules · Functions · Files |
The FixedFeatureFactory class is a base class for all D-Bus proxy factories which want the same set of features for all constructed proxies. More...
#include <TelepathyQt4/FixedFeatureFactory>
Inherits Tp::DBusProxyFactory.
Inherited by Tp::AccountFactory, and Tp::ConnectionFactory.
The FixedFeatureFactory class is a base class for all D-Bus proxy factories which want the same set of features for all constructed proxies.
Tp::FixedFeatureFactory::~FixedFeatureFactory | ( | ) | [virtual] |
Class destructor.
Tp::FixedFeatureFactory::FixedFeatureFactory | ( | const QDBusConnection & | bus | ) | [protected] |
Class constructor.
The intention for storing the bus here is that it generally doesn't make sense to construct proxies for multiple buses in the same context. Allowing that would lead to more complex keying needs in the cache, as well.
bus | The D-Bus bus connection for the objects constructed using this factory. |
Features Tp::FixedFeatureFactory::features | ( | ) | const |
Gets the features this factory will make ready on constructed proxies.
void Tp::FixedFeatureFactory::addFeature | ( | const Feature & | feature | ) |
Adds a single feature this factory will make ready on further constructed proxies.
No feature removal is provided, to guard against uncooperative modules removing features other modules have set and depend on.
feature | The feature to add. |
void Tp::FixedFeatureFactory::addFeatures | ( | const Features & | features | ) |
Adds a set of features this factory will make ready on further constructed proxies.
No feature removal is provided, to guard against uncooperative modules removing features other modules have set and depend on.
features | The features to add. |
Features Tp::FixedFeatureFactory::featuresFor | ( | const DBusProxyPtr & | proxy | ) | const [protected, virtual] |
Return the features which should be made ready on a given proxy.
This can be used to implement instance-specific features based on arbitrary criteria. FixedFeatureFactory implements this as a fixed set of features independent of the instance, however.
It should be noted that if an empty set of features is returned, ReadyObject::becomeReady() is not called at all. In other words, any "core feature" is not automatically added to the requested features. This is to enable setting a factory to not make proxies ready at all, which is useful eg. in the case of account editing UIs which aren't interested in the state of Connection objects for the Account objects they're editing.
proxy | The proxy on which the returned features will be made ready. |
Fixed implementation of the per-proxy feature getter.
Implements Tp::DBusProxyFactory.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt4 0.8.0 |