Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
The SyncAppInterface class provides an interface for loading and saving data of a Qtopia application. More...
#include <interfaces/syncapp.h>
For every Qtopia application that should be synced with a Qtopia Desktop component, there has to be exactly one SyncAppInterface implementation capable of reading and saving the Qtopia applications native file format. Qtopia Desktop by default implements SyncAppInterfaces for the "Contacts", "Calendar" and "Todo List" Qtopia applications.
The most important functions in this interface are load() and save() which load/save native Qtopia application data from/to a file. Both work on a QValueList of MergeML::Records which the native applications data is converted to/from.
The SyncAppInterface also provides to methods to map integer representations of data keys to their name and vice versa. keyName() returns the name of a key for a given integer representation while key() returns the integer representing a key of a given name.
The palmtopApplicationName() method returns the name of the Qtopia application whose native application data this interface is capable of loading/saving.
The uniqueness() method returns a mapping of keys and their uniqueness used in the syncing process.
The fileForSyncApp() method returns the name and location of the file used by the Qtopia application to store application data on the Qtopia device.
See also PluginInterface, MergeInterface, CenterInterface, ImportInterface, ExportInterface, and Qtopia Desktop Classes.
This enum describes the location of the file on the device.
This enum describes how Qtopia Desktop should handle merges.
This method is called after synchronization is done for your plugin. If you need to do any form of postprocessing after synchronization, you can safely do it in this method.
Returns a QPair of the filename and the location used to store data in dataSet format.
Returns the integer representing the key named keyString of data format dataset.
Returns the name of the key represented by the integer key of data format dataset.
This function is called by Qtopia Desktop to read a dataset from a file. It is passed the filename of the file to load in filename and the name of the data format in dataset.
It returns a list of MergeML::Records.
Reimplement this method if you need to handle special cases during synchronization which cannot be automatically handled by Qtopia Desktop. Note that all merges will be passed to this method. Return SyncAppInterface::AutoMerge where you want Qtopia Desktop to handle the merges.
rec1 and rec2 is the two records that needs to be merged together. The results of the merge should be written to manualMergeOut.
If you discover a conflict you should return SyncAppInterface::Conflicting after adding your changes to manualMergeOut, otherwise if you did the merge and no conflicts were detected return SyncAppInterface::ManualMerge
Return false in this method if you do not want Qtopia Desktop to attempt merging two changed records into one change.
Returns the name of the Qtopia Desktop component associated with this dataset.
This function is called by Qtopia Desktop to save a list of MergeML::Records to a file with filename filename in data format dataset.
This method is called before synchronization is being started for your plugin. If you need to do any form of preprocessing before synchronization, you can safely do it in this method.
Returns a QMap of uniqueness values for keys of data format dataSet.
This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|