Qt Extended Home · Index · Classes · Headers · Overviews codeless banner

QDServerSyncPlugin Class Reference

The QDServerSyncPlugin class handles a single dataset on the desktop. More...

    #include <QDServerSyncPlugin>

Inherits QDSyncPlugin.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QDServerSyncPlugin class handles a single dataset on the desktop.

This class is implemented to add support for a new dataset to Qt Extended Sync Agent. It is called by the Sync Manager. Note that the sync process is designed to be asynchronous. The methods of this class can return immediately as status is returned via signals.

Here is an example of how the plugin is used by the Sync Manager.

QDServerSyncPlugin message flow.

See also Add a new desktop plugin.


Member Function Documentation

QDServerSyncPlugin::QDServerSyncPlugin ( QObject * parent = 0 )

Construct a QDServerSyncPlugin with parent as the owning QObject.

QDServerSyncPlugin::~QDServerSyncPlugin ()   [virtual]

Destructor.

void QDServerSyncPlugin::abortTransaction ()   [pure virtual]

Abort the transaction started with beginTransaction().

void QDServerSyncPlugin::beginTransaction ( const QDateTime & timestamp )   [pure virtual]

Begin a transaction. The timestamp may be ignored.

See also abortTransaction() and commitTransaction().

void QDServerSyncPlugin::commitTransaction ()   [pure virtual]

Commit the transaction started with beginTransaction().

void QDServerSyncPlugin::createClientRecord ( const QByteArray & record )   [pure virtual]

Create the item specified in record. Emit mappedId() so that the client record can be matched to the server record.

void QDServerSyncPlugin::createServerRecord ( const QByteArray & record )   [signal]

Emit this signal in response to fetchChangesSince() to send a new record.

See also replaceServerRecord(), removeServerRecord(), and serverChangesCompleted().

void QDServerSyncPlugin::fetchChangesSince ( const QDateTime & timestamp )   [pure virtual]

Fetch changes since timestamp. Data and progress should be reported by emitting signals. This funtion can return before the fetching is completed.

Note that timestamp is in UTC time.

See also createServerRecord(), replaceServerRecord(), removeServerRecord(), and serverChangesCompleted().

void QDServerSyncPlugin::mappedId ( const QString & clientId, const QString & serverId )   [signal]

Emit this signal in response to createClientRecord(). It maps client id clientId to server id serverId.

void QDServerSyncPlugin::removeClientRecord ( const QString & identifier )   [pure virtual]

Remove the item indicated by identifier.

void QDServerSyncPlugin::removeServerRecord ( const QString & identifier )   [signal]

Emit this signal in response to fetchChangesSince() to send a delete of identifier.

See also createServerRecord(), replaceServerRecord(), and serverChangesCompleted().

void QDServerSyncPlugin::replaceClientRecord ( const QByteArray & record )   [pure virtual]

Update the item specified in record.

void QDServerSyncPlugin::replaceServerRecord ( const QByteArray & record )   [signal]

Emit this signal in response to fetchChangesSince() to send a modified record.

See also createServerRecord(), removeServerRecord(), and serverChangesCompleted().

void QDServerSyncPlugin::serverChangesCompleted ()   [signal]

Emit this signal in response to fetchChangesSince() when all changes have been reported.

void QDServerSyncPlugin::serverError ()   [signal]

Emit this signal any time if an error is encountered and the sync will be aborted.


Copyright © 2009 Trolltech
Qt Extended Sync Agent Documentation