From: Michael J. Rubinsky Date: Wed, 12 May 2010 22:20:45 +0000 (-0400) Subject: Implement the last of the non-email related requests for AS version 2.5 support.Imple... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=65d18e22c90c3a331aff7a2b0ef06602927112cf;p=horde.git Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support.Implement the last of the non-email related requests for AS version 2.5 support. --- diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Request/GetHierarchy.php b/framework/ActiveSync/lib/Horde/ActiveSync/Request/GetHierarchy.php new file mode 100644 index 000000000..25139fb3d --- /dev/null +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Request/GetHierarchy.php @@ -0,0 +1,46 @@ + + * @package Horde_ActiveSync + */ +/** + * Zarafa Deutschland GmbH, www.zarafaserver.de + * This file is distributed under GPL v2. + * Consult LICENSE file for details + */ +class Horde_ActiveSync_Request_GetHierarchy extends Horde_ActiveSync_Request_Base +{ + /** + * Handle request + * + * @return boolean + */ + public function handle() + { + $folders = $this->_driver->GetHierarchy(); + if (!$folders) { + return false; + } + + /* save folder-ids for fourther syncing */ + $this->_stateMachine->setFolderData($this->_device, $folders); + + $this->_encoder->StartWBXML(); + $this->_encoder->startTag(self::FOLDERHIERARCHY_FOLDERS); + + foreach ($folders as $folder) { + $this->_encoder->startTag(self::FOLDERHIERARCHY_FOLDER); + $folder->encodeStream($this->_encoder); + $this->_encoder->endTag(); + } + $this->_encoder->endTag(); + + return true; + } +} \ No newline at end of file diff --git a/framework/ActiveSync/package.xml b/framework/ActiveSync/package.xml index 36d4d3596..0d4aca3fa 100644 --- a/framework/ActiveSync/package.xml +++ b/framework/ActiveSync/package.xml @@ -72,6 +72,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> + @@ -125,6 +126,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> +