/usr/share/php/Horde/ActiveSync/Folder/Collection.php is in php-horde-activesync 2.19.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | <?php
/**
* Horde_ActiveSync_Folder_Collection::
*
* @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 2012-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @package ActiveSync
*/
/**
* The class contains functionality for maintaining state for a generic
* collection folder. This would include Appointments, Contacts, and Tasks.
*
* @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 2012-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @package ActiveSync
*/
class Horde_ActiveSync_Folder_Collection extends Horde_ActiveSync_Folder_Base implements Serializable
{
const VERSION = 1;
/**
* Flag for indicating we have an initial sync for this collection.
*
* @var boolean
*/
public $haveInitialSync = false;
/**
* Updates the internal UID cache, and clears the internal
* update/deleted/changed cache.
*/
public function updateState()
{
$this->haveInitialSync = true;
}
/**
* Convert the instance into a string.
*
* @return string The string representation for this instance.
*/
public function __toString()
{
return sprintf(
'serverid: %s\nclass: %s\n',
$this->serverid(),
$this->collectionClass());
}
/**
* Serialize this object.
*
* @return string The serialized data.
*/
public function serialize()
{
return json_encode(array(
's' => $this->_status,
'f' => $this->_serverid,
'c' => $this->_class,
'lsd' => $this->_lastSinceDate,
'sd' => $this->_softDelete,
'i' => $this->haveInitialSync,
'v' => self::VERSION)
);
}
/**
* Reconstruct the object from serialized data.
*
* @param string $data The serialized data.
* @throws Horde_ActiveSync_Exception_StaleState
*/
public function unserialize($data)
{
$data = @json_decode($data, true);
if (!is_array($data) || empty($data['v']) || $data['v'] != self::VERSION) {
throw new Horde_ActiveSync_Exception_StaleState('Cache version change');
}
$this->_status = $data['s'];
$this->_serverid = $data['f'];
$this->_class = $data['c'];
$this->haveInitialSync = $data['i'];
$this->_lastSinceDate = empty($data['lsd']) ? 0 : $data['lsd'];
$this->_softDelete = empty($data['sd']) ? 0 : $data['sd'];
}
}
|