Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support synchronizing event attachments.
- Loading branch information
Showing
11 changed files
with
374 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
framework/ActiveSync/lib/Horde/ActiveSync/Message/AirSyncBaseAdd.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseAdd:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseAdd:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
class Horde_ActiveSync_Message_AirSyncBaseAdd extends Horde_ActiveSync_Message_Base | ||
{ | ||
|
||
/** | ||
* Property mappings | ||
* | ||
* @var array | ||
*/ | ||
protected $_mapping = array( | ||
Horde_ActiveSync::AIRSYNCBASE_CLIENTID => array(self::KEY_ATTRIBUTE => 'clientid'), | ||
Horde_ActiveSync::AIRSYNCBASE_CONTENT => array(self::KEY_ATTRIBUTE => 'content'), | ||
Horde_ActiveSync::AIRSYNCBASE_CONTENTID => array(self::KEY_ATTRIBUTE => 'contentid'), | ||
Horde_ActiveSync::AIRSYNCBASE_CONTENTLOCATION => array(self::KEY_ATTRIBUTE => 'contentlocation'), | ||
Horde_ActiveSync::AIRSYNCBASE_CONTENTTYPE => array(self::KEY_ATTRIBUTE => 'contenttype'), | ||
Horde_ActiveSync::AIRSYNCBASE_DISPLAYNAME => array(self::KEY_ATTRIBUTE => 'displayname'), | ||
Horde_ActiveSync::AIRSYNCBASE_ISINLINE => array(self::KEY_ATTRIBUTE => 'isinline'), | ||
Horde_ActiveSync::AIRSYNCBASE_METHOD => array(self::KEY_ATTRIBUTE => 'method') | ||
); | ||
|
||
/** | ||
* Property mapping. | ||
* | ||
* @var array | ||
*/ | ||
protected $_properties = array( | ||
'clientid' => false, | ||
'content' => false, | ||
'contentid' => false, | ||
'contentlocation' => false, | ||
'contenttype' => false, | ||
'displayname' => false, | ||
'isinline' => false, | ||
'method' => false, | ||
); | ||
|
||
/** | ||
* Return the type of message. | ||
* | ||
* @return string | ||
*/ | ||
public function getClass() | ||
{ | ||
return 'AirSyncBaseAdd'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
framework/ActiveSync/lib/Horde/ActiveSync/Message/AirSyncBaseAttachments.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseAttachments:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseAttachment:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
class Horde_ActiveSync_Message_AirSyncBaseAttachments extends Horde_ActiveSync_Message_Base | ||
{ | ||
/* Attachement types */ | ||
const ATT_TYPE_NORMAL = 1; | ||
const ATT_TYPE_EMBEDDED = 5; | ||
|
||
/** | ||
* Property mappings | ||
* | ||
* @var array | ||
*/ | ||
protected $_mapping = array( | ||
Horde_ActiveSync::AIRSYNCBASE_ATTACHMENT => array( | ||
self::KEY_ATTRIBUTE => 'attachment', | ||
self::KEY_VALUES => Horde_ActiveSync::AIRSYNCBASE_ATTACHMENT, | ||
self::KEY_PROPERTY => self::PROPERTY_NO_CONTAINER | ||
) | ||
); | ||
|
||
/** | ||
* Property mapping. | ||
* | ||
* @var array | ||
*/ | ||
protected $_properties = array( | ||
'attachment' => false, | ||
); | ||
|
||
/** | ||
* Const'r | ||
* | ||
* @see Horde_ActiveSync_Message_Base::__construct() | ||
*/ | ||
public function __construct(array $options = array()) | ||
{ | ||
parent::__construct($options); | ||
if ($this->_version >= Horde_ActiveSync::VERSION_SIXTEEN) { | ||
$this->_mapping += array( | ||
Horde_ActiveSync::AIRSYNCBASE_ADD => array( | ||
self::KEY_ATTRIBUTE => 'add', | ||
self::KEY_TYPE => 'Horde_ActiveSync_Message_AirSyncBaseAdd', | ||
self::KEY_PROPERTY => self::PROPERTY_MULTI_ARRAY | ||
), | ||
Horde_ActiveSync::AIRSYNCBASE_DELETE => array( | ||
self::KEY_ATTRIBUTE => 'delete', | ||
self::KEY_TYPE => 'Horde_ActiveSync_Message_AirSyncBaseDelete', | ||
self::KEY_PROPERTY => self::PROPERTY_MULTI_ARRAY, | ||
) | ||
); | ||
|
||
$this->_properties += array( | ||
'add' => false, | ||
'delete' => false, | ||
); | ||
} | ||
} | ||
|
||
/** | ||
* Return the type of message. | ||
* | ||
* @return string | ||
*/ | ||
public function getClass() | ||
{ | ||
return 'AirSyncBaseAttachments'; | ||
} | ||
|
||
} |
57 changes: 57 additions & 0 deletions
57
framework/ActiveSync/lib/Horde/ActiveSync/Message/AirSyncBaseDelete.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseDelete:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
/** | ||
* Horde_ActiveSync_Message_AirSyncBaseAdd:: | ||
* | ||
* @license http://www.horde.org/licenses/gpl GPLv2 | ||
* NOTE: According to sec. 8 of the GENERAL PUBLIC LICENSE (GPL), | ||
* Version 2, the distribution of the Horde_ActiveSync module in or | ||
* to the United States of America is excluded from the scope of this | ||
* license. | ||
* @copyright 2011-2016 Horde LLC (http://www.horde.org) | ||
* @author Michael J Rubinsky <mrubinsk@horde.org> | ||
* @package ActiveSync | ||
*/ | ||
class Horde_ActiveSync_Message_AirSyncBaseDelete extends Horde_ActiveSync_Message_Base | ||
{ | ||
|
||
/** | ||
* Property mappings | ||
* | ||
* @var array | ||
*/ | ||
protected $_mapping = array( | ||
Horde_ActiveSync::AIRSYNCBASE_FILEREFERENCE => array(self::KEY_ATTRIBUTE => 'filereference') | ||
); | ||
|
||
/** | ||
* Property mapping. | ||
* | ||
* @var array | ||
*/ | ||
protected $_properties = array( | ||
'filereference' => false | ||
); | ||
|
||
/** | ||
* Return the type of message. | ||
* | ||
* @return string | ||
*/ | ||
public function getClass() | ||
{ | ||
return 'AirSyncBaseDelete'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.