[prev in list] [next in list] [prev in thread] [next in thread]
List: horde-sync
Subject: [sync] more syncml command classes
From: Anthony Mills <amills () gascard ! net>
Date: 2003-12-20 11:14:31
Message-ID: 20031220051431.rgaowsocsc444c4w () online ! gascard ! net
[Download RAW message or body]
This message is in MIME format.
I put these files in this directory horde/framework/RPC/RPC/syncml_command.
Feel free to move them around. The factory can be rewritten to use file names
instead of a switch statement. The elements are case sensitive.
Anthony
["final.txt" (text/plain)]
<?php
include_once 'Horde/RPC/syncml_state.php';
/**
* The Horde_RPC_syncml class provides a SyncML implementation of the
* Horde RPC system.
*
* $Horde: framework/RPC/RPC/syncml.php,v 1.6 2003/12/17 16:02:44 chuck Exp $
*
* Copyright 2003 Anthony Mills <amills@pyramid6.com>
*
* 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 <amills@pyramid6.com>
* @version $Revision: 1.6 $
* @since Horde 3.0
* @package Horde_RPC
*/
/**
* All variables are from the client standpoint.
*
*
*/
class Horde_RPC_syncml_sync_Final extends Horde_RPC_syncml_sync_command {
function output($currentCmdID, $output)
{
attrs = array();
$output->startElement(uri, 'Final', attrs);
$output->endElement(uri, 'Final');
return $currentCmdID;
}
}
["get.txt" (text/plain)]
<?php
include_once 'Horde/RPC/syncml_state.php';
include_once 'Horde/RPC/syncml_status.php';
include_once 'Horde/RPC/syncml_command/command.php';
/**
* The Horde_RPC_syncml class provides a SyncML implementation of the
* Horde RPC system.
*
* $Horde: framework/RPC/RPC/syncml.php,v 1.6 2003/12/17 16:02:44 chuck Exp $
*
* Copyright 2003 Anthony Mills <amills@pyramid6.com>
*
* 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 <amills@pyramid6.com>
* @version $Revision: 1.6 $
* @since Horde 3.0
* @package Horde_RPC
*/
/**
* All variables are from the client standpoint.
*
*
*/
class Horde_RPC_syncml_command_Get extends Horde_RPC_syncml_command {
var $targetURI;
function output($currentCmdID, $output)
{
$status = new Status((($this->_isAuthorized) ? RESPONSE_OK : \
RESPONSE_INVALID_CREDENTIALS), 'Get'); $status->setVersion($this->_version);
$status->setCmdRef($this->_cmdID);
$status->setMsgID($this->_msgID);
if ($this->_targetURI != null)
$status->setTargetRef($targetURI);
$currentCmdID = $status->output($currentCmdID, $output);
// if (isAuthorized) {
// Results results = new Results();
// results.setVersion(version);
// results.setCmdRef(cmdID);
// results.setMsgID(msgID);
//
// //DevInf returnDevInf = new DevInf((version == 0) ? "./devinf" : \
"./devinf11"); //
// //result.setData(devinf);
// currentCmdID = results.output(currentCmdID, contentHandler, \
errorHandler); // }
return $currentCmdID;
}
}
["put.txt" (text/plain)]
<?php
include_once 'Horde/RPC/syncml_state.php';
include_once 'Horde/RPC/syncml_status.php';
include_once 'Horde/RPC/syncml_command/command.php';
/**
* The Horde_RPC_syncml class provides a SyncML implementation of the
* Horde RPC system.
*
* $Horde: framework/RPC/RPC/syncml.php,v 1.6 2003/12/17 16:02:44 chuck Exp $
*
* Copyright 2003 Anthony Mills <amills@pyramid6.com>
*
* 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 <amills@pyramid6.com>
* @version $Revision: 1.6 $
* @since Horde 3.0
* @package Horde_RPC
*/
/**
* All variables are from the client standpoint.
*
*
*/
class Horde_RPC_syncml_command_Put extends Horde_RPC_syncml_command {
var $_sourceURI;
function output($currentCmdID, $output )
{
$status = &new Horde_RPC_syncml_command_Status((($this->_isAuthorized) ? \
RESPONSE_OK : RESPONSE_INVALID_CREDENTIALS), 'Put'); \
$status.setVersion($this->_version); $status.setCmdRef($this->_cmdID);
$status.setMsgID($this->_msgID);
if ($this->_sourceURI != null)
$status.setSourceRef($this->_sourceURI);
return $status->output($currentCmdID, $output);
}
function setSourceURI($sourceURI) {
$this->_sourceURI = $sourceURI;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic