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

Qtopia4SyncPlugin Class Reference

The Qtopia4SyncPlugin class handles synchronization of a single dataset. More...

    #include <Qtopia4SyncPlugin>

Inherits QObject.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The Qtopia4SyncPlugin class handles synchronization of a single dataset.

This class is called to fetch and apply changes. It is controlled by Qtopia4Sync, which remotes the API over QCop messages.

Here is a message flow diagram showing how the class is used.

Qtopia4SyncPlugin message flow.

See also Qtopia4SyncPluginFactory and Add a new device plugin.


Member Function Documentation

Qtopia4SyncPlugin::Qtopia4SyncPlugin ( QObject * parent = 0 )

Construct a Qtopia4SyncPlugin with the specified parent.

Qtopia4SyncPlugin::~Qtopia4SyncPlugin ()   [virtual]

Destructor.

void Qtopia4SyncPlugin::abortTransaction ()   [pure virtual]

Abort the transaction started with beginTransaction().

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

Begin a transaction. The timestamp may be ignored.

See also abortTransaction() and commitTransaction().

void Qtopia4SyncPlugin::clientChangesCompleted ()   [signal]

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

void Qtopia4SyncPlugin::clientError ()   [signal]

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

void Qtopia4SyncPlugin::commitTransaction ()   [pure virtual]

Commit the transaction started with beginTransaction().

void Qtopia4SyncPlugin::createClientRecord ( const QByteArray & record )   [signal]

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

See also replaceClientRecord(), removeClientRecord(), and clientChangesCompleted().

void Qtopia4SyncPlugin::createServerRecord ( const QByteArray & record )   [pure virtual]

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

QString Qtopia4SyncPlugin::dataset ()   [pure virtual]

Returns the dataset that this plugin handles.

void Qtopia4SyncPlugin::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 createClientRecord(), replaceClientRecord(), removeClientRecord(), and clientChangesCompleted().

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

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

void Qtopia4SyncPlugin::removeClientRecord ( const QString & identifier )   [signal]

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

See also createClientRecord(), replaceClientRecord(), and clientChangesCompleted().

void Qtopia4SyncPlugin::removeServerRecord ( const QString & identifier )   [pure virtual]

Remove the item indicated by identifier.

void Qtopia4SyncPlugin::replaceClientRecord ( const QByteArray & record )   [signal]

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

See also createClientRecord(), removeClientRecord(), and clientChangesCompleted().

void Qtopia4SyncPlugin::replaceServerRecord ( const QByteArray & record )   [pure virtual]

Update the item specified in record.


Copyright © 2009 Trolltech
Qt Extended Sync Agent Documentation