QtMobility Reference Documentation

QVersitResourceHandler Class Reference

The QVersitResourceHandler class is an interface for clients wishing to implement custom behaviour for loading and saving files to disk when exporting and importing. More...

 #include <QVersitResourceHandler>

Inherited by: QVersitDefaultResourceHandler.

This class was introduced in Qt Mobility 1.0.

Public Functions

virtual ~QVersitResourceHandler ()
virtual bool loadResource ( const QString & location, QByteArray * contents, QString * mimeType ) = 0
virtual bool saveResource ( const QByteArray & contents, const QVersitProperty & property, QString * location ) = 0

Detailed Description

The QVersitResourceHandler class is an interface for clients wishing to implement custom behaviour for loading and saving files to disk when exporting and importing.

See also QVersitContactImporter, QVersitContactExporter, and QVersitDefaultResourceHandler.

Member Function Documentation

QVersitResourceHandler::~QVersitResourceHandler () [virtual]

Frees any memory used by the handler.

bool QVersitResourceHandler::loadResource ( const QString & location, QByteArray * contents, QString * mimeType ) [pure virtual]

Loads a file from location. *contents is filled with the contents of the file and *mimeType is set to the MIME type that it is determined to be. Returns true on success, false on failure.

bool QVersitResourceHandler::saveResource ( const QByteArray & contents, const QVersitProperty & property, QString * location ) [pure virtual]

Saves the binary data contents to a file on a persistent storage medium.

property holds the QVersitProperty which is the context in which the binary is coming from. The QVersitResourceHandler can use this, for example, to determine file extension it should choose. *location is filled with the contents of the file. Returns true on success, false on failure.

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.