Add additional datastores

This commit is contained in:
Jörg Lehrke 2009-11-17 07:13:21 +00:00
parent 86d648a995
commit 4b490c2e8b
3 changed files with 15 additions and 6 deletions

View File

@ -106,8 +106,12 @@ class Horde_SyncML_Command_Get extends Horde_SyncML_Command {
array('text/plain' => '1.0'));
$this->_writeDataStore('./contacts', 'text/vcard', '3.0', $output,
array('text/x-vcard' => '2.1'));
$this->_writeDataStore('./card', 'text/vcard', '3.0', $output,
array('text/x-vcard' => '2.1'));
$this->_writeDataStore('./tasks', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./jobs', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./calendar', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./events', 'text/calendar', '2.0', $output,

View File

@ -159,6 +159,7 @@ class Horde_SyncML_Command_Put extends Horde_SyncML_Command {
switch ($this->_sourceReference)
{
case 'contact':
case 'card':
if ($this->_contentType != "text/x-s4j-sifc")
{
error_log("forcing 'contact' content type to 'text/x-s4j-sifc' instead of '".$this->_contentType."'");

View File

@ -153,17 +153,17 @@ define('SERVER_SYNC_FINNISHED', 5);
define('SERVER_SYNC_ACKNOWLEDGED', 6);
// conflict management
define('CONFLICT_CLIENT_WINNING', 0);
define('CONFLICT_SERVER_WINNING', 1);
define('CONFLICT_MERGE_DATA', 2);
define('CONFLICT_CLIENT_WINNING', 0);
define('CONFLICT_SERVER_WINNING', 1);
define('CONFLICT_MERGE_DATA', 2);
define('CONFLICT_RESOLVED_WITH_DUPLICATE', 3);
define('CONFLICT_CLIENT_CHANGES_IGNORED', 4);
define('CONFLICT_CLIENT_REFRESH_ENFORCED', 5);
define('MAX_DATA', 19);
define('MAX_ENTRIES', 10); // default
define('MAX_GUID_SIZE', 64);
define('MIN_MSG_LEFT', 200); // Overhead
define('MAX_ENTRIES', 10); // default
define('MAX_GUID_SIZE', 64);
define('MIN_MSG_LEFT', 200); // Overhead
/**
* The Horde_SyncML_State class provides a SyncML state object.
@ -846,6 +846,7 @@ class Horde_SyncML_State {
$_type = str_replace('./','',$type);
switch (strtolower($_type)) {
case 'contacts':
case 'card':
return 'text/vcard';
break;
@ -856,6 +857,7 @@ class Horde_SyncML_State {
case 'calendar':
case 'events':
case 'tasks':
case 'jobs':
case 'caltasks':
return 'text/calendar';
break;
@ -892,6 +894,7 @@ class Horde_SyncML_State {
switch(strtolower($_type))
{
case 'contacts':
case 'card':
return 'contacts';
break;
@ -900,6 +903,7 @@ class Horde_SyncML_State {
break;
case 'tasks':
case 'jobs':
return 'tasks';
break;