1.0The Horde Framework4711workstation./contactstext/x-vcard2.1text/x-vcard2.11234567./calendartext/x-vcalendar2.0text/x-vcalendar1.0text/x-vcalendar2.0text/x-vcalendar1.01234567text/x-vcalendarBEGINVCALENDARVEVENTVTODODTSTARTDTENDDTSTAMPSEQUENCEENDVCALENDARVEVENTVTODOUIDSUMMARYVERSION1.0AALARMCATEGORIESCLASSDALARMEXDATERESOURCESSTATUSATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTIONDUELAST-MODIFIEDLOCATIONPRIORITYRELATED-TORRULETRANSPURLtext/calendarBEGINVCALENDARVEVENTVTODOVALARMDTSTARTDTENDDTSTAMPSEQUENCEENDVCALENDARVEVENTVTODOVALARMUIDSUMMARYVERSION2.0CATEGORIESCLASSDALARMEXDATERESOURCESSTATUSATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTIONDUELAST-MODIFIEDLOCATIONPRIORITYRELATED-TOTRANSPURLRRULECOMMMENTACTIONTRIGGERDURATIONREPEATtext/x-vcardBEGINVCARDENDVCARDVERSION2.1ENCODINGVALUECHARSETFNNNAMENICKNAMEPHOTOBDAYADRLABELTELEMAILMAILERTZGEOTITLEROLELOGOAGENTORGCATEGORIESNOTEPRODIDREVSORT-STRINGSOUNDURLUIDCLASSKEY');
define('DEFAULT_DEFINF_11', '1.1The Horde Framework4711workstation./contactstext/x-vcard2.1text/x-vcard2.11234567./calendartext/x-vcalendar2.0text/x-vcalendar1.0text/x-vcalendar2.0text/x-vcalendar1.01234567text/x-vcalendarBEGINVCALENDARVEVENTVTODODTSTARTDTENDDTSTAMPSEQUENCEENDVCALENDARVEVENTVTODOUIDSUMMARYVERSION1.0AALARMCATEGORIESCLASSDALARMEXDATERESOURCESSTATUSATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTIONDUELAST-MODIFIEDLOCATIONPRIORITYRELATED-TORRULETRANSPURLtext/calendarBEGINVCALENDARVEVENTVTODOVALARMDTSTARTDTENDDTSTAMPSEQUENCEENDVCALENDARVEVENTVTODOVALARMUIDSUMMARYVERSION2.0CATEGORIESCLASSDALARMEXDATERESOURCESSTATUSATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTIONDUELAST-MODIFIEDLOCATIONPRIORITYRELATED-TOTRANSPURLRRULECOMMMENTACTIONTRIGGERDURATIONREPEATtext/x-vcardBEGINVCARDENDVCARDVERSION2.1ENCODINGVALUECHARSETFNNNAMENICKNAMEPHOTOBDAYADRLABELTELEMAILMAILERTZGEOTITLEROLELOGOAGENTORGCATEGORIESNOTEPRODIDREVSORT-STRINGSOUNDURLUIDCLASSKEY');
#define('DEFAULT_DEFINF', '1.0The Horde Framework4711'.
#'workstationcontactstext/x-vcard2.1'.
#'text/x-vcard2.1127'.
#''.
#
#'calendartext/x-vcalendar2.0'.
#'text/x-vcalendar1.0text/x-vcalendar2.0'.
#'text/x-vcalendar1.017'.
#
#'text/x-vcalendarBEGINVCALENDARVEVENT'.
#'VTODODTSTARTDTENDDTSTAMPSEQUENCE'.
#'ENDVCALENDARVEVENTVTODOUID'.
#'SUMMARYVERSION1.0AALARMCATEGORIES',
#'CLASSDALARMEXDATERESOURCESSTATUS',
#'ATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTION'.
#'DUELAST-MODIFIEDLOCATIONPRIORITY'.
#'RELATED-TORRULETRANSPURL'.
#'text/calendarBEGINVCALENDARVEVENTVTODO'.
#'VALARMDTSTARTDTENDDTSTAMPSEQUENCE'.
#'ENDVCALENDARVEVENTVTODOVALARM'.
#'UIDSUMMARYVERSION2.0CATEGORIES'.
#'CLASSDALARMEXDATERESOURCESSTATUS'.
#'ATTACHATTENDEEDCREATEDCOMPLETEDDESCRIPTION'.
#'DUELAST-MODIFIEDLOCATIONPRIORITY'.
#'RELATED-TOTRANSPURLRRULECOMMMENT'.
#'ACTIONTRIGGERDURATIONREPEAT'.
#
#'text/x-vcardBEGINVCARDENDVCARD'.
#'VERSION2.1ENCODINGVALUECHARSET'.
#'FNNNAMENICKNAMEPHOTO'.
#'BDAYADRLABELTELEMAIL'.
#'MAILERTZGEOTITLEROLE'.
#'LOGOAGENTORGCATEGORIESNOTE'.
#'PRODIDREVSORT-STRINGSOUNDURL'.
#'UIDCLASSKEY');
/**
* The Horde_SyncML_Command_Get class.
*
* $Horde: framework/SyncML/SyncML/Command/Get.php,v 1.14 2004/07/02 19:24:44 chuck Exp $
*
* Copyright 2003-2004 Anthony Mills
*
* See the enclosed file COPYING for license information (LGPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @author Anthony Mills
* @author Karsten Fourmont
* @version $Revision$
* @since Horde 3.0
* @package Horde_SyncML
*/
class Horde_SyncML_Command_Get extends Horde_SyncML_Command {
function output($currentCmdID, &$output)
{
$state = $_SESSION['SyncML.state'];
$ref = ($state->getVersion() == 0) ? './devinf10' : './devinf11';
$status = &new Horde_SyncML_Command_Status((($state->isAuthorized()) ? RESPONSE_OK : RESPONSE_INVALID_CREDENTIALS), 'Get');
$status->setCmdRef($this->_cmdID);
$status->setTargetRef($ref);
$currentCmdID = $status->output($currentCmdID, $output);
Horde::logMessage('SyncML: end output ref: '.$ref, __FILE__, __LINE__, PEAR_LOG_DEBUG);
// Currently DEVINF seems to be ok only for SyncML 1.0. But
// this is used by P800/P900 and these seem to require it:
if ($state->isAuthorized() && $state->getVersion() == 0) {
$results = &new Horde_SyncML_Command_Results();
$results->setCmdRef($this->_cmdID);
$results->setType("application/vnd.syncml-devinf+xml");
$results->setlocSourceURI($ref);
$results->setData(DEFAULT_DEFINF_10);
$currentCmdID = $results->output($currentCmdID, $output);
}
elseif($state->isAuthorized() && $state->getVersion() == 1)
{
$results = &new Horde_SyncML_Command_Results();
$results->setCmdRef($this->_cmdID);
$results->setType("application/vnd.syncml-devinf+xml");
$results->setlocSourceURI($ref);
$results->setData(DEFAULT_DEFINF_11);
$currentCmdID = $results->output($currentCmdID, $output);
}
return $currentCmdID;
}
}