QtMobility Reference Documentation

QVersitOrganizerHandlerFactory Class Reference

The QVersitOrganizerHandlerFactory class provides the interface for Versit plugins. More...

 #include <QVersitOrganizerHandlerFactory>

This class was introduced in Qt Mobility 1.2.

Public Functions

virtual ~QVersitOrganizerHandlerFactory ()
virtual QVersitOrganizerHandler * createHandler () const = 0
virtual int index () const
virtual QString name () const = 0
virtual QSet<QString> profiles () const

Static Public Members

const QLatin1Constant ProfileBackup
const QLatin1Constant ProfileSync

Detailed Description

The QVersitOrganizerHandlerFactory class provides the interface for Versit plugins.

This class provides a simple interface for the creation of QVersitOrganizerHandler instances. Implement this interface to write a Versit plugin. For more details, see Versit Plugins.

Member Function Documentation

QVersitOrganizerHandlerFactory::~QVersitOrganizerHandlerFactory () [virtual]

This frees any memory used by the QVersitOrganizerHandlerFactory.

QVersitOrganizerHandler * QVersitOrganizerHandlerFactory::createHandler () const [pure virtual]

This function is called by the Versit importer or exporter class to create an instance of the handler provided by this factory.

int QVersitOrganizerHandlerFactory::index () const [virtual]

This function should return an index that helps with determining the order in which to run the plugins. Plugins are run in the following order:

  • Positively-indexed, ascending
  • Zero-indexed
  • Negatively-indexed, ascending

For example, plugins with an index of 1 are run first and plugins of index -1 are run last. If more than one plugin share an index, the order of execution between them is undefined.

By default, this returns 0, which is recommended for plugins with no special ordering requirements.

QString QVersitOrganizerHandlerFactory::name () const [pure virtual]

This function should return a unique string that identifies the handlers provided by this factory. Typically, this will be of the form "com.nokia.qt.mobility.versit.samplehandler" with the appropriate domain and handler name substituted.

QSet<QString> QVersitOrganizerHandlerFactory::profiles () const [virtual]

This function can be overridden to allow a plugin to report which profiles it is to be active under. If this (as in the default case) returns the empty set, it indicates that the plugin should be loaded under all profiles. If it returns a non-empty set, it will only be loaded for those profiles that are specified by the importer/exporter class.

Member Variable Documentation

const QLatin1Constant QVersitOrganizerHandlerFactory::ProfileBackup

The constant string signifying a plugin that is relevant to import and export in a backup/restore context.

See also profiles(), QVersitOrganizerImporter::QVersitOrganizerImporter(), and QVersitOrganizerExporter::QVersitOrganizerExporter().

const QLatin1Constant QVersitOrganizerHandlerFactory::ProfileSync

The constant string signifying a plugin that is relevant to import and export in a synchronization context.

See also QVersitOrganizerHandlerFactory::profiles(), QVersitOrganizerImporter, and QVersitOrganizerExporter.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.