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

QDClientSyncPlugin Class Reference

The QDClientSyncPlugin class represents a sync client. More...

    #include <QDClientSyncPlugin>

Inherits QDSyncPlugin.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The QDClientSyncPlugin class represents a sync client.

The sync implementation uses both client and server plugins. Client plugins represent a dataset on a Qt Extended device and are expected to handle the entire sync protocol. If you do not know what datasets will be supported at compile time, use QDClientSyncPluginFactory instead.

Note that this class is designed to be remoted. The methods can return immediately as status is returned via signals.


Member Function Documentation

QDClientSyncPlugin::QDClientSyncPlugin ( QObject * parent = 0 )

Construct a QDClientSyncPlugin with parent as the owning QObject.

QDClientSyncPlugin::~QDClientSyncPlugin ()   [virtual]

Destructor.

void QDClientSyncPlugin::clientEnd ()   [signal]

Emit this signal when all changes have been sent.

void QDClientSyncPlugin::clientError ()   [signal]

Emit this signal to send an error. The sync will be aborted.

void QDClientSyncPlugin::clientIdentity ( const QString & id )   [signal]

Emit this signal to set the client's identity to id.

void QDClientSyncPlugin::clientSyncAnchors ( const QDateTime & clientLastSync, const QDateTime & clientNextSync )   [signal]

Emit this signal to set the client's sync anchors to clientLastSync and clientNextSync. Note that clientLastSync and clientNextSync should be in UTC time.

void QDClientSyncPlugin::clientVersion ( int major, int minor, int patch )   [signal]

Emit this signal to set the client's version to the values major, minor and patch.

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

Emit this signal to send a new record.

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

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

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

void QDClientSyncPlugin::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 QDClientSyncPlugin::removeClientRecord ( const QString & clientId )   [signal]

Emit this signal to send a delete of the record with client id clientId.

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

void QDClientSyncPlugin::removeServerRecord ( const QString & clientId )   [pure virtual slot]

Remove the item indicated by client id clientId.

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

Emit this signal to send a modified record.

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

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

Update the item specified in record.

void QDClientSyncPlugin::requestSlowSync ()   [pure virtual slot]

Perform a slow sync. All changes should be sent.

void QDClientSyncPlugin::requestTwoWaySync ()   [pure virtual slot]

Perform a two-way (fast) sync. Only changes since the last sync should be sent.

void QDClientSyncPlugin::serverEnd ()   [pure virtual slot]

The server has finished sending changes.

void QDClientSyncPlugin::serverError ()   [pure virtual slot]

The server has encountered an error. The sync will be aborted.

void QDClientSyncPlugin::serverIdentity ( const QString & server )   [pure virtual slot]

The server's identity is server.

void QDClientSyncPlugin::serverSyncAnchors ( const QDateTime & serverLastSync, const QDateTime & serverNextSync )   [pure virtual slot]

The server's sync anchors are serverLastSync and serverNextSync. Note that serverLastSync and serverNextSync are in UTC time.

void QDClientSyncPlugin::serverSyncRequest ( const QString & source )   [pure virtual slot]

The server has requested a sync with datasource source.

void QDClientSyncPlugin::serverVersion ( int major, int minor, int patch )   [pure virtual slot]

The server's version is equivalent to the values major, minor and patch.


Copyright © 2009 Nokia
Qt Extended Sync Agent Documentation