adapted to C++ client API change: supported datatypes now in config
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@258 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
parent
c5a5a27a02
commit
0a67a4a786
4 changed files with 9 additions and 20 deletions
|
@ -60,6 +60,7 @@ class EvolutionCalendarSource : public EvolutionSyncSource
|
|||
virtual string fileSuffix() { return "ics"; }
|
||||
virtual const char *getMimeType() { return "text/calendar"; }
|
||||
virtual const char *getMimeVersion() { return "2.0"; }
|
||||
virtual const char *getSupportedTypes() { return "text/calendar:2.0"; }
|
||||
|
||||
virtual SyncItem *createItem( const string &uid, SyncState state );
|
||||
|
||||
|
@ -68,14 +69,6 @@ class EvolutionCalendarSource : public EvolutionSyncSource
|
|||
//
|
||||
virtual ArrayElement *clone() { return new EvolutionCalendarSource(*this); }
|
||||
|
||||
const char **getSendTypes() {
|
||||
static const char *types[] = { "text/calendar", "2.0",
|
||||
NULL };
|
||||
|
||||
return types;
|
||||
}
|
||||
const char **getRecvTypes() { return getSendTypes(); }
|
||||
|
||||
protected:
|
||||
//
|
||||
// implementation of EvolutionSyncSource callbacks
|
||||
|
|
|
@ -71,7 +71,7 @@ class EvolutionContactSource : public EvolutionSyncSource
|
|||
virtual string fileSuffix() { return "vcf"; }
|
||||
virtual const char *getMimeType();
|
||||
virtual const char *getMimeVersion();
|
||||
|
||||
virtual const char *getSupportedTypes() { return "text/vcard:3.0,text/x-vcard:2.1"; }
|
||||
|
||||
virtual SyncItem *createItem( const string &uid, SyncState state );
|
||||
|
||||
|
@ -79,15 +79,6 @@ class EvolutionContactSource : public EvolutionSyncSource
|
|||
// implementation of SyncSource
|
||||
//
|
||||
virtual ArrayElement *clone() { return new EvolutionContactSource(*this); }
|
||||
|
||||
const char **getSendTypes() {
|
||||
static const char *types[] = { "text/vcard", "3.0",
|
||||
"text/x-vcard", "2.1",
|
||||
NULL };
|
||||
|
||||
return types;
|
||||
}
|
||||
const char **getRecvTypes() { return getSendTypes(); }
|
||||
|
||||
protected:
|
||||
//
|
||||
|
|
|
@ -530,6 +530,7 @@ int EvolutionSyncClient::sync()
|
|||
// above prevents that these modifications overwrite the user settings.
|
||||
sc.setType(syncSource->getMimeType());
|
||||
sc.setVersion(syncSource->getMimeVersion());
|
||||
sc.setSupportedTypes(syncSource->getSupportedTypes());
|
||||
syncSource->setConfig(sc);
|
||||
|
||||
if (m_syncMode != SYNC_NONE) {
|
||||
|
@ -556,8 +557,6 @@ int EvolutionSyncClient::sync()
|
|||
dc.setDevType("workstation");
|
||||
dc.setUtc(1);
|
||||
dc.setOem("Open Source");
|
||||
dc.setFwv("unknown");
|
||||
dc.setHwv("unknown");
|
||||
|
||||
// ready to go: dump initial databases and prepare for final report
|
||||
sourceList.syncPrepare();
|
||||
|
|
|
@ -154,6 +154,12 @@ class EvolutionSyncSource : public SyncSource
|
|||
* the actual version of the mime specification
|
||||
*/
|
||||
virtual const char *getMimeVersion() = 0;
|
||||
|
||||
/**
|
||||
* supported data types for send and receive,
|
||||
* in the format "type1:version1,type2:version2,..."
|
||||
*/
|
||||
virtual const char *getSupportedTypes() = 0;
|
||||
|
||||
/**
|
||||
* resets the lists of all/new/updated/deleted items
|
||||
|
|
Loading…
Reference in a new issue