added inclusion of config.h (needed since adding ENABLE_ECAL/EBOOK)

added meta information callbacks


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@193 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
Patrick Ohly 2006-07-25 21:25:51 +00:00
parent 9c886fd2b5
commit b1067bfe5b
2 changed files with 39 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#ifndef INCL_EVOLUTIONCALENDARSOURCE
#define INCL_EVOLUTIONCALENDARSOURCE
#include <config.h>
#include "EvolutionSyncSource.h"
#include "EvolutionSmartPtr.h"
@ -64,7 +65,25 @@ class EvolutionCalendarSource : public EvolutionSyncSource
// implementation of SyncSource
//
virtual ArrayElement *clone() { return new EvolutionCalendarSource(*this); }
void getPreferredTypes(const char*& recvType,
const char*& recvVersion,
const char*& sendType,
const char*& sendVersion) {
// these might be the preferred types, but in the end
// the configured type is used
recvType = "text/calendar";
recvVersion = "2.0";
sendType = "text/calendar";
sendVersion = "2.0";
}
const char **getSendTypes() {
static const char *types[] = { "text/calendar", "2.0",
NULL };
return types;
}
const char **getRecvTypes() { return getSendTypes(); }
protected:
//
// implementation of EvolutionSyncSource callbacks

View File

@ -19,6 +19,7 @@
#ifndef INCL_EVOLUTIONCONTACTSOURCE
#define INCL_EVOLUTIONCONTACTSOURCE
#include <config.h>
#include "EvolutionSyncSource.h"
#include "EvolutionSmartPtr.h"
@ -75,6 +76,25 @@ class EvolutionContactSource : public EvolutionSyncSource
// implementation of SyncSource
//
virtual ArrayElement *clone() { return new EvolutionContactSource(*this); }
void getPreferredTypes(const char*& recvType,
const char*& recvVersion,
const char*& sendType,
const char*& sendVersion) {
// these might be the preferred types, but in the end
// the configured type is used
recvType = "text/vcard";
recvVersion = "3.0";
sendType = "text/vcard";
sendVersion = "3.0";
}
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:
//