* @package ActiveSync
* @deprecated To be removed for Horde 6. Use Horde_Mapi_Timezone::.
*/
class Horde_ActiveSync_Timezone
{
/**
* Date to use as start date when iterating through offsets looking for a
* transition.
*
* @var Horde_Date
*/
protected $_startDate;
/**
* Convert a timezone from the ActiveSync base64 structure to a TZ offset
* hash.
*
* @param base64 encoded timezone structure defined by MS as:
*
* typedef struct TIME_ZONE_INFORMATION {
* LONG Bias;
* WCHAR StandardName[32];
* SYSTEMTIME StandardDate;
* LONG StandardBias;
* WCHAR DaylightName[32];
* SYSTEMTIME DaylightDate;
* LONG DaylightBias;};
*
*
* With the SYSTEMTIME format being:
*
* typedef struct _SYSTEMTIME {
* WORD wYear;
* WORD wMonth;
* WORD wDayOfWeek;
* WORD wDay;
* WORD wHour;
* WORD wMinute;
* WORD wSecond;
* WORD wMilliseconds;
* } SYSTEMTIME, *PSYSTEMTIME;
*
*
* See: http://msdn.microsoft.com/en-us/library/ms724950%28VS.85%29.aspx
* and: http://msdn.microsoft.com/en-us/library/ms725481%28VS.85%29.aspx
*
* @return array Hash of offset information
*/
static public function getOffsetsFromSyncTZ($data)
{
if (version_compare(PHP_VERSION, '5.5.0-dev', '>=')) {
$format = 'lbias/Z64stdname/vstdyear/vstdmonth/vstdday/vstdweek/vstdhour/vstdminute/vstdsecond/vstdmillis/'
. 'lstdbias/Z64dstname/vdstyear/vdstmonth/vdstday/vdstweek/vdsthour/vdstminute/vdstsecond/vdstmillis/'
. 'ldstbias';
} else {
$format = 'lbias/a64stdname/vstdyear/vstdmonth/vstdday/vstdweek/vstdhour/vstdminute/vstdsecond/vstdmillis/'
. 'lstdbias/a64dstname/vdstyear/vdstmonth/vdstday/vdstweek/vdsthour/vdstminute/vdstsecond/vdstmillis/'
. 'ldstbias';
}
$tz = unpack($format, base64_decode($data));
$tz['timezone'] = $tz['bias'];
$tz['timezonedst'] = $tz['dstbias'];
if (!self::_isLittleEndian()) {
$tz['bias'] = self::_chbo($tz['bias']);
$tz['stdbias'] = self::_chbo($tz['stdbias']);
$tz['dstbias'] = self::_chbo($tz['dstbias']);
}
return $tz;
}
/**
* Build an ActiveSync TZ blob given a TZ Offset hash.
*
* @param array $offsets A TZ offset hash
*
* @return string A base64_encoded ActiveSync Timezone structure suitable
* for transmitting via wbxml.
*/
static public function getSyncTZFromOffsets(array $offsets)
{
if (!self::_isLittleEndian()) {
$offsets['bias'] = self::_chbo($offsets['bias']);
$offsets['stdbias'] = self::_chbo($offsets['stdbias']);
$offsets['dstbias'] = self::_chbo($offsets['dstbias']);
}
$packed = pack('la64vvvvvvvvla64vvvvvvvvl',
$offsets['bias'], '', 0, $offsets['stdmonth'], $offsets['stdday'], $offsets['stdweek'], $offsets['stdhour'], $offsets['stdminute'], $offsets['stdsecond'], $offsets['stdmillis'],
$offsets['stdbias'], '', 0, $offsets['dstmonth'], $offsets['dstday'], $offsets['dstweek'], $offsets['dsthour'], $offsets['dstminute'], $offsets['dstsecond'], $offsets['dstmillis'],
$offsets['dstbias']);
return base64_encode($packed);
}
/**
* Create a offset hash suitable for use in ActiveSync transactions
*
* @param Horde_Date $date A date object representing the date to base the
* the tz data on.
*
* @return array An offset hash.
*/
static public function getOffsetsFromDate(Horde_Date $date)
{
$offsets = array(
'bias' => 0,
'stdname' => '',
'stdyear' => 0,
'stdmonth' => 0,
'stdday' => 0,
'stdweek' => 0,
'stdhour' => 0,
'stdminute' => 0,
'stdsecond' => 0,
'stdmillis' => 0,
'stdbias' => 0,
'dstname' => '',
'dstyear' => 0,
'dstmonth' => 0,
'dstday' => 0,
'dstweek' => 0,
'dsthour' => 0,
'dstminute' => 0,
'dstsecond' => 0,
'dstmillis' => 0,
'dstbias' => 0
);
$timezone = $date->toDateTime()->getTimezone();
list($std, $dst) = self::_getTransitions($timezone, $date);
if ($std) {
$offsets['bias'] = $std['offset'] / 60 * -1;
if ($dst) {
$offsets = self::_generateOffsetsForTransition($offsets, $std, 'std');
$offsets = self::_generateOffsetsForTransition($offsets, $dst, 'dst');
$offsets['stdhour'] += $dst['offset'] / 3600;
$offsets['dsthour'] += $std['offset'] / 3600;
$offsets['dstbias'] = ($dst['offset'] - $std['offset']) / 60 * -1;
}
}
return $offsets;
}
/**
* Get the transition data for moving from DST to STD time.
*
* @param DateTimeZone $timezone The timezone to get the transition for
* @param Horde_Date $date The date to start from. Really only the
* year we are interested in is needed.
*
* @return array An array containing the the STD and DST transitions
*/
static protected function _getTransitions(DateTimeZone $timezone, Horde_Date $date)
{
$std = $dst = array();
$transitions = $timezone->getTransitions(
mktime(0, 0, 0, 12, 1, $date->year - 1),
mktime(24, 0, 0, 12, 31, $date->year)
);
foreach ($transitions as $i => $transition) {
try {
$d = new Horde_Date($transition['time']);
$d->setTimezone('UTC');
} catch (Exception $e) {
continue;
}
if (($d->format('Y') == $date->format('Y')) && isset($transitions[$i + 1])) {
$next = new Horde_Date($transitions[$i + 1]['ts']);
if ($d->format('Y') == $next->format('Y')) {
$dst = $transition['isdst'] ? $transition : $transitions[$i + 1];
$std = $transition['isdst'] ? $transitions[$i + 1] : $transition;
} else {
$dst = $transition['isdst'] ? $transition: null;
$std = $transition['isdst'] ? null : $transition;
}
break;
} elseif ($i == count($transitions) - 1) {
$std = $transition;
}
}
return array($std, $dst);
}
/**
* Calculate the offsets for the specified transition
*
* @param array $offsets A TZ offset hash
* @param array $transition A transition hash
* @param string $type Transition type - dst or std
*
* @return array A populated offset hash
*/
static protected function _generateOffsetsForTransition(array $offsets, array $transition, $type)
{
// We can't use Horde_Date directly here, since it is unable to
// properly convert to UTC from local ON the exact hour of a std -> dst
// transition. This is due to a conversion to DateTime in the localtime
// zone internally before the timezone change is applied
$transitionDate = new DateTime($transition['time']);
$transitionDate->setTimezone(new DateTimeZone('UTC'));
$transitionDate = new Horde_Date($transitionDate);
$offsets[$type . 'month'] = $transitionDate->format('n');
$offsets[$type . 'day'] = $transitionDate->format('w');
$offsets[$type . 'minute'] = (int)$transitionDate->format('i');
$offsets[$type . 'hour'] = (int)$transitionDate->format('H');
for ($i = 5; $i > 0; $i--) {
if (self::_isNthOcurrenceOfWeekdayInMonth($transition['ts'], $i)) {
$offsets[$type . 'week'] = $i;
break;
}
}
return $offsets;
}
/**
* Attempt to guess the timezone identifier from the $offsets array.
*
* @param array|string $offsets The timezone to check. Either an array
* of offsets or an activesynz tz blob.
* @param string $expectedTimezone The expected timezone. If not empty, and
* present in the results, will return.
*
* @return string The timezone identifier
*/
public function getTimezone($offsets, $expectedTimezone = null)
{
$timezones = $this->getListOfTimezones($offsets, $expectedTimezone);
if (isset($timezones[$expectedTimezone])) {
return $expectedTimezone;
} else {
return current($timezones);
}
}
/**
* Get the list of timezone identifiers that match the given offsets, having
* a preference for $expectedTimezone if it's present in the results.
*
* @param array|string $offsets Either an offset array, or a AS timezone
* structure.
* @param string $expectedTimezone The expected timezone.
*
* @return array An array of timezone identifiers
*/
public function getListOfTimezones($offsets, $expectedTimezone = null)
{
if (is_string($offsets)) {
$offsets = self::getOffsetsFromSyncTZ($offsets);
}
$this->_setDefaultStartDate($offsets);
$timezones = array();
foreach (DateTimeZone::listIdentifiers() as $timezoneIdentifier) {
$timezone = new DateTimeZone($timezoneIdentifier);
if (false !== ($matchingTransition = $this->_checkTimezone($timezone, $offsets))) {
if ($timezoneIdentifier == $expectedTimezone) {
$timezones = array($timezoneIdentifier => $matchingTransition['abbr']);
break;
} else {
$timezones[$timezoneIdentifier] = $matchingTransition['abbr'];
}
}
}
if (empty($timezones)) {
throw new Horde_ActiveSync_Exception('No timezone found for the given offsets');
}
return $timezones;
}
/**
* Set default value for $_startDate.
*
* Tries to guess the correct startDate depending on object property falls
* back to current date.
*
* @param array $offsets Offsets may be avaluated for a given start year
*/
protected function _setDefaultStartDate(array $offsets = null)
{
if (!empty($this->_startDate)) {
return;
}
if (!empty($offsets['stdyear'])) {
$this->_startDate = new Horde_Date($offsets['stdyear'] . '-01-01');
} else {
$start = new Horde_Date(time());
$start->year--;
$this->_startDate = $start;
}
}
/**
* Check if the given timezone matches the offsets and also evaluate the
* daylight saving time transitions for this timezone if necessary.
*
* @param DateTimeZone $timezone The timezone to check.
* @param array $offsets The offsets to check.
*
* @return array|boolean An array of transition data or false if timezone
* does not match offset.
*/
protected function _checkTimezone(DateTimeZone $timezone, array $offsets)
{
list($std, $dst) = $this->_getTransitions($timezone, $this->_startDate);
if ($this->_checkTransition($std, $dst, $offsets)) {
return $std;
}
return false;
}
/**
* Check if the given standardTransition and daylightTransition match to the
* given offsets.
*
* @param array $std The Standard transition date.
* @param array $dst The DST transition date.
* @param array $offsets The offsets to check.
*
* @return boolean
*/
protected function _checkTransition(array $std, array $dst, array $offsets)
{
if (empty($std) || empty($offsets)) {
return false;
}
$standardOffset = ($offsets['bias'] + $offsets['stdbias']) * 60 * -1;
// check each condition in a single if statement and break the chain
// when one condition is not met - for performance reasons
if ($standardOffset == $std['offset']) {
if ((empty($offsets['dstmonth']) && (empty($dst) || empty($dst['isdst']))) ||
(empty($dst) && !empty($offsets['dstmonth']))) {
// Offset contains DST, but no dst to compare
return true;
}
$daylightOffset = ($offsets['bias'] + $offsets['dstbias']) * 60 * -1;
// the milestone is sending a positive value for daylightBias while it should send a negative value
$daylightOffsetMilestone = ($offsets['dstbias'] + ($offsets['dstbias'] * -1) ) * 60 * -1;
if ($daylightOffset == $dst['offset'] || $daylightOffsetMilestone == $dst['offset']) {
$standardParsed = new DateTime($std['time']);
$daylightParsed = new DateTime($dst['time']);
if ($standardParsed->format('n') == $offsets['stdmonth'] &&
$daylightParsed->format('n') == $offsets['dstmonth'] &&
$standardParsed->format('w') == $offsets['stdday'] &&
$daylightParsed->format('w') == $offsets['dstday'])
{
return self::_isNthOcurrenceOfWeekdayInMonth($dst['ts'], $offsets['dstweek']) &&
self::_isNthOcurrenceOfWeekdayInMonth($std['ts'], $offsets['stdweek']);
}
}
}
return false;
}
/**
* Test if the weekday of the given timestamp is the nth occurence of this
* weekday within its month, where '5' indicates the last occurrence even if
* there is less than five occurrences.
*
* @param integer $timestamp The timestamp to check.
* @param integer $occurence 1 to 5, where 5 indicates the final occurrence
* during the month if that day of the week does
* not occur 5 times
* @return boolean
*/
static protected function _isNthOcurrenceOfWeekdayInMonth($timestamp, $occurence)
{
$original = new Horde_Date($timestamp);
$original->setTimezone('UTC');
if ($occurence == 5) {
$modified = $original->add(array('mday' => 7));
return $modified->month > $original->month;
} else {
$modified = $original->sub(array('mday' => 7 * $occurence));
$modified2 = $original->sub(array('mday' => 7 * ($occurence - 1)));
return $modified->month < $original->month &&
$modified2->month == $original->month;
}
}
/**
* Determine if the current machine is little endian.
*
* @return boolean True if endianness is little endian, otherwise false.
*/
static protected function _isLittleEndian() {
$testint = 0x00FF;
$p = pack('S', $testint);
return ($testint === current(unpack('v', $p)));
}
/**
* Change the byte order of a number. Used to allow big endian machines to
* decode the timezone blobs, which are encoded in little endian order.
*
* @param integer $num The number to reverse.
*
* @return integer The number, in the reverse byte order.
*/
static protected function _chbo($num) {
$u = unpack('l', strrev(pack('l', $num)));
return $u[1];
}
}
Horde_ActiveSync-2.12.3/lib/Horde/ActiveSync/Translation.php 0000664 0000766 0000024 00000004517 12273362323 020611 0 ustar
* @package ActiveSync
*/
/**
* Horde_ActiveSync_Translation is the translation wrapper class
* for Horde_ActiveSync.
*
* @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 2010-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky
* @package ActiveSync
*/
class Horde_ActiveSync_Translation extends Horde_Translation
{
/**
* Returns the translation of a message.
*
* @var string $message The string to translate.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
static public function t($message)
{
self::$_domain = 'Horde_ActiveSync';
self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../locale' : '@data_dir@/Horde_ActiveSync/locale';
return parent::t($message);
}
/**
* Returns the plural translation of a message.
*
* @param string $singular The singular version to translate.
* @param string $plural The plural version to translate.
* @param integer $number The number that determines singular vs. plural.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
static public function ngettext($singular, $plural, $number)
{
self::$_domain = 'Horde_ActiveSync';
self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../locale' : '@data_dir@/Horde_ActiveSync/locale';
return parent::ngettext($singular, $plural, $number);
}
}
Horde_ActiveSync-2.12.3/lib/Horde/ActiveSync/Utils.php 0000664 0000766 0000024 00000016642 12273362323 017415 0 ustar
* @package ActiveSync
*/
/**
* Horde_ActiveSync_Utils:: contains general utilities.
*
* @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 2010-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky
* @package ActiveSync
*/
class Horde_ActiveSync_Utils
{
/**
* Decode a base64 encoded URI
*
* @param string $url The Base64 encoded string.
*
* @return array The decoded request
*/
static public function decodeBase64($uri)
{
$commandMap = array(
0 => 'Sync',
1 => 'SendMail',
2 => 'SmartForward',
3 => 'SmartReply',
4 => 'GetAttachment',
9 => 'FolderSync',
10 => 'FolderCreate',
11 => 'FolderDelete',
12 => 'FolderUpdate',
13 => 'MoveItems',
14 => 'GetItemEstimate',
15 => 'MeetingResponse',
16 => 'Search',
17 => 'Settings',
18 => 'Ping',
19 => 'ItemOperations',
20 => 'Provision',
21 => 'ResolveRecipients',
22 => 'ValidateCert'
);
$stream = fopen('php://temp', 'r+');
fwrite($stream, base64_decode($uri));
rewind($stream);
$results = array();
// Version, command, locale
$data = unpack('CprotocolVersion/Ccommand/vlocale', fread($stream, 4));
$results['ProtVer'] = substr($data['protocolVersion'], 0, -1) . '.' . substr($data['protocolVersion'], -1);
$results['Cmd'] = $commandMap[$data['command']];
$results['Locale'] = $data['locale'];
// deviceId
$length = ord(fread($stream, 1));
if ($length > 0) {
$data = fread($stream, $length);
$data = unpack('H' . ($length * 2) . 'DevID', $data);
$results['DeviceId'] = $data['DevID'];
}
// policyKey
$length = ord(fread($stream, 1));
if ($length > 0) {
$data = unpack('VpolicyKey', fread($stream, $length));
$results['PolicyKey'] = $data['policyKey'];
}
// deviceType
$length = ord(fread($stream, 1));
if ($length > 0) {
$data = unpack('A' . $length . 'devType', fread($stream, $length));
$results['DeviceType'] = $data['devType'];
}
// Remaining properties
while (!feof($stream)) {
$tag = ord(fread($stream, 1));
$length = ord(fread($stream, 1));
switch ($tag) {
case 0:
$data = unpack('A' . $length . 'AttName', fread($stream, $length));
$results['AttachmentName'] = $data['AttName'];
break;
case 1:
$data = unpack('A' . $length . 'CollId', fread($stream, $length));
$results['CollectionId'] = $data['CollId'];
break;
case 3:
$data = unpack('A' . $length . 'ItemId', fread($stream, $length));
$results['ItemId'] = $data['ItemId'];
break;
case 4:
$data = unpack('A' . $length . 'Lid', fread($stream, $length));
$results['LongId'] = $data['Lid'];
break;
case 5:
$data = unpack('A' . $length . 'Pid', fread($stream, $length));
$results['ParentId'] = $data['Pid'];
break;
case 6:
$data = unpack('A' . $length . 'Oc', fread($stream, $length));
$results['Occurrence'] = $data['Oc'];
break;
case 7:
$options = ord(fread($stream, 1));
$results['SaveInSent'] = !!($options & 0x01);
$results['AcceptMultiPart'] = !!($options & 0x02);
break;
case 8:
$data = unpack('A' . $length . 'User', fread($stream, $length));
$results['User'] = $data['User'];
break;
}
}
return $results;
}
/**
* Obtain the UID from a MAPI GOID.
*
* See http://msdn.microsoft.com/en-us/library/hh338153%28v=exchg.80%29.aspx
*
* @param string $goid Base64 encoded Global Object Identifier.
*
* @return string The UID
* @deprecated Will be removed in H6. Use Horde_Mapi::getUidFromGoid
*/
static public function getUidFromGoid($goid)
{
$goid = base64_decode($goid);
// First, see if it's an Outlook UID or not.
if (substr($goid, 40, 8) == 'vCal-Uid') {
// For vCal UID values:
// Bytes 37 - 40 contain length of data and padding
// Bytes 41 - 48 are == vCal-Uid
// Bytes 53 until next to the last byte (/0) contain the UID.
return trim(substr($goid, 52, strlen($goid) - 1));
} else {
// If it's not a vCal UID, then it is Outlook style UID:
// The entire decoded goid is converted to hex representation with
// bytes 17 - 20 converted to zero
$hex = array();
foreach (str_split($goid) as $chr) {
$hex[] = sprintf('%02X', ord($chr));
}
array_splice($hex, 16, 4, array('00', '00', '00', '00'));
return implode('', $hex);
}
}
/**
* Create a MAPI GOID from a UID
* See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29
*
* @param string $uid The UID value to encode.
*
* @return string A Base64 encoded GOID
* @deprecated Will be removed in H6. Use Horde_Mapi::createGoid
*/
static public function createGoid($uid, $options = array())
{
// Bytes 1 - 16 MUST be equal to the GOID identifier:
$arrayid = '040000008200E00074C5B7101A82E008';
// Bytes 17 - 20 - Exception replace time (YH YL M D)
$exception = '00000000';
// Bytes 21 - 28 The 8 byte creation time (can be all zeros if not available).
$creationtime = '0000000000000000';
// Bytes 29 - 36 Reserved 8 bytes must be all zeros.
$reserved = '0000000000000000';
// Bytes 37 - 40 - A long value describing the size of the UID data.
$size = strlen($uid);
// Bytes 41 - 52 - MUST BE vCal-Uid 0x01 0x00 0x00 0x00
$vCard = '7643616C2D55696401000000';
// The UID Data:
$hexuid = '';
foreach (str_split($uid) as $chr) {
$hexuid .= sprintf('%02X', ord($chr));
}
// Pack it
$goid = pack('H*H*H*H*VH*H*x', $arrayid, $exception, $creationtime, $reserved, $size, $vCard, $hexuid);
return base64_encode($goid);
}
} Horde_ActiveSync-2.12.3/lib/Horde/ActiveSync/Wbxml.php 0000664 0000766 0000024 00000074060 12273362323 017404 0 ustar
* @package ActiveSync
*/
/**
* Wbxml handler
*
* @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 2009-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky
* @package ActiveSync
*/
class Horde_ActiveSync_Wbxml
{
const SWITCH_PAGE = 0x00;
const END = 0x01;
const ENTITY = 0x02;
const STR_I = 0x03;
const LITERAL = 0x04;
const EXT_I_0 = 0x40;
const EXT_I_1 = 0x41;
const EXT_I_2 = 0x42;
const PI = 0x43;
const LITERAL_C = 0x44;
const EXT_T_0 = 0x80;
const EXT_T_1 = 0x81;
const EXT_T_2 = 0x82;
const STR_T = 0x83;
const LITERAL_A = 0x84;
const EXT_0 = 0xC0;
const EXT_1 = 0xC1;
const EXT_2 = 0xC2;
const OPAQUE = 0xC3;
const LITERAL_AC = 0xC4;
const EN_TYPE = 1;
const EN_TAG = 2;
const EN_CONTENT = 3;
const EN_FLAGS = 4;
const EN_ATTRIBUTES = 5;
const EN_TYPE_STARTTAG = 1;
const EN_TYPE_ENDTAG = 2;
const EN_TYPE_CONTENT = 3;
const EN_FLAGS_CONTENT = 1;
const EN_FLAGS_ATTRIBUTES = 2;
/* Valid WBXML Version header value */
const WBXML_VERSION = 0x03;
/* Logging levels */
// LOG_DETAILED = All data logged.
// LOG_PROTOCOL = Protocol detail is logged, but if content length of
// non-stream data exceeds LOG_MAXCONTENT bytes, only the size is logged.
const LOG_DETAILED = 1;
const LOG_PROTOCOL = 2;
const LOG_MAXCONTENT = 50;
/**
* The code page definitions for the wbxml encoder/decoders
*
* @var array
*/
protected $_dtd = array(
'codes' => array (
0 => array (
0x05 => 'Synchronize',
0x06 => 'Replies',
0x07 => 'Add',
0x08 => 'Modify',
0x09 => 'Remove',
0x0a => 'Fetch',
0x0b => 'SyncKey',
0x0c => 'ClientEntryId',
0x0d => 'ServerEntryId',
0x0e => 'Status',
0x0f => 'Folder',
0x10 => 'FolderType',
0x11 => 'Version',
0x12 => 'FolderId',
0x13 => 'GetChanges',
0x14 => 'MoreAvailable',
0x15 => 'WindowSize',
0x16 => 'Commands',
0x17 => 'Options',
0x18 => 'FilterType',
0x19 => 'Truncation',
0x1a => 'RtfTruncation',
0x1b => 'Conflict',
0x1c => 'Folders',
0x1d => 'Data',
0x1e => 'DeletesAsMoves',
0x1f => 'NotifyGUID',
0x20 => 'Supported',
0x21 => 'SoftDelete',
0x22 => 'MIMESupport',
0x23 => 'MIMETruncation',
0x24 => 'Wait',
0x25 => 'Limit',
0x26 => 'Partial',
// EAS 14.0
0x27 => 'ConversationMode',
0x28 => 'MaxItems',
0x29 => 'HeartbeatInterval',
),
/* POOMCONTACTS */
1 => array (
0x05 => 'Anniversary',
0x06 => 'AssistantName',
0x07 => 'AssistnamePhoneNumber',
0x08 => 'Birthday',
0x09 => 'Body',
0x0a => 'BodySize',
0x0b => 'BodyTruncated',
0x0c => 'Business2PhoneNumber',
0x0d => 'BusinessCity',
0x0e => 'BusinessCountry',
0x0f => 'BusinessPostalCode',
0x10 => 'BusinessState',
0x11 => 'BusinessStreet',
0x12 => 'BusinessFaxNumber',
0x13 => 'BusinessPhoneNumber',
0x14 => 'CarPhoneNumber',
0x15 => 'Categories',
0x16 => 'Category',
0x17 => 'Children',
0x18 => 'Child',
0x19 => 'CompanyName',
0x1a => 'Department',
0x1b => 'Email1Address',
0x1c => 'Email2Address',
0x1d => 'Email3Address',
0x1e => 'FileAs',
0x1f => 'FirstName',
0x20 => 'Home2PhoneNumber',
0x21 => 'HomeCity',
0x22 => 'HomeCountry',
0x23 => 'HomePostalCode',
0x24 => 'HomeState',
0x25 => 'HomeStreet',
0x26 => 'HomeFaxNumber',
0x27 => 'HomePhoneNumber',
0x28 => 'JobTitle',
0x29 => 'LastName',
0x2a => 'MiddleName',
0x2b => 'MobilePhoneNumber',
0x2c => 'OfficeLocation',
0x2d => 'OtherCity',
0x2e => 'OtherCountry',
0x2f => 'OtherPostalCode',
0x30 => 'OtherState',
0x31 => 'OtherStreet',
0x32 => 'PagerNumber',
0x33 => 'RadioPhoneNumber',
0x34 => 'Spouse',
0x35 => 'Suffix',
0x36 => 'Title',
0x37 => 'WebPage',
0x38 => 'YomiCompanyName',
0x39 => 'YomiFirstName',
0x3a => 'YomiLastName',
0x3b => 'Rtf', // EAS 2.5 only.
0x3c => 'Picture',
// EAS 14.0
0x3d => 'Alias',
0x3e => 'WeightedRank',
),
/* POOMMAIL */
2 => array (
0x05 => 'Attachment',
0x06 => 'Attachments',
0x07 => 'AttName',
0x08 => 'AttSize',
0x09 => 'AttOid',
0x0a => 'AttMethod',
0x0b => 'AttRemoved',
0x0c => 'Body',
0x0d => 'BodySize',
0x0e => 'BodyTruncated',
0x0f => 'DateReceived',
0x10 => 'DisplayName',
0x11 => 'DisplayTo',
0x12 => 'Importance',
0x13 => 'MessageClass',
0x14 => 'Subject',
0x15 => 'Read',
0x16 => 'To',
0x17 => 'Cc',
0x18 => 'From',
0x19 => 'Reply-To',
0x1a => 'AllDayEvent',
0x1b => 'Categories', // EAS 14.0
0x1c => 'Category', // EAS 14.0
0x1d => 'DtStamp',
0x1e => 'EndTime',
0x1f => 'InstanceType',
0x20 => 'BusyStatus',
0x21 => 'Location',
0x22 => 'MeetingRequest',
0x23 => 'Organizer',
0x24 => 'RecurrenceId',
0x25 => 'Reminder',
0x26 => 'ResponseRequested',
0x27 => 'Recurrences',
0x28 => 'Recurrence',
0x29 => 'Type',
0x2a => 'Until',
0x2b => 'Occurrences',
0x2c => 'Interval',
0x2d => 'DayOfWeek',
0x2e => 'DayOfMonth',
0x2f => 'WeekOfMonth',
0x30 => 'MonthOfYear',
0x31 => 'StartTime',
0x32 => 'Sensitivity',
0x33 => 'TimeZone',
0x34 => 'GlobalObjId',
0x35 => 'ThreadTopic',
0x36 => 'MIMEData',
0x37 => 'MIMETruncated',
0x38 => 'MIMESize',
0x39 => 'InternetCPID',
// EAS 12.0
0x3a => 'Flag',
0x3b => 'FlagStatus',
0x3c => 'ContentClass',
0x3d => 'FlagType',
0x3e => 'CompleteTime',
// EAS 14.0
0x3f => 'DisallowNewTimeProposal',
),
/* 3 == AirNotify == deprecated */
/* POOMCAL */
4 => array (
0x05 => 'Timezone',
0x06 => 'AllDayEvent',
0x07 => 'Attendees',
0x08 => 'Attendee',
0x09 => 'Email',
0x0a => 'Name',
0x0b => 'Body', // 2.5 Only
0x0c => 'BodyTruncated', // 2.5 Only
0x0d => 'BusyStatus',
0x0e => 'Categories',
0x0f => 'Category',
0x10 => 'Rtf', // 2.5 ONly
0x11 => 'DtStamp',
0x12 => 'EndTime',
0x13 => 'Exception',
0x14 => 'Exceptions',
0x15 => 'Deleted',
0x16 => 'ExceptionStartTime',
0x17 => 'Location',
0x18 => 'MeetingStatus',
0x19 => 'OrganizerEmail',
0x1a => 'OrganizerName',
0x1b => 'Recurrence',
0x1c => 'Type',
0x1d => 'Until',
0x1e => 'Occurrences',
0x1f => 'Interval',
0x20 => 'DayOfWeek',
0x21 => 'DayOfMonth',
0x22 => 'WeekOfMonth',
0x23 => 'MonthOfYear',
0x24 => 'Reminder',
0x25 => 'Sensitivity',
0x26 => 'Subject',
0x27 => 'StartTime',
0x28 => 'UID',
// EAS 12.0
0x29 => 'AttendeeStatus',
0x2A => 'AttendeeType',
// EAS 12.1 (Apparently no longer documented).
0x2B => 'Attachment',
0x2C => 'Attachments',
0x2D => 'AttName',
0x2E => 'AttSize',
0x2F => 'AttOid',
0x30 => 'AttMethod',
0x31 => 'AttRemoved',
0x32 => 'DisplayName',
// EAS 14
0x33 => 'DisallowNewTimeProposal',
0x34 => 'ResponseRequested',
0x35 => 'AppointmentReplyTime',
0x36 => 'ResponseType',
0x37 => 'CalendarType',
0x38 => 'IsLeapMonth',
// EAS 14.1
0x39 => 'FirstDayOfWeek',
0x3a => 'OnlineMeetingConfLink',
0x3b => 'OnlineMeetingExternalLink',
),
/* MOVE */
5 => array (
0x05 => 'Moves',
0x06 => 'Move',
0x07 => 'SrcMsgId',
0x08 => 'SrcFldId',
0x09 => 'DstFldId',
0x0a => 'Response',
0x0b => 'Status',
0x0c => 'DstMsgId',
),
/* GETITEMESTIMATE */
6 => array (
0x05 => 'GetItemEstimate',
0x06 => 'Version', // 12.1
0x07 => 'Folders',
0x08 => 'Folder',
0x09 => 'FolderType', // 12.1
0x0a => 'FolderId',
0x0b => 'DateTime', // 12.1
0x0c => 'Estimate',
0x0d => 'Response',
0x0e => 'Status',
),
/* FOLDERHIERARCHY */
7 => array (
0x05 => 'Folders',
0x06 => 'Folder',
0x07 => 'DisplayName',
0x08 => 'ServerEntryId',
0x09 => 'ParentId',
0x0a => 'Type',
0x0b => 'Response',
0x0c => 'Status',
0x0d => 'ContentClass',
0x0e => 'Changes',
0x0f => 'Add',
0x10 => 'Remove',
0x11 => 'Update',
0x12 => 'SyncKey',
0x13 => 'FolderCreate',
0x14 => 'FolderDelete',
0x15 => 'FolderUpdate',
0x16 => 'FolderSync',
0x17 => 'Count',
0x18 => 'Version',
),
/* MEETINGRESPONSE */
8 => array (
0x05 => 'CalendarId',
0x06 => 'FolderId',
0x07 => 'MeetingResponse',
0x08 => 'RequestId',
0x09 => 'Request',
0x0a => 'Result',
0x0b => 'Status',
0x0c => 'UserResponse',
0x0d => 'Version',
),
/* POOMTASKS */
9 => array (
0x05 => 'Body',
0x06 => 'BodySize',
0x07 => 'BodyTruncated',
0x08 => 'Categories',
0x09 => 'Category',
0x0a => 'Complete',
0x0b => 'DateCompleted',
0x0c => 'DueDate',
0x0d => 'UtcDueDate',
0x0e => 'Importance',
0x0f => 'Recurrence',
0x10 => 'Type',
0x11 => 'Start',
0x12 => 'Until',
0x13 => 'Occurrences',
0x14 => 'Interval',
0x16 => 'DayOfWeek',
0x15 => 'DayOfMonth',
0x17 => 'WeekOfMonth',
0x18 => 'MonthOfYear',
0x19 => 'Regenerate',
0x1a => 'DeadOccur',
0x1b => 'ReminderSet',
0x1c => 'ReminderTime',
0x1d => 'Sensitivity',
0x1e => 'StartDate',
0x1f => 'UtcStartDate',
0x20 => 'Subject',
0x21 => 'Rtf',
// EAS 12.0
0x22 => 'OrdinalDate',
0x23 => 'SubOrdinalDate',
// EAS 14.0
0x24 => 'CalendarType',
0x25 => 'IsLeapMonth',
// EAS 14.1
0x26 => 'FirstDayOfWeek',
),
/* RESOLVERECIPIENTS */
0xa => array (
0x05 => 'ResolveRecipients',
0x06 => 'Response',
0x07 => 'Status',
0x08 => 'Type',
0x09 => 'Recipient',
0x0a => 'DisplayName',
0x0b => 'EmailAddress',
0x0c => 'Certificates',
0x0d => 'Certificate',
0x0e => 'MiniCertificate',
0x0f => 'Options',
0x10 => 'To',
0x11 => 'CertificateRetrieval',
0x12 => 'RecipientCount',
0x13 => 'MaxCertificates',
0x14 => 'MaxAmbiguousRecipients',
0x15 => 'CertificateCount',
0x16 => 'Availability',
0x17 => 'StartTime',
0x18 => 'EndTime',
0x19 => 'MergedFreeBusy',
// 14.1
0x1a => 'Picture',
0x1b => 'MaxSize',
0x1c => 'Data',
0x1d => 'MaxPictures',
),
/* VALIDATECERT */
0xb => array (
0x05 => 'ValidateCert',
0x06 => 'Certificates',
0x07 => 'Certificate',
0x08 => 'CertificateChain',
0x09 => 'CheckCRL',
0x0a => 'Status',
),
/* POOMCONTACTS2*/
0xc => array (
0x05 => 'CustomerId',
0x06 => 'GovernmentId',
0x07 => 'IMAddress',
0x08 => 'IMAddress2',
0x09 => 'IMAddress3',
0x0a => 'ManagerName',
0x0b => 'CompanyMainPhone',
0x0c => 'AccountName',
0x0d => 'NickName',
0x0e => 'MMS',
),
/* PING */
0xd => array (
0x05 => 'Ping',
0x06 => 'AutdState',
0x07 => 'Status',
0x08 => 'HeartbeatInterval',
0x09 => 'Folders',
0x0a => 'Folder',
0x0b => 'ServerEntryId',
0x0c => 'FolderType',
0x0d => 'MaxFolders',
),
/* PROVISION */
0xe => array (
0x05 => 'Provision',
0x06 => 'Policies',
0x07 => 'Policy',
0x08 => 'PolicyType',
0x09 => 'PolicyKey',
0x0A => 'Data',
0x0B => 'Status',
0x0C => 'RemoteWipe',
0x0D => 'EASProvisionDoc',
// EAS 12.0
0x0E => 'DevicePasswordEnabled',
0x0F => 'AlphanumericDevicePasswordRequired',
0x10 => 'DeviceEncryptionEnabled',
0x11 => 'PasswordRecoveryEnabled',
0x12 => 'DocumentBrowseEnabled',
0x13 => 'AttachmentsEnabled',
0x14 => 'MinDevicePasswordLength',
0x15 => 'MaxInactivityTimeDeviceLock',
0x16 => 'MaxDevicePasswordFailedAttempts',
0x17 => 'MaxAttachmentSize',
0x18 => 'AllowSimpleDevicePassword',
0x19 => 'DevicePasswordExpiration',
0x1A => 'DevicePasswordHistory',
// EAS 12.1
0x1B => 'AllowStorageCard',
0x1C => 'AllowCamera',
0x1D => 'RequireDeviceEncryption',
0x1E => 'AllowUnsignedApplications',
0x1F => 'AllowUnsignedInstallationPackages',
0x20 => 'MinDevicePasswordComplexCharacters',
0x21 => 'AllowWiFi',
0x22 => 'AllowTextMessaging',
0x23 => 'AllowPOPIMAPEmail',
0x24 => 'AllowBluetooth',
0x25 => 'AllowIrDA',
0x26 => 'RequireManualSyncWhenRoaming',
0x27 => 'AllowDesktopSync',
0x28 => 'MaxCalendarAgeFilter',
0x29 => 'AllowHTMLEmail',
0x2A => 'MaxEmailAgeFilter',
0x2B => 'MaxEmailBodyTruncationSize',
0x2C => 'MaxHTMLBodyTruncationSize',
0x2D => 'RequireSignedSMIMEMessages',
0x2E => 'RequireEncryptedSMIMEMessages',
0x2F => 'RequireSignedSMIMEAlgorithm',
0x30 => 'RequireEncryptedSMIMEAlgorithm',
0x31 => 'AllowSMIMEEncryptionAlgorithmNegotiation',
0x32 => 'AllowSMIMESoftCerts',
0x33 => 'AllowBrowser',
0x34 => 'AllowConsumerEmail',
0x35 => 'AllowRemoteDesktop',
0x36 => 'AllowInternetSharing',
0x37 => 'UnapprovedInROMApplicationList',
0x38 => 'ApplicationName',
0x39 => 'ApprovedApplicationList',
0x3A => 'Hash',
),
/* SEARCH */
0xf => array(
0x05 => 'Search',
0x07 => 'Store',
0x08 => 'Name',
0x09 => 'Query',
0x0A => 'Options',
0x0B => 'Range',
0x0C => 'Status',
0x0D => 'Response',
0x0E => 'Result',
0x0F => 'Properties',
0x10 => 'Total',
0x11 => 'EqualTo',
0x12 => 'Value',
0x13 => 'And',
0x14 => 'Or',
0x15 => 'FreeText',
0x17 => 'DeepTraversal',
0x18 => 'LongId',
0x19 => 'RebuildResults',
0x1A => 'LessThan',
0x1B => 'GreaterThan',
0x1C => 'Schema',
0x1D => 'Supported',
// EAS 12.1
0x1E => 'UserName',
0x1F => 'Password',
0x20 => 'ConversationId',
// EAS 14.1
0x21 => 'Picture',
0x22 => 'MaxSize',
0x23 => 'MaxPictures',
),
/* GAL (Global Address List) */
0x10 => array(
0x05 => 'DisplayName',
0x06 => 'Phone',
0x07 => 'Office',
0x08 => 'Title',
0x09 => 'Company',
0x0A => 'Alias',
0x0B => 'FirstName',
0x0C => 'LastName',
0x0D => 'HomePhone',
0x0E => 'MobilePhone',
0x0F => 'EmailAddress',
// 14.1
0x10 => 'Picture',
0x11 => 'Status',
0x12 => 'Data',
),
// EAS 12.0
/* AIRSYNCBASE */
0x11 => array(
0x05 => 'BodyPreference',
0x06 => 'Type',
0x07 => 'TruncationSize',
0x08 => 'AllOrNone',
0x0A => 'Body',
0x0B => 'Data',
0x0C => 'EstimatedDataSize',
0x0D => 'Truncated',
0x0E => 'Attachments',
0x0F => 'Attachment',
0x10 => 'DisplayName',
0x11 => 'FileReference',
0x12 => 'Method',
0x13 => 'ContentId',
0x14 => 'ContentLocation',
0x15 => 'IsInline',
0x16 => 'NativeBodyType',
0x17 => 'ContentType',
// EAS 14.0
0x18 => 'Preview',
// EAS 14.1
0x19 => 'BodyPartPreference',
0x1a => 'BodyPart',
0x1b => 'Status',
),
/* SETTINGS */
0x12 => array(
0x05 => 'Settings',
0x06 => 'Status',
0x07 => 'Get',
0x08 => 'Set',
0x09 => 'Oof',
0x0A => 'OofState',
0x0B => 'StartTime',
0x0C => 'EndTime',
0x0D => 'OofMessage',
0x0E => 'AppliesToInternal',
0x0F => 'AppliesToExternalKnown',
0x10 => 'AppliesToExternalUnknown',
0x11 => 'Enabled',
0x12 => 'ReplyMessage',
0x13 => 'BodyType',
0x14 => 'DevicePassword',
0x15 => 'Password',
0x16 => 'DeviceInformation',
0x17 => 'Model',
0x18 => 'IMEI',
0x19 => 'FriendlyName',
0x1A => 'OS',
0x1B => 'OSLanguage',
0x1C => 'PhoneNumber',
0x1D => 'UserInformation',
0x1E => 'EmailAddresses',
0x1F => 'SmtpAddress',
// EAS 12.1
0x20 => 'UserAgent',
// EAS 14.0
0x21 => 'EnableOutboundSMS',
0x22 => 'MobileOperator',
// EAS 14.1
0x23 => 'PrimarySmtpAddress',
0x24 => 'Accounts',
0x25 => 'Account',
0x26 => 'AccountId',
0x27 => 'AccountName',
0x28 => 'UserDisplayName',
0x29 => 'SendDisabled',
0x2b => 'RightsManagementInformation',
),
/* Document Library */
0x13 => array(
0x05 => 'LinkId',
0x06 => 'DisplayName',
0x07 => 'IsFolder',
0x08 => 'CreationDate',
0x09 => 'LastModifiedDate',
0x0A => 'IsHidden',
0x0B => 'ContentLength',
0x0C => 'ContentType'
),
/* ITEMOPERATIONS */
0x14 => array(
0x05 => 'ItemOperations',
0x06 => 'Fetch',
0x07 => 'Store',
0x08 => 'Options',
0x09 => 'Range',
0x0A => 'Total',
0x0B => 'Properties',
0x0C => 'Data',
0x0D => 'Status',
0x0E => 'Response',
0x0F => 'Version',
0x10 => 'Schema',
0x11 => 'Part',
0x12 => 'EmptyFolderContent',
0x13 => 'DeleteSubFolders',
// EAS 12.1
0x14 => 'UserName',
0x15 => 'Password',
// EAS 14.0
0x16 => 'Move',
0x17 => 'DstFldId',
0x18 => 'ConversationId',
0x19 => 'MoveAlways',
),
/* COMPOSEMAIL (14.0) */
0x15 => array(
0x05 => 'SendMail',
0x06 => 'SmartForward',
0x07 => 'SmartReply',
0x08 => 'SaveInSentItems',
0x09 => 'ReplaceMime',
0x0A => 'Type',
0x0B => 'Source',
0x0C => 'FolderId',
0x0D => 'ItemId',
0x0E => 'LongId',
0x0F => 'InstanceId',
0x10 => 'MIME',
0x11 => 'ClientId',
0x12 => 'Status',
// 14.1
0x13 => 'AccountId',
),
/* POOMMAIL2 (14.0) */
0x16 => array(
0x05 => 'UmCallerId',
0x06 => 'UmUserNotes',
0x07 => 'UmAttDuration',
0x08 => 'UmAttOrder',
0x09 => 'ConversationId',
0x0A => 'ConversationIndex',
0x0B => 'LastVerbExecuted',
0x0C => 'LastVerbExecutionTime',
0x0D => 'ReceivedAsBcc',
0x0E => 'Sender',
0x0F => 'CalendarType',
0x10 => 'IsLeapMonth',
// 14.1
0x11 => 'AccountId',
0x12 => 'FirstDayOfWeek',
0x13 => 'MeetingMessageType',
),
/* Notes (14.0) */
0x17 => array(
0x05 => 'Subject',
0x06 => 'MessageClass',
0x07 => 'LastModifiedDate',
0x08 => 'Categories',
0x09 => 'Category',
),
/* Rights Management (14.1) */
// Included here to decode without errors.
// Functionality not implemented.
0x18 => array(
0x05 => 'RightsManagementSupport',
0x06 => 'RightsManagementTemplates',
0x07 => 'RightsManagementTemplate',
0x08 => 'RightsManagementLicense',
0x09 => 'EditAllowed',
0x0A => 'ReplyAllowed',
0x0B => 'ReplyAllAllowed',
0x0C => 'ForwardAllowed',
0x0D => 'ModifyRecipientsAllowed',
0x0E => 'ExtractAllowed',
0x0F => 'PrintAllowed',
0x10 => 'ExportAllowed',
0x11 => 'ProgrammaticAccessAllowed',
0x12 => 'Owner',
0x13 => 'ContentExpiryDate',
0x14 => 'TemplateID',
0x15 => 'TemplateName',
0x16 => 'TemplateDescription',
0x17 => 'ContentOwner',
0x18 => 'RemoveRightsManagementDistribution'
)
),
'namespaces' => array(
1 => 'POOMCONTACTS',
2 => 'POOMMAIL',
4 => 'POOMCAL',
5 => 'Move',
6 => 'GetItemEstimate',
7 => 'FolderHierarchy',
8 => 'MeetingResponse',
9 => 'POOMTASKS',
0xA => 'ResolveRecipients',
0xB => 'ValidateCert',
0xC => 'POOMCONTACTS2',
0xD => 'Ping',
0xE => 'Provision',
0xF => 'Search',
0x10 => 'GAL',
// EAS 12.0
0x11 => 'AirSyncBase',
0x12 => 'Settings',
0x13 => 'DocumentLibrary',
0x14 => 'ItemOperations',
// EAS 14
0x15 => 'ComposeMail',
0x16 => 'POOMMAIL2',
0x17 => 'Notes',
0x18 => 'RightsManagement',
)
);
/**
* Track the codepage for the currently output tag so we know when to
* switch codepages.
*
* @var integer
*/
protected $_tagcp = 0;
/**
* Used to hold log entries for each tag so we can only output the log
* entries for the tags that are actually sent (@see $_stack).
*
* @var array
*/
protected $_logStack = array();
/**
* Logger
*
* @var Horde_Log_Logger
*/
protected $_logger;
/**
* Input or Output stream
*
* @var Horde_Stream
*/
protected $_stream;
/**
* The current procid
*
* @var integer
*/
protected $_procid;
/**
* Logging level.
*
* @param integer
*/
protected $_logLevel;
/**
*
* @param stream $stream The [input|output] stream.
*/
public function __construct($stream, $log_level = self::LOG_PROTOCOL)
{
$this->_stream = new Horde_Stream_Existing(array('stream' => $stream));
$this->_logger = new Horde_Support_Stub();
$this->_procid = getmypid();
$this->_logLevel = $log_level;
}
public function getStream()
{
return $this->_stream;
}
/**
* Set the logger instance
*
* @param Horde_Log_Logger $logger The logger.
*/
public function setLogger(Horde_Log_Logger $logger)
{
$this->_logger = $logger;
}
}
Horde_ActiveSync-2.12.3/lib/Horde/ActiveSync.php 0000664 0000766 0000024 00000123131 12273362323 016305 0 ustar
* @package ActiveSync
*/
/**
* Horde_ActiveSync:: The Horde ActiveSync server. Entry point for performing
* all ActiveSync operations.
*
* @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 2009-2014 Horde LLC (http://www.horde.org)
* @author Michael J Rubinsky
* @package ActiveSync
*
* @property Horde_ActiveSync_Wbxml_Encoder encoder The Wbxml encoder.
* @property Horde_ActiveSync_Wbxml_Decoder decoder The Wbxml decoder.
* @property Horde_ActiveSync_State_Base state The state object.
* @property Horde_Controller_Reqeust_Http request The HTTP request object.
* @property Horde_ActiveSync_Driver_Base driver
* @property boolean provisioning
* @property boolean multipart
* @property string certPath
* @property Horde_ActiveSync_Device device
* @property Horde_Log_Logger logger
*/
class Horde_ActiveSync
{
/* Conflict resolution */
const CONFLICT_OVERWRITE_SERVER = 0;
const CONFLICT_OVERWRITE_PIM = 1;
/* TRUNCATION Constants */
const TRUNCATION_ALL = 0;
const TRUNCATION_1 = 1;
const TRUNCATION_2 = 2;
const TRUNCATION_3 = 3;
const TRUNCATION_4 = 4;
const TRUNCATION_5 = 5;
const TRUNCATION_6 = 6;
const TRUNCATION_7 = 7;
const TRUNCATION_8 = 8;
const TRUNCATION_NONE = 9;
/* FOLDERHIERARCHY */
const FOLDERHIERARCHY_FOLDERS = 'FolderHierarchy:Folders';
const FOLDERHIERARCHY_FOLDER = 'FolderHierarchy:Folder';
const FOLDERHIERARCHY_DISPLAYNAME = 'FolderHierarchy:DisplayName';
const FOLDERHIERARCHY_SERVERENTRYID = 'FolderHierarchy:ServerEntryId';
const FOLDERHIERARCHY_PARENTID = 'FolderHierarchy:ParentId';
const FOLDERHIERARCHY_TYPE = 'FolderHierarchy:Type';
const FOLDERHIERARCHY_RESPONSE = 'FolderHierarchy:Response';
const FOLDERHIERARCHY_STATUS = 'FolderHierarchy:Status';
const FOLDERHIERARCHY_CONTENTCLASS = 'FolderHierarchy:ContentClass';
const FOLDERHIERARCHY_CHANGES = 'FolderHierarchy:Changes';
const FOLDERHIERARCHY_SYNCKEY = 'FolderHierarchy:SyncKey';
const FOLDERHIERARCHY_FOLDERSYNC = 'FolderHierarchy:FolderSync';
const FOLDERHIERARCHY_COUNT = 'FolderHierarchy:Count';
const FOLDERHIERARCHY_VERSION = 'FolderHierarchy:Version';
/* SYNC */
const SYNC_SYNCHRONIZE = 'Synchronize';
const SYNC_REPLIES = 'Replies';
const SYNC_ADD = 'Add';
const SYNC_MODIFY = 'Modify';
const SYNC_REMOVE = 'Remove';
const SYNC_FETCH = 'Fetch';
const SYNC_SYNCKEY = 'SyncKey';
const SYNC_CLIENTENTRYID = 'ClientEntryId';
const SYNC_SERVERENTRYID = 'ServerEntryId';
const SYNC_STATUS = 'Status';
const SYNC_FOLDER = 'Folder';
const SYNC_FOLDERTYPE = 'FolderType';
const SYNC_VERSION = 'Version';
const SYNC_FOLDERID = 'FolderId';
const SYNC_GETCHANGES = 'GetChanges';
const SYNC_MOREAVAILABLE = 'MoreAvailable';
const SYNC_WINDOWSIZE = 'WindowSize';
const SYNC_COMMANDS = 'Commands';
const SYNC_OPTIONS = 'Options';
const SYNC_FILTERTYPE = 'FilterType';
const SYNC_TRUNCATION = 'Truncation';
const SYNC_RTFTRUNCATION = 'RtfTruncation';
const SYNC_CONFLICT = 'Conflict';
const SYNC_FOLDERS = 'Folders';
const SYNC_DATA = 'Data';
const SYNC_DELETESASMOVES = 'DeletesAsMoves';
const SYNC_NOTIFYGUID = 'NotifyGUID';
const SYNC_SUPPORTED = 'Supported';
const SYNC_SOFTDELETE = 'SoftDelete';
const SYNC_MIMESUPPORT = 'MIMESupport';
const SYNC_MIMETRUNCATION = 'MIMETruncation';
const SYNC_NEWMESSAGE = 'NewMessage';
const SYNC_PARTIAL = 'Partial';
const SYNC_WAIT = 'Wait';
const SYNC_LIMIT = 'Limit';
// 14
const SYNC_HEARTBEATINTERVAL = 'HeartbeatInterval';
const SYNC_CONVERSATIONMODE = 'ConversationMode';
const SYNC_MAXITEMS = 'MaxItems';
/* Document library */
const SYNC_DOCUMENTLIBRARY_LINKID = 'DocumentLibrary:LinkId';
const SYNC_DOCUMENTLIBRARY_DISPLAYNAME = 'DocumentLibrary:DisplayName';
const SYNC_DOCUMENTLIBRARY_ISFOLDER = 'DocumentLibrary:IsFolder';
const SYNC_DOCUMENTLIBRARY_CREATIONDATE = 'DocumentLibrary:CreationDate';
const SYNC_DOCUMENTLIBRARY_LASTMODIFIEDDATE = 'DocumentLibrary:LastModifiedDate';
const SYNC_DOCUMENTLIBRARY_ISHIDDEN = 'DocumentLibrary:IsHidden';
const SYNC_DOCUMENTLIBRARY_CONTENTLENGTH = 'DocumentLibrary:ContentLength';
const SYNC_DOCUMENTLIBRARY_CONTENTTYPE = 'DocumentLibrary:ContentType';
/* AIRSYNCBASE */
const AIRSYNCBASE_BODYPREFERENCE = 'AirSyncBase:BodyPreference';
const AIRSYNCBASE_TYPE = 'AirSyncBase:Type';
const AIRSYNCBASE_TRUNCATIONSIZE = 'AirSyncBase:TruncationSize';
const AIRSYNCBASE_ALLORNONE = 'AirSyncBase:AllOrNone';
const AIRSYNCBASE_BODY = 'AirSyncBase:Body';
const AIRSYNCBASE_DATA = 'AirSyncBase:Data';
const AIRSYNCBASE_ESTIMATEDDATASIZE = 'AirSyncBase:EstimatedDataSize';
const AIRSYNCBASE_TRUNCATED = 'AirSyncBase:Truncated';
const AIRSYNCBASE_ATTACHMENTS = 'AirSyncBase:Attachments';
const AIRSYNCBASE_ATTACHMENT = 'AirSyncBase:Attachment';
const AIRSYNCBASE_DISPLAYNAME = 'AirSyncBase:DisplayName';
const AIRSYNCBASE_FILEREFERENCE = 'AirSyncBase:FileReference';
const AIRSYNCBASE_METHOD = 'AirSyncBase:Method';
const AIRSYNCBASE_CONTENTID = 'AirSyncBase:ContentId';
const AIRSYNCBASE_CONTENTLOCATION = 'AirSyncBase:ContentLocation';
const AIRSYNCBASE_ISINLINE = 'AirSyncBase:IsInline';
const AIRSYNCBASE_NATIVEBODYTYPE = 'AirSyncBase:NativeBodyType';
const AIRSYNCBASE_CONTENTTYPE = 'AirSyncBase:ContentType';
// 14.0
const AIRSYNCBASE_PREVIEW = 'AirSyncBase:Preview';
// 14.1
const AIRSYNCBASE_BODYPARTPREFERENCE = 'AirSyncBase:BodyPartPreference';
const AIRSYNCBASE_BODYPART = 'AirSyncBase:BodyPart';
const AIRSYNCBASE_STATUS = 'AirSyncBase:Status';
/* Body type prefs */
const BODYPREF_TYPE_PLAIN = 1;
const BODYPREF_TYPE_HTML = 2;
const BODYPREF_TYPE_RTF = 3;
const BODYPREF_TYPE_MIME = 4;
/* PROVISION */
const PROVISION_PROVISION = 'Provision:Provision';
const PROVISION_POLICIES = 'Provision:Policies';
const PROVISION_POLICY = 'Provision:Policy';
const PROVISION_POLICYTYPE = 'Provision:PolicyType';
const PROVISION_POLICYKEY = 'Provision:PolicyKey';
const PROVISION_DATA = 'Provision:Data';
const PROVISION_STATUS = 'Provision:Status';
const PROVISION_REMOTEWIPE = 'Provision:RemoteWipe';
const PROVISION_EASPROVISIONDOC = 'Provision:EASProvisionDoc';
/* Policy types */
const POLICYTYPE_XML = 'MS-WAP-Provisioning-XML';
const POLICYTYPE_WBXML = 'MS-EAS-Provisioning-WBXML';
/* Flags */
// @TODO: H6 Change this to CHANGE_TYPE_NEW
const FLAG_NEWMESSAGE = 'NewMessage';
/* Folder types */
const FOLDER_TYPE_OTHER = 1;
const FOLDER_TYPE_INBOX = 2;
const FOLDER_TYPE_DRAFTS = 3;
const FOLDER_TYPE_WASTEBASKET = 4;
const FOLDER_TYPE_SENTMAIL = 5;
const FOLDER_TYPE_OUTBOX = 6;
const FOLDER_TYPE_TASK = 7;
const FOLDER_TYPE_APPOINTMENT = 8;
const FOLDER_TYPE_CONTACT = 9;
const FOLDER_TYPE_NOTE = 10;
const FOLDER_TYPE_JOURNAL = 11;
const FOLDER_TYPE_USER_MAIL = 12;
const FOLDER_TYPE_USER_APPOINTMENT = 13;
const FOLDER_TYPE_USER_CONTACT = 14;
const FOLDER_TYPE_USER_TASK = 15;
const FOLDER_TYPE_USER_JOURNAL = 16;
const FOLDER_TYPE_USER_NOTE = 17;
const FOLDER_TYPE_UNKNOWN = 18;
const FOLDER_TYPE_RECIPIENT_CACHE = 19;
// @TODO, remove const definition in H6, not used anymore.
const FOLDER_TYPE_DUMMY = 999999;
/* Origin of changes **/
const CHANGE_ORIGIN_PIM = 0;
const CHANGE_ORIGIN_SERVER = 1;
const CHANGE_ORIGIN_NA = 3;
/* Remote wipe **/
const RWSTATUS_NA = 0;
const RWSTATUS_OK = 1;
const RWSTATUS_PENDING = 2;
const RWSTATUS_WIPED = 3;
/* GAL **/
const GAL_DISPLAYNAME = 'GAL:DisplayName';
const GAL_PHONE = 'GAL:Phone';
const GAL_OFFICE = 'GAL:Office';
const GAL_TITLE = 'GAL:Title';
const GAL_COMPANY = 'GAL:Company';
const GAL_ALIAS = 'GAL:Alias';
const GAL_FIRSTNAME = 'GAL:FirstName';
const GAL_LASTNAME = 'GAL:LastName';
const GAL_HOMEPHONE = 'GAL:HomePhone';
const GAL_MOBILEPHONE = 'GAL:MobilePhone';
const GAL_EMAILADDRESS = 'GAL:EmailAddress';
// 14.1
const GAL_PICTURE = 'GAL:Picture';
const GAL_STATUS = 'GAL:Status';
const GAL_DATA = 'GAL:Data';
/* Request Type */
const REQUEST_TYPE_SYNC = 'sync';
const REQUEST_TYPE_FOLDERSYNC = 'foldersync';
/* Change Type */
const CHANGE_TYPE_CHANGE = 'change';
const CHANGE_TYPE_DELETE = 'delete';
const CHANGE_TYPE_FLAGS = 'flags';
const CHANGE_TYPE_MOVE = 'move';
const CHANGE_TYPE_FOLDERSYNC = 'foldersync';
const CHANGE_TYPE_SOFTDELETE = 'softdelete';
/* Internal flags to indicate change is a change in reply/forward state */
const CHANGE_REPLY_STATE = '@--reply--@';
const CHANGE_REPLYALL_STATE = '@--replyall--@';
const CHANGE_FORWARD_STATE = '@--forward--@';
/* RM */
const RM_SUPPORT = 'RightsManagement:RightsManagementSupport';
const RM_TEMPLATEID = 'RightsManagement:TemplateId';
/* Collection Classes */
const CLASS_EMAIL = 'Email';
const CLASS_CONTACTS = 'Contacts';
const CLASS_CALENDAR = 'Calendar';
const CLASS_TASKS = 'Tasks';
const CLASS_NOTES = 'Notes';
const CLASS_SMS = 'SMS';
/* Filtertype constants */
const FILTERTYPE_ALL = 0;
const FILTERTYPE_1DAY = 1;
const FILTERTYPE_3DAYS = 2;
const FILTERTYPE_1WEEK = 3;
const FILTERTYPE_2WEEKS = 4;
const FILTERTYPE_1MONTH = 5;
const FILTERTYPE_3MONTHS = 6;
const FILTERTYPE_6MONTHS = 7;
const FILTERTYPE_INCOMPLETETASKS = 8;
const PROVISIONING_FORCE = true;
const PROVISIONING_LOOSE = 'loose';
const PROVISIONING_NONE = false;
const FOLDER_ROOT = 0;
const VERSION_TWOFIVE = '2.5';
const VERSION_TWELVE = '12.0';
const VERSION_TWELVEONE = '12.1';
const VERSION_FOURTEEN = '14.0';
const VERSION_FOURTEENONE = '14.1';
const MIME_SUPPORT_NONE = 0;
const MIME_SUPPORT_SMIME = 1;
const MIME_SUPPORT_ALL = 2;
const IMAP_FLAG_REPLY = 'reply';
const IMAP_FLAG_FORWARD = 'forward';
/* Result Type */
const RESOLVE_RESULT_GAL = 1;
const RESOLVE_RESULT_ADDRESSBOOK = 2;
/* Auth failure reasons */
const AUTH_REASON_USER_DENIED = 'user';
const AUTH_REASON_DEVICE_DENIED = 'device';
const LIBRARY_VERSION = '2.12.3';
/**
* Logger
*
* @var Horde_ActiveSync_Interface_LoggerFactory
*/
protected $_loggerFactory;
/**
* The logger for this class.
*
* @var Horde_Log_Logger
*/
static protected $_logger;
/**
* Provisioning support
*
* @var string (TODO _constant this)
*/
protected $_provisioning;
/**
* Highest version to support.
*
* @var float
*/
protected $_maxVersion = self::VERSION_FOURTEENONE;
/**
* The actual version we are supporting.
*
* @var float
*/
static protected $_version;
/**
* Multipart support?
*
* @var boolean
*/
protected $_multipart = false;
/**
* Support gzip compression of certain data parts?
*
* @var boolean
*/
protected $_compression = false;
/**
* Local cache of Get variables/decoded base64 uri
*
* @var array
*/
protected $_get = array();
/**
* Path to root certificate bundle
*
* @var string
*/
protected $_certPath;
/**
*
* @var Horde_ActiveSync_Device
*/
static protected $_device;
/**
* Wbxml encoder
*
* @var Horde_ActiveSync_Wbxml_Encoder
*/
protected $_encoder;
/**
* Wbxml decoder
*
* @var Horde_ActiveSync_Wbxml_Decoder
*/
protected $_decoder;
/**
* The singleton collections handler.
*
* @var Horde_ActiveSync_Collections
*/
protected $_collectionsObj;
/**
* Global error flag.
*
* @var boolean
*/
protected $_globalError = false;
/**
* Process id (used in logging).
*
* @var integer
*/
protected $_procid;
/**
* Supported EAS versions.
*
* @var array
*/
static protected $_supportedVersions = array(
self::VERSION_TWOFIVE,
self::VERSION_TWELVE,
self::VERSION_TWELVEONE,
self::VERSION_FOURTEEN,
self::VERSION_FOURTEENONE
);
/**
* Factory method for creating Horde_ActiveSync_Message objects.
*
* @param string $message The message type.
* @since 2.4.0
*
* @return Horde_ActiveSync_Message_Base The concrete message object.
* @todo For H6, move to Horde_ActiveSync_Message_Base::factory()
*/
static public function messageFactory($message)
{
$class = 'Horde_ActiveSync_Message_' . $message;
if (!class_exists($class)) {
throw new InvalidArgumentException(sprintf('Class %s does not exist.', $class));
}
return new $class(array(
'logger' => self::$_logger,
'protocolversion' => self::$_version,
'device' => self::$_device));
}
/**
* Const'r
*
* @param Horde_ActiveSync_Driver_Base $driver The backend driver.
* @param Horde_ActiveSync_Wbxml_Decoder $decoder The Wbxml decoder.
* @param Horde_ActiveSync_Wbxml_Endcoder $encoder The Wbxml encoder.
* @param Horde_ActiveSync_State_Base $state The state driver.
* @param Horde_Controller_Request_Http $request The HTTP request object.
*
* @return Horde_ActiveSync The ActiveSync server object.
*/
public function __construct(
Horde_ActiveSync_Driver_Base $driver,
Horde_ActiveSync_Wbxml_Decoder $decoder,
Horde_ActiveSync_Wbxml_Encoder $encoder,
Horde_ActiveSync_State_Base $state,
Horde_Controller_Request_Http $request)
{
// The http request
$this->_request = $request;
// Backend driver
$this->_driver = $driver;
$this->_driver->setProtocolVersion($this->getProtocolVersion());
// Device state manager
$this->_state = $state;
// Wbxml handlers
$this->_encoder = $encoder;
$this->_decoder = $decoder;
$this->_procid = getmypid();
}
/**
* Return a collections singleton.
*
* @return Horde_ActiveSync_Collections
* @since 2.4.0
*/
public function getCollectionsObject()
{
if (empty($this->_collectionsObj)) {
$this->_collectionsObj = new Horde_ActiveSync_Collections($this->getSyncCache(), $this);
}
return $this->_collectionsObj;
}
/**
* Return a new, fully configured SyncCache.
*
* @return Horde_ActiveSync_SyncCache
* @since 2.4.0
*/
public function getSyncCache()
{
return new Horde_ActiveSync_SyncCache(
$this->_state,
self::$_device->id,
self::$_device->user,
self::$_logger
);
}
/**
* Return an Importer object.
*
* @return Horde_ActiveSync_Connector_Importer
* @since 2.4.0
*/
public function getImporter()
{
$importer = new Horde_ActiveSync_Connector_Importer($this);
$importer->setLogger(self::$_logger);
return $importer;
}
/**
* Authenticate to the backend.
*
* @return boolean True on successful authentication to the backend.
* @throws Horde_ActiveSync_Exception
*/
public function authenticate($username = '')
{
// Get credentials
$serverVars = $this->_request->getServerVars();
$user = $pass = '';
if (!empty($serverVars['PHP_AUTH_PW'])) {
$user = empty($username) ? $serverVars['PHP_AUTH_USER'] : $username;
$pass = $serverVars['PHP_AUTH_PW'];
} elseif (!empty($serverVars['HTTP_AUTHORIZATION']) || !empty($serverVars['Authorization'])) {
// Some clients use the non-standard 'Authorization' header.
$authorization = !empty($serverVars['HTTP_AUTHORIZATION'])
? $serverVars['HTTP_AUTHORIZATION']
: $serverVars['Authorization'];
$hash = base64_decode(str_replace('Basic ', '', $authorization));
if (strpos($hash, ':') !== false) {
list($user, $pass) = explode(':', $hash, 2);
}
$user = !empty($username) ? $username : $user;
} elseif (!empty($username)) {
// Might not need a password, could be using X509 cert.
$user = $username;
} else {
// No provided username or Authorization header.
self::$_logger->notice(sprintf(
'[%s] Client did not provide authentication data.',
$this->_procid)
);
return false;
}
$user = $this->_driver->getUsernameFromEmail($user);
$pos = strrpos($user, '\\');
if ($pos !== false) {
$domain = substr($user, 0, $pos);
$user = substr($user, $pos + 1);
} else {
$domain = null;
}
// Authenticate
if ($result = $this->_driver->authenticate($user, $pass, $domain)) {
if ($result === self::AUTH_REASON_USER_DENIED) {
$this->_globalError = Horde_ActiveSync_Status::SYNC_NOT_ALLOWED;
} elseif ($result === self::AUTH_REASON_DEVICE_DENIED) {
$this->_globalError = Horde_ActiveSync_Status::DEVICE_BLOCKED_FOR_USER;
} elseif ($result !== true) {
$this->_globalError = Horde_ActiveSync_Status::DENIED;
}
} else {
return false;
}
if (!$this->_driver->setup($user)) {
return false;
}
return true;
}
/**
* Allow to force the highest version to support.
*
* @param float $version The highest version
*/
public function setSupportedVersion($version)
{
$this->_maxVersion = $version;
}
/**
* Set the local path to the root certificate bundle.
*
* @param string $path The local path to the bundle.
*/
public function setRootCertificatePath($path)
{
$this->_certPath = $path;
}
/**
* Getter
*
* @param string $property The property to return.
*
* @return mixed The value of the requested property.
*/
public function __get($property)
{
switch ($property) {
case 'encoder':
case 'decoder':
case 'state':
case 'request':
case 'driver':
case 'provisioning':
case 'multipart':
case 'certPath':
$property = '_' . $property;
return $this->$property;
case 'logger':
return self::$_logger;
case 'device':
return self::$_device;
default:
throw new InvalidArgumentException(sprintf(
'The property %s does not exist',
$property)
);
}
}
/**
* Setter for the logger
*
* @param Horde_Log_Logger $logger The logger object.
*
* @return void
*/
public function setLogger(Horde_ActiveSync_Interface_LoggerFactory $logger)
{
$this->_loggerFactory = $logger;
}
protected function _setLogger(array $options)
{
if (!empty($this->_loggerFactory)) {
self::$_logger = $this->_loggerFactory->create($options);
$this->_encoder->setLogger(self::$_logger);
$this->_decoder->setLogger(self::$_logger);
$this->_driver->setLogger(self::$_logger);
$this->_state->setLogger(self::$_logger);
}
}
/**
* Setter for provisioning support
*
*/
public function setProvisioning($provision)
{
$this->_provisioning = $provision;
}
/**
* Send the headers indicating that provisioning is required.
*/
public function provisioningRequired()
{
$this->provisionHeader();
$this->activeSyncHeader();
$this->versionHeader();
$this->commandsHeader();
header('Cache-Control: private');
}
/**
* The heart of the server. Dispatch a request to the appropriate request
* handler.
*
* @param string $cmd The command we are requesting.
* @param string $devId The device id making the request. @deprecated
*
* @return string|boolean false if failed, true if succeeded and response
* content is wbxml, otherwise the
* content-type string to send in the response.
* @throws Horde_ActiveSync_Exception
* @throws Horde_ActiveSync_Exception_InvalidRequest
* @throws Horde_ActiveSync_PermissionDenied
*/
public function handleRequest($cmd, $devId)
{
$get = $this->getGetVars();
if (empty($cmd)) {
$cmd = $get['Cmd'];
}
if (empty($devId)) {
$devId = !empty($get['DeviceId']) ? strtoupper($get['DeviceId']) : null;
} else {
$devId = strtoupper($devId);
}
$this->_setLogger($get);
// @TODO: Remove is_callable check for H6.
// Callback to give the backend the option to limit EAS version based
// on user/device/etc...
if (is_callable(array($this->_driver, 'versionCallback'))) {
$this->_driver->versionCallback($this);
}
// Autodiscovery handles authentication on it's own.
if ($cmd == 'Autodiscover') {
$request = new Horde_ActiveSync_Request_Autodiscover($this, new Horde_ActiveSync_Device($this->_state));
if (!empty(self::$_logger)) {
$request->setLogger(self::$_logger);
}
$result = $request->handle($this->_request);
$this->_driver->clearAuthentication();
return $result;
}
if (!$this->authenticate(!empty($get['User']) ? $get['User'] : '')) {
$this->activeSyncHeader();
$this->versionHeader();
$this->commandsHeader();
throw new Horde_Exception_AuthenticationFailure();
}
// Set provisioning support now that we are authenticated.
$this->setProvisioning($this->_driver->getProvisioning());
self::$_logger->info(sprintf(
'[%s] %s request received for user %s',
$this->_procid,
strtoupper($cmd),
$this->_driver->getUser())
);
// These are all handled in the same class.
if ($cmd == 'FolderDelete' || $cmd == 'FolderUpdate') {
$cmd = 'FolderCreate';
}
// Device id is REQUIRED
if (empty($devId)) {
if ($cmd == 'Options') {
$this->_doOptionsRequest();
$this->_driver->clearAuthentication();
return true;
}
$this->_driver->clearAuthentication();
throw new Horde_ActiveSync_Exception_InvalidRequest('Device failed to send device id.');
}
// EAS Version
$version = $this->getProtocolVersion();
// Does device exist AND does the user have an account on the device?
if (!$this->_state->deviceExists($devId, $this->_driver->getUser())) {
// Device might exist, but with a new (additional) user account
if ($this->_state->deviceExists($devId)) {
self::$_device = $this->_state->loadDeviceInfo($devId);
} else {
self::$_device = new Horde_ActiveSync_Device($this->_state);
}
self::$_device->policykey = 0;
self::$_device->userAgent = $this->_request->getHeader('User-Agent');
self::$_device->deviceType = !empty($get['DeviceType']) ? $get['DeviceType'] : '';
self::$_device->rwstatus = self::RWSTATUS_NA;
self::$_device->user = $this->_driver->getUser();
self::$_device->id = $devId;
self::$_device->needsVersionUpdate($this->getSupportedVersions());
self::$_device->version = $version;
// @TODO: Remove is_callable check for H6.
// Combine this with the modifyDevice callback? Allow $device
// to be modified here?
if (is_callable(array($this->_driver, 'createDeviceCallback'))) {
$callback_ret = $this->_driver->createDeviceCallback(self::$_device);
if ($callback_ret !== true) {
$msg = sprintf(
'The device %s was disallowed for user %s per policy settings.',
self::$_device->id,
self::$_device->user);
self::$_logger->err($msg);
if ($version > self::VERSION_TWELVEONE) {
$this->_globalError = $callback_ret;
} else {
throw new Horde_ActiveSync_Exception($msg);
}
} else {
// Give the driver a chance to modify device properties.
if (is_callable(array($this->_driver, 'modifyDeviceCallback'))) {
self::$_device = $this->_driver->modifyDeviceCallback(self::$_device);
}
}
}
} else {
self::$_device = $this->_state->loadDeviceInfo($devId, $this->_driver->getUser());
// If the device state was removed from storage, we may lose the
// device properties, so try to repopulate what we can. userAgent
// is ALWAYS available, so if it's missing, the state is gone.
if (empty(self::$_device->userAgent)) {
self::$_device->userAgent = $this->_request->getHeader('User-Agent');
self::$_device->deviceType = !empty($get['DeviceType']) ? $get['DeviceType'] : '';
self::$_device->user = $this->_driver->getUser();
}
if (empty(self::$_device->version)) {
self::$_device->version = $version;
}
if (self::$_device->version < $this->_maxVersion &&
self::$_device->needsVersionUpdate($this->getSupportedVersions())) {
$needMsRp = true;
}
// Give the driver a chance to modify device properties.
if (is_callable(array($this->_driver, 'modifyDeviceCallback'))) {
self::$_device = $this->_driver->modifyDeviceCallback(self::$_device);
}
}
self::$_device->save();
if (is_callable(array($this->_driver, 'deviceCallback'))) {
$callback_ret = $this->_driver->deviceCallback(self::$_device);
if ($callback_ret !== true) {
$msg = sprintf(
'The device %s was disallowed for user %s per policy settings.',
self::$_device->id,
self::$_device->user);
self::$_logger->err($msg);
if ($version > self::VERSION_TWELVEONE) {
$this->_globalError = $callback_ret;
} else {
throw new Horde_ActiveSync_Exception($msg);
}
}
}
// Lastly, check if the device has been set to blocked.
if (self::$_device->blocked) {
$msg = sprintf(
'The device %s was blocked.',
self::$_device->id);
self::$_logger->err($msg);
if ($version > self::VERSION_TWELVEONE) {
$this->_globalError = Horde_ActiveSync_Status::DEVICE_BLOCKED_FOR_USER;
} else {
throw new Horde_ActiveSync_Exception($msg);
}
}
// Don't bother with everything else if all we want are Options
if ($cmd == 'Options') {
$this->_doOptionsRequest();
$this->_driver->clearAuthentication();
return true;
}
// Read the initial Wbxml header
$this->_decoder->readWbxmlHeader();
// Support Multipart response for ITEMOPERATIONS requests?
$headers = $this->_request->getHeaders();
if ((!empty($headers['ms-asacceptmultipart']) && $headers['ms-asacceptmultipart'] == 'T') ||
!empty($get['AcceptMultiPart'])) {
$this->_multipart = true;
self::$_logger->info(sprintf(
'[%s] Requesting multipart data.',
$this->_procid)
);
}
// Load the request handler to handle the request
// We must send the eas header here, since some requests may start
// output and be large enough to flush the buffer (e.g., GetAttachment)
// See Bug: 12486
$this->activeSyncHeader();
if ($cmd != 'GetAttachment') {
$this->contentTypeHeader();
}
// Should we announce a new version is available to the client?
if (!empty($needMsRp)) {
self::$_logger->info(sprintf(
'[%s] Announcing X-MS-RP to client.',
$this->_procid)
);
header("X-MS-RP: ". $this->getSupportedVersions());
}
// @TODO: Look at getting rid of having to set the version in the driver
// and get it from the device object for H6.
$this->_driver->setDevice(self::$_device);
$class = 'Horde_ActiveSync_Request_' . basename($cmd);
if (class_exists($class)) {
$request = new $class($this);
$request->setLogger(self::$_logger);
$result = $request->handle();
self::$_logger->info(sprintf(
'[%s] Maximum memory usage for ActiveSync request: %d bytes.',
$this->_procid,
memory_get_peak_usage())
);
return $result;
}
$this->_driver->clearAuthentication();
throw new Horde_ActiveSync_Exception_InvalidRequest(basename($cmd) . ' not supported.');
}
/**
* Send the MS_Server-ActiveSync header.
*
*/
public function activeSyncHeader()
{
header('Allow: OPTIONS,POST');
header('Server: Horde_ActiveSync Library v' . self::LIBRARY_VERSION);
header('Public: OPTIONS,POST');
switch ($this->_maxVersion) {
case self::VERSION_TWOFIVE:
header('MS-Server-ActiveSync: 6.5.7638.1');
break;
case self::VERSION_TWELVE:
header('MS-Server-ActiveSync: 12.0');
break;
case self::VERSION_TWELVEONE:
header('MS-Server-ActiveSync: 12.1');
break;
case self::VERSION_FOURTEEN:
header('MS-Server-ActiveSync: 14.0');
break;
case self::VERSION_FOURTEENONE:
header('MS-Server-ActiveSync: 14.2');
}
}
/**
* Send the protocol versions header.
*
*/
public function versionHeader()
{
header('MS-ASProtocolVersions: ' . $this->getSupportedVersions());
}
/**
* Return supported versions in a comma delimited string suitable for
* sending as the MS-ASProtocolVersions header.
*
* @return string
*/
public function getSupportedVersions()
{
return implode(',', array_slice(self::$_supportedVersions, 0, (array_search($this->_maxVersion, self::$_supportedVersions) + 1)));
}
/**
* Send protocol commands header.
*
*/
public function commandsHeader()
{
header('MS-ASProtocolCommands: ' . $this->getSupportedCommands());
}
/**
* Return the supported commands in a comma delimited string suitable for
* sending as the MS-ASProtocolCommands header.
*
* @return string
*/
public function getSupportedCommands()
{
switch ($this->_maxVersion) {
case self::VERSION_TWOFIVE:
return 'Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,ResolveRecipients,ValidateCert,Provision,Search,Ping';
case self::VERSION_TWELVE:
case self::VERSION_TWELVEONE:
case self::VERSION_FOURTEEN:
case self::VERSION_FOURTEENONE:
return 'Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,Search,Settings,Ping,ItemOperations,Provision,ResolveRecipients,ValidateCert';
}
}
/**
* Send provision header
*
*/
public function provisionHeader()
{
header('HTTP/1.1 449 Retry after sending a PROVISION command');
}
/**
* Obtain the policy key header from the request.
*
* @return integer The policy key or '0' if not set.
*/
public function getPolicyKey()
{
// Policy key can come from header or encoded request parameters.
$this->_policykey = $this->_request->getHeader('X-MS-PolicyKey');
if (empty($this->_policykey)) {
$get = $this->getGetVars();
if (!empty($get['PolicyKey'])) {
$this->_policykey = $get['PolicyKey'];
} else {
$this->_policykey = 0;
}
}
return $this->_policykey;
}
/**
* Obtain the ActiveSync protocol version requested by the client headers.
*
* @return long
*/
public function getProtocolVersion()
{
if (isset(self::$_version)) {
return self::$_version;
}
self::$_version = $this->_request->getHeader('MS-ASProtocolVersion');
if (empty(self::$_version)) {
$get = $this->getGetVars();
self::$_version = empty($get['ProtVer']) ? '1.0' : $get['ProtVer'];
}
return self::$_version;
}
/**
* Return the GET variables passed from the device, decoding from
* base64 if needed.
*
* @return array A hash of get variables => values.
*/
public function getGetVars()
{
if (!empty($this->_get)) {
return $this->_get;
}
$results = array();
$get = $this->_request->getGetVars();
// Do we need to decode the request parameters?
if (!isset($get['Cmd']) && !isset($get['DeviceId']) && !isset($get['DeviceType'])) {
$serverVars = $this->_request->getServerVars();
if (isset($serverVars['QUERY_STRING']) && strlen($serverVars['QUERY_STRING']) >= 10) {
$results = Horde_ActiveSync_Utils::decodeBase64($serverVars['QUERY_STRING']);
// Normalize values.
switch ($results['DeviceType']) {
case 'PPC':
$results['DeviceType'] = 'PocketPC';
break;
case 'SP':
$results['DeviceType'] = 'SmartPhone';
break;
case 'WP':
case 'WP8':
$results['DeviceType'] = 'WindowsPhone';
break;
case 'android':
case 'android40':
$results['DeviceType'] = 'android';
}
$this->_get = $results;
}
} else {
$this->_get = $get;
}
return $this->_get;
}
/**
* Return any global errors that occured during initial connection.
*
* @since 2.4.0
* @return mixed A Horde_ActiveSync_Status:: constant of boolean false if
* no errors.
*/
public function checkGlobalError()
{
return $this->_globalError;
}
/**
* Send the content type header.
*
*/
public function contentTypeHeader($content_type = null)
{
if (!empty($content_type)) {
header('Content-Type: ' . $content_type);
return;
}
if ($this->_multipart) {
header('Content-Type: application/vnd.ms-sync.multipart');
} else {
header('Content-Type: application/vnd.ms-sync.wbxml');
}
}
/**
* Send the OPTIONS request response headers.
*
*/
protected function _doOptionsRequest()
{
$this->activeSyncHeader();
$this->versionHeader();
$this->commandsHeader();
}
/**
* Return the number of bytes corresponding to the requested trunction
* constant.
*
* @param integer $truncation The constant.
*
* @return integer|boolean Either the size, in bytes, to truncate or
* falso if no truncation.
*/
static public function getTruncSize($truncation)
{
switch($truncation) {
case Horde_ActiveSync::TRUNCATION_ALL:
return 0;
case Horde_ActiveSync::TRUNCATION_1:
return 4096;
case Horde_ActiveSync::TRUNCATION_2:
return 5120;
case Horde_ActiveSync::TRUNCATION_3:
return 7168;
case Horde_ActiveSync::TRUNCATION_4:
return 10240;
case Horde_ActiveSync::TRUNCATION_5:
return 20480;
case Horde_ActiveSync::TRUNCATION_6:
return 51200;
case Horde_ActiveSync::TRUNCATION_7:
return 102400;
case Horde_ActiveSync::TRUNCATION_8:
case Horde_ActiveSync::TRUNCATION_NONE:
return false;
default:
return 1024; // Default to 1Kb
}
}
}
Horde_ActiveSync-2.12.3/locale/de/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000002630 12273362323 021057 0 ustar Þ• Ü % œ 0 1
9 D G S X d i n
q | ‰ ž ¡
º Å Î Ö à
ã
î € ù z £ ¦ · ½ É Í Ò Õ ê ú
) 7
N Y a v y ‚
%s part Audio part Cc Common Name Date EAS Version From IMEI Id Image part Message part Model Multipart part OS OS Language Phone Number Policy Key Reply-To Subject Text part To User Agent Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-10-29 10:13+0100
PO-Revision-Date: 2013-05-22 14:48+0200
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
Language: de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
%s-Nachrichtenteil Audio-Nachrichtenteil Cc Eindeutiger Name Datum EAS-Version Von IMEI Id Bild-Nachrichtenteil Nachrichtenteil Modell Multipart-Nachrichtenteil OS OS-Sprache Telefonnummer Richtlinien-Schlüssel Antwort an Betreff Text-Nachrichtenteil An Programm Video-Nachrichtenteil Horde_ActiveSync-2.12.3/locale/de/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000005015 12273362323 021062 0 ustar # German translations for Horde_ActiveSync package.
# Copyright 2012-2014 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
# Jan Schneider , 2012-2014.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync \n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-10-29 10:13+0100\n"
"PO-Revision-Date: 2013-05-22 14:48+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/ActiveSync/Imap/Message.php:543
#, php-format
msgid "%s part"
msgstr "%s-Nachrichtenteil"
#: lib/Horde/ActiveSync/Imap/Message.php:522
msgid "Audio part"
msgstr "Audio-Nachrichtenteil"
#: lib/Horde/ActiveSync/Imap/Message.php:139
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Device.php:211
msgid "Common Name"
msgstr "Eindeutiger Name"
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "Date"
msgstr "Datum"
#: lib/Horde/ActiveSync/Device.php:223
msgid "EAS Version"
msgstr "EAS-Version"
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "From"
msgstr "Von"
#: lib/Horde/ActiveSync/Device.php:208
msgid "IMEI"
msgstr "IMEI"
#: lib/Horde/ActiveSync/Device.php:199
msgid "Id"
msgstr "Id"
#: lib/Horde/ActiveSync/Imap/Message.php:525
msgid "Image part"
msgstr "Bild-Nachrichtenteil"
#: lib/Horde/ActiveSync/Imap/Message.php:529
msgid "Message part"
msgstr "Nachrichtenteil"
#: lib/Horde/ActiveSync/Device.php:205
msgid "Model"
msgstr "Modell"
#: lib/Horde/ActiveSync/Imap/Message.php:532
msgid "Multipart part"
msgstr "Multipart-Nachrichtenteil"
#: lib/Horde/ActiveSync/Device.php:214
msgid "OS"
msgstr "OS"
#: lib/Horde/ActiveSync/Device.php:217
msgid "OS Language"
msgstr "OS-Sprache"
#: lib/Horde/ActiveSync/Device.php:220
msgid "Phone Number"
msgstr "Telefonnummer"
#: lib/Horde/ActiveSync/Device.php:200
msgid "Policy Key"
msgstr "Richtlinien-Schlüssel"
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Reply-To"
msgstr "Antwort an"
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "Subject"
msgstr "Betreff"
#: lib/Horde/ActiveSync/Imap/Message.php:535
msgid "Text part"
msgstr "Text-Nachrichtenteil"
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "To"
msgstr "An"
#: lib/Horde/ActiveSync/Device.php:201
msgid "User Agent"
msgstr "Programm"
#: lib/Horde/ActiveSync/Imap/Message.php:538
msgid "Video part"
msgstr "Video-Nachrichtenteil"
Horde_ActiveSync-2.12.3/locale/es/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000002564 12273362323 021104 0 ustar Þ• Ü % œ 0 1
9 D G S X d i n
q | ‰ ž ¡
º Å Î Ö à
ã
î ® ù ¨ ± ¸
» É Ï Ü ß ä ç î ö
ý
. = I P V [ m
%s part Audio part Cc Common Name Date EAS Version From IMEI Id Image part Message part Model Multipart part OS OS Language Phone Number Policy Key Reply-To Subject Text part To User Agent Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-06-18 14:03+0200
PO-Revision-Date: 2013-06-11 20:26+0200
Last-Translator: Manuel P. Ayala , Juan C. Blanco
Language-Team: i18n@lists.horde.org
Language: es
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
parte %s Sonido Cc Nombre común Fecha Versión EAS De IMEI Id Imagen Mensaje Modelo Multiparte SO Idioma del SO Número de teléfono Comportamiento Responder-A Asunto Texto Para Agente de usuario VÃdeo Horde_ActiveSync-2.12.3/locale/es/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000004741 12273362323 021106 0 ustar # Spanish translations for Horde_ActiveSync package.
# Copyright (C) 2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
# Automatically generated, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync \n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-06-18 14:03+0200\n"
"PO-Revision-Date: 2013-06-11 20:26+0200\n"
"Last-Translator: Manuel P. Ayala , Juan C. Blanco "
"\n"
"Language-Team: i18n@lists.horde.org\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/ActiveSync/Imap/Message.php:537
#, php-format
msgid "%s part"
msgstr "parte %s"
#: lib/Horde/ActiveSync/Imap/Message.php:516
msgid "Audio part"
msgstr "Sonido"
#: lib/Horde/ActiveSync/Imap/Message.php:139
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Device.php:171
msgid "Common Name"
msgstr "Nombre común"
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "Date"
msgstr "Fecha"
#: lib/Horde/ActiveSync/Device.php:183
msgid "EAS Version"
msgstr "Versión EAS"
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "From"
msgstr "De"
#: lib/Horde/ActiveSync/Device.php:168
msgid "IMEI"
msgstr "IMEI"
#: lib/Horde/ActiveSync/Device.php:159
msgid "Id"
msgstr "Id"
#: lib/Horde/ActiveSync/Imap/Message.php:519
msgid "Image part"
msgstr "Imagen"
#: lib/Horde/ActiveSync/Imap/Message.php:523
msgid "Message part"
msgstr "Mensaje"
#: lib/Horde/ActiveSync/Device.php:165
msgid "Model"
msgstr "Modelo"
#: lib/Horde/ActiveSync/Imap/Message.php:526
msgid "Multipart part"
msgstr "Multiparte"
#: lib/Horde/ActiveSync/Device.php:174
msgid "OS"
msgstr "SO"
#: lib/Horde/ActiveSync/Device.php:177
msgid "OS Language"
msgstr "Idioma del SO"
#: lib/Horde/ActiveSync/Device.php:180
msgid "Phone Number"
msgstr "Número de teléfono"
#: lib/Horde/ActiveSync/Device.php:160
msgid "Policy Key"
msgstr "Comportamiento"
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Reply-To"
msgstr "Responder-A"
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "Subject"
msgstr "Asunto"
#: lib/Horde/ActiveSync/Imap/Message.php:529
msgid "Text part"
msgstr "Texto"
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "To"
msgstr "Para"
#: lib/Horde/ActiveSync/Device.php:161
msgid "User Agent"
msgstr "Agente de usuario"
#: lib/Horde/ActiveSync/Imap/Message.php:532
msgid "Video part"
msgstr "VÃdeo"
Horde_ActiveSync-2.12.3/locale/eu/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000001725 12273362323 021104 0 ustar Þ• Œ ü H I
Q \ _ d
i t ™ ¡ «
® ¢ ¹ \ e q t y ~
Š •
¥ ³ ¸ Ä É
%s part Audio part Cc Date From Image part Message part Multipart part Reply-To Subject Text part To Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2012-10-12 19:05+0200
PO-Revision-Date: 2013-01-17 14:31+0100
Last-Translator: Ibon Igartua
Language-Team: i18n@lists.horde.org
Language:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
X-Poedit-Language: Basque
%s zatia Audio-zatia Cc Data Nork Irudi-zatia Mezu-zatia Multipart zatia Erantzun honi Gaia Testu-zatia Nori Bideo-zatia Horde_ActiveSync-2.12.3/locale/eu/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000003350 12273362323 021103 0 ustar # Basque translations for bcwhord package.
# Copyright 2012-2014 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
# Automatically generated, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2012-10-12 19:05+0200\n"
"PO-Revision-Date: 2013-01-17 14:31+0100\n"
"Last-Translator: Ibon Igartua \n"
"Language-Team: i18n@lists.horde.org\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Basque\n"
#: lib/Horde/ActiveSync/Imap/Message.php:476
#, php-format
msgid "%s part"
msgstr "%s zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:455
msgid "Audio part"
msgstr "Audio-zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Imap/Message.php:115
msgid "Date"
msgstr "Data"
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "From"
msgstr "Nork"
#: lib/Horde/ActiveSync/Imap/Message.php:458
msgid "Image part"
msgstr "Irudi-zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:462
msgid "Message part"
msgstr "Mezu-zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:465
msgid "Multipart part"
msgstr "Multipart zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "Reply-To"
msgstr "Erantzun honi"
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Subject"
msgstr "Gaia"
#: lib/Horde/ActiveSync/Imap/Message.php:468
msgid "Text part"
msgstr "Testu-zatia"
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "To"
msgstr "Nori"
#: lib/Horde/ActiveSync/Imap/Message.php:471
msgid "Video part"
msgstr "Bideo-zatia"
Horde_ActiveSync-2.12.3/locale/fr/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000002002 12273362323 021067 0 ustar Þ• Œ ü H I
Q \ _ d
i t ™ ¡ «
® Æ ¹ € Š — š Ÿ ¢ ¯ Á Ñ Þ ä ñ
ô
%s part Audio part Cc Date From Image part Message part Multipart part Reply-To Subject Text part To Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-01-14 09:19+0100
PO-Revision-Date: 2013-01-14 10:13+0100
Last-Translator: Paul De Vlieger
Language-Team: French
Language: fr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n > 1);
X-Generator: Lokalize 1.4
%s partie Partie Audio Cc Date De Partie image Partie du message Partie Multiple Répondre à Objet Partie Texte À Partie vidéo Horde_ActiveSync-2.12.3/locale/fr/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000003503 12273362323 021101 0 ustar # French translations for Horde_ActiveSync package.
# Copyright (C) 2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
#
# Paul De Vlieger , 2013
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync \n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-01-14 09:19+0100\n"
"PO-Revision-Date: 2013-01-14 10:13+0100\n"
"Last-Translator: Paul De Vlieger \n"
"Language-Team: French \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.4\n"
#: lib/Horde/ActiveSync/Imap/Message.php:532
#, php-format
msgid "%s part"
msgstr "%s partie"
#: lib/Horde/ActiveSync/Imap/Message.php:511
msgid "Audio part"
msgstr "Partie Audio"
#: lib/Horde/ActiveSync/Imap/Message.php:137
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Imap/Message.php:117
msgid "Date"
msgstr "Date"
#: lib/Horde/ActiveSync/Imap/Message.php:121
msgid "From"
msgstr "De"
#: lib/Horde/ActiveSync/Imap/Message.php:514
msgid "Image part"
msgstr "Partie image"
#: lib/Horde/ActiveSync/Imap/Message.php:518
msgid "Message part"
msgstr "Partie du message"
#: lib/Horde/ActiveSync/Imap/Message.php:521
msgid "Multipart part"
msgstr "Partie Multiple"
#: lib/Horde/ActiveSync/Imap/Message.php:125
msgid "Reply-To"
msgstr "Répondre à "
#: lib/Horde/ActiveSync/Imap/Message.php:129
msgid "Subject"
msgstr "Objet"
#: lib/Horde/ActiveSync/Imap/Message.php:524
msgid "Text part"
msgstr "Partie Texte"
#: lib/Horde/ActiveSync/Imap/Message.php:133
msgid "To"
msgstr "À"
#: lib/Horde/ActiveSync/Imap/Message.php:527
msgid "Video part"
msgstr "Partie vidéo"
Horde_ActiveSync-2.12.3/locale/ja/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000002673 12273362323 021070 0 ustar Þ• Ü % œ 0 1
9 D G S X d i n
q | ‰ ž ¡
º Å Î Ö à
ã
î £ ù ª · º Ä Ë Þ ã è ë û : = F S c l s ‰ Œ ¨
%s part Audio part Cc Common Name Date EAS Version From IMEI Id Image part Message part Model Multipart part OS OS Language Phone Number Policy Key Reply-To Subject Text part To User Agent Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-06-04 11:48+0200
PO-Revision-Date: 2013-06-05 10:33+0900
Last-Translator: Hiromi Kimura
Language-Team: i18n@lists.horde.org
Language: ja
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=1; plural=0;
X-Generator: Poedit 1.5.4
%s パート 音パート Cc ä¸€èˆ¬å æ—¥ä»˜ EASãƒãƒ¼ã‚¸ãƒ§ãƒ³ From IMEI Id ç”»åƒãƒ‘ート メッセージパート 型番 マルãƒãƒ‘ート・パート OS OS言語 é›»è©±ç•ªå· ãƒãƒªã‚·ãƒ¼éµ Reply-To ä»¶å テã‚ストパート To ユーザエージェント ビデオパート Horde_ActiveSync-2.12.3/locale/ja/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000005045 12273362323 021067 0 ustar # Japanese translation for Horde.
# Copyright (C) 2012-2014 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
# Hiromi Kimura
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-06-04 11:48+0200\n"
"PO-Revision-Date: 2013-06-05 10:33+0900\n"
"Last-Translator: Hiromi Kimura \n"
"Language-Team: i18n@lists.horde.org\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.5.4\n"
#: lib/Horde/ActiveSync/Imap/Message.php:520
#, php-format
msgid "%s part"
msgstr "%s パート"
#: lib/Horde/ActiveSync/Imap/Message.php:499
msgid "Audio part"
msgstr "音パート"
#: lib/Horde/ActiveSync/Imap/Message.php:139
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Device.php:171
msgid "Common Name"
msgstr "一般å"
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "Date"
msgstr "日付"
#: lib/Horde/ActiveSync/Device.php:183
msgid "EAS Version"
msgstr "EASãƒãƒ¼ã‚¸ãƒ§ãƒ³"
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "From"
msgstr "From"
#: lib/Horde/ActiveSync/Device.php:168
msgid "IMEI"
msgstr "IMEI"
#: lib/Horde/ActiveSync/Device.php:159
msgid "Id"
msgstr "Id"
#: lib/Horde/ActiveSync/Imap/Message.php:502
msgid "Image part"
msgstr "ç”»åƒãƒ‘ート"
#: lib/Horde/ActiveSync/Imap/Message.php:506
msgid "Message part"
msgstr "メッセージパート"
#: lib/Horde/ActiveSync/Device.php:165
msgid "Model"
msgstr "型番"
#: lib/Horde/ActiveSync/Imap/Message.php:509
msgid "Multipart part"
msgstr "マルãƒãƒ‘ート・パート"
#: lib/Horde/ActiveSync/Device.php:174
msgid "OS"
msgstr "OS"
#: lib/Horde/ActiveSync/Device.php:177
msgid "OS Language"
msgstr "OS言語"
#: lib/Horde/ActiveSync/Device.php:180
msgid "Phone Number"
msgstr "電話番å·"
#: lib/Horde/ActiveSync/Device.php:160
msgid "Policy Key"
msgstr "ãƒãƒªã‚·ãƒ¼éµ"
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Reply-To"
msgstr "Reply-To"
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "Subject"
msgstr "ä»¶å"
#: lib/Horde/ActiveSync/Imap/Message.php:512
msgid "Text part"
msgstr "テã‚ストパート"
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "To"
msgstr "To"
#: lib/Horde/ActiveSync/Device.php:161
msgid "User Agent"
msgstr "ユーザエージェント"
#: lib/Horde/ActiveSync/Imap/Message.php:515
msgid "Video part"
msgstr "ビデオパート"
Horde_ActiveSync-2.12.3/locale/nl/LC_MESSAGES/Horde_ActiveSync.mo 0000664 0000766 0000024 00000002647 12273362323 021110 0 ustar Þ• Ü % œ 0 1
9 D G S X d i n
q | ‰ ž ¡
º Å Î Ö à
ã
î ¾ ù ¸ À Ñ
Ô â
è ó ÷ ü
ÿ
! 0 3 ; J Y h r ‰
˜
%s part Audio part Cc Common Name Date EAS Version From IMEI Id Image part Message part Model Multipart part OS OS Language Phone Number Policy Key Reply-To Subject Text part To User Agent Video part Project-Id-Version: Horde_ActiveSync
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-06-04 11:48+0200
PO-Revision-Date: 2013-06-07 14:31+0200
Last-Translator: Arjen de Korte
Language-Team: American English
Language: nl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
X-Generator: Lokalize 1.5
%s deel Geluids fragment Cc Algemene naam Datum EAS versie Van IMEI Id Afbeelding Berichtonderdeel Model Multipart deel OS OS taal Telefoonnummer Beleidssleutel Antwoorden aan Onderwerp Platte Tekst onderdeel Aan User Agent Video fragment Horde_ActiveSync-2.12.3/locale/nl/LC_MESSAGES/Horde_ActiveSync.po 0000664 0000766 0000024 00000005115 12273362323 021104 0 ustar # Dutch translations for Horde_ActiveSync package.
# Copyright 2012-2014 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
#
# Automatically generated, 2012.
# Arjen de Korte , 2012, 2013.
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-06-04 11:48+0200\n"
"PO-Revision-Date: 2013-06-07 14:31+0200\n"
"Last-Translator: Arjen de Korte \n"
"Language-Team: American English \n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#: lib/Horde/ActiveSync/Imap/Message.php:520
#, php-format
msgid "%s part"
msgstr "%s deel"
#: lib/Horde/ActiveSync/Imap/Message.php:499
msgid "Audio part"
msgstr "Geluids fragment"
#: lib/Horde/ActiveSync/Imap/Message.php:139
msgid "Cc"
msgstr "Cc"
#: lib/Horde/ActiveSync/Device.php:171
msgid "Common Name"
msgstr "Algemene naam"
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "Date"
msgstr "Datum"
#: lib/Horde/ActiveSync/Device.php:183
msgid "EAS Version"
msgstr "EAS versie"
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "From"
msgstr "Van"
#: lib/Horde/ActiveSync/Device.php:168
msgid "IMEI"
msgstr "IMEI"
#: lib/Horde/ActiveSync/Device.php:159
msgid "Id"
msgstr "Id"
#: lib/Horde/ActiveSync/Imap/Message.php:502
msgid "Image part"
msgstr "Afbeelding"
#: lib/Horde/ActiveSync/Imap/Message.php:506
msgid "Message part"
msgstr "Berichtonderdeel"
#: lib/Horde/ActiveSync/Device.php:165
msgid "Model"
msgstr "Model"
#: lib/Horde/ActiveSync/Imap/Message.php:509
msgid "Multipart part"
msgstr "Multipart deel"
#: lib/Horde/ActiveSync/Device.php:174
msgid "OS"
msgstr "OS"
#: lib/Horde/ActiveSync/Device.php:177
msgid "OS Language"
msgstr "OS taal"
#: lib/Horde/ActiveSync/Device.php:180
msgid "Phone Number"
msgstr "Telefoonnummer"
#: lib/Horde/ActiveSync/Device.php:160
msgid "Policy Key"
msgstr "Beleidssleutel"
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Reply-To"
msgstr "Antwoorden aan"
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "Subject"
msgstr "Onderwerp"
#: lib/Horde/ActiveSync/Imap/Message.php:512
msgid "Text part"
msgstr "Platte Tekst onderdeel"
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "To"
msgstr "Aan"
#: lib/Horde/ActiveSync/Device.php:161
msgid "User Agent"
msgstr "User Agent"
#: lib/Horde/ActiveSync/Imap/Message.php:515
msgid "Video part"
msgstr "Video fragment"
Horde_ActiveSync-2.12.3/locale/Horde_ActiveSync.pot 0000664 0000766 0000024 00000004301 12273362323 017066 0 ustar # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_ActiveSync package.
# FIRST AUTHOR , YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Horde_ActiveSync \n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-10-29 10:13+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: lib/Horde/ActiveSync/Imap/Message.php:543
#, php-format
msgid "%s part"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:522
msgid "Audio part"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:139
msgid "Cc"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:211
msgid "Common Name"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:119
msgid "Date"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:223
msgid "EAS Version"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:123
msgid "From"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:208
msgid "IMEI"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:199
msgid "Id"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:525
msgid "Image part"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:529
msgid "Message part"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:205
msgid "Model"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:532
msgid "Multipart part"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:214
msgid "OS"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:217
msgid "OS Language"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:220
msgid "Phone Number"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:200
msgid "Policy Key"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:127
msgid "Reply-To"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:131
msgid "Subject"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:535
msgid "Text part"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:135
msgid "To"
msgstr ""
#: lib/Horde/ActiveSync/Device.php:201
msgid "User Agent"
msgstr ""
#: lib/Horde/ActiveSync/Imap/Message.php:538
msgid "Video part"
msgstr ""
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/1_horde_activesync_base_tables.php 0000664 0000766 0000024 00000006413 12273362323 025630 0 ustar tables())) {
$t = $this->createTable('horde_activesync_state', array('autoincrementKey' => array('sync_key')));
$t->column('sync_time', 'integer');
$t->column('sync_key', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_data', 'text');
$t->column('sync_devid', 'string', array('limit' => 255));
$t->column('sync_folderid', 'string', array('limit' => 255));
$t->column('sync_user', 'string', array('limit' => 255));
$t->end();
$this->addIndex('horde_activesync_state', array('sync_folderid'));
$this->addIndex('horde_activesync_state', array('sync_devid'));
}
if (!in_array('horde_activesync_map', $this->tables())) {
$t = $this->createTable('horde_activesync_map', array('autoincrementKey' => false));
$t->column('message_uid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_modtime', 'integer');
$t->column('sync_key', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_devid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_folderid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_user', 'string', array('limit' => 255));
$t->end();
$this->addIndex('horde_activesync_map', array('sync_devid'));
$this->addIndex('horde_activesync_map', array('message_uid'));
$this->addIndex('horde_activesync_map', array('sync_user'));
}
if (!in_array('horde_activesync_device', $this->tables())) {
$t = $this->createTable('horde_activesync_device', array('autoincrementKey' => array('device_id')));
$t->column('device_id', 'string', array('limit' => 255, 'null' => false));
$t->column('device_type', 'string', array('limit' => 255, 'null' => false));
$t->column('device_agent', 'string', array('limit' => 255, 'null' => false));
$t->column('device_supported', 'text');
$t->column('device_policykey', 'bigint', array('default' => 0));
$t->column('device_rwstatus', 'integer');
$t->end();
}
if (!in_array('horde_activesync_device_users', $this->tables())) {
$t = $this->createTable('horde_activesync_device_users', array('autoincrementKey' => false));
$t->column('device_id', 'string', array('limit' => 255, 'null' => false));
$t->column('device_user', 'string', array('limit' => 255, 'null' => false));
$t->column('device_ping', 'text');
$t->column('device_folders', 'text');
$t->end();
$this->addIndex('horde_activesync_device_users', array('device_user'));
$this->addIndex('horde_activesync_device_users', array('device_id'));
}
}
public function down()
{
$this->dropTable('horde_activesync_device_users');
$this->dropTable('horde_activesync_device');
$this->dropTable('horde_activesync_map');
$this->dropTable('horde_activesync_state');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/2_horde_activesync_peruserpolicykey.php 0000664 0000766 0000024 00000001170 12273362323 026776 0 ustar addColumn(
'horde_activesync_device_users',
'device_policykey',
'bigint',
array('default' => 0));
$this->removeColumn('horde_activesync_device', 'device_policykey');
}
public function down()
{
$this->addColumn(
'horde_activesync_device',
'device_policykey',
'bigint',
array('default' => 0));
$this->removeColumn('horde_activesync_device_users', 'device_policykey');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/3_horde_activesync_clientidmap.php 0000664 0000766 0000024 00000000563 12273362323 025657 0 ustar addColumn(
'horde_activesync_map',
'sync_clientid',
'string',
array('limit' => 255));
}
public function down()
{
$this->removeColumn('horde_activesync_map', 'sync_clientid');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/4_horde_activesync_longtextstatefield.php 0000664 0000766 0000024 00000000607 12273362323 027277 0 ustar changeColumn(
'horde_activesync_state',
'sync_data',
'mediumtext');
}
public function down()
{
$this->changeColumn(
'horde_activesync_state',
'sync_data',
'text');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/5_horde_activesync_addpendingfield.php 0000664 0000766 0000024 00000000532 12273362323 026465 0 ustar addColumn(
'horde_activesync_state',
'sync_pending',
'mediumtext');
}
public function down()
{
$this->removeColumn('horde_activesync_state', 'sync_pending');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/6_horde_activesync_addmailmap.php 0000664 0000766 0000024 00000002023 12273362323 025453 0 ustar createTable('horde_activesync_mailmap', array('autoincrementKey' => false));
$t->column('message_uid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_key', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_devid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_folderid', 'string', array('limit' => 255, 'null' => false));
$t->column('sync_user', 'string', array('limit' => 255));
$t->column('sync_read', 'integer');
$t->column('sync_deleted', 'integer');
$t->end();
$this->addIndex('horde_activesync_mailmap', array('message_uid'));
$this->addIndex('horde_activesync_mailmap', array('sync_devid'));
$this->addIndex('horde_activesync_mailmap', array('sync_folderid'));
}
public function down()
{
$this->dropTable('horde_activesync_mailmap');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/7_horde_activesync_clearstate.php 0000664 0000766 0000024 00000000737 12273362323 025524 0 ustar delete('DELETE from horde_activesync_state');
$this->delete('DELETE from horde_activesync_map');
}
public function down()
{
$this->delete('DELETE from horde_activesync_state');
$this->delete('DELETE from horde_activesync_map');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/8_horde_activesync_addmailflagged.php 0000664 0000766 0000024 00000000532 12273362323 026274 0 ustar addColumn(
'horde_activesync_mailmap',
'sync_flagged',
'integer');
}
public function down()
{
$this->removeColumn('horde_activesync_mailmap', 'sync_flagged');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/9_horde_activesync_add_cache.php 0000664 0000766 0000024 00000001177 12273362323 025251 0 ustar createTable('horde_activesync_cache', array('autoincrementKey' => false));
$t->column('cache_devid', 'string', array('limit' => 255));
$t->column('cache_user', 'string', array('limit' => 255));
$t->column('cache_data', 'text');
$t->end();
$this->addIndex('horde_activesync_cache', array('cache_devid'));
$this->addIndex('horde_activesync_cache', array('cache_user'));
}
public function down()
{
$this->dropTable('horde_activesync_cache');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/10_horde_activesync_add_deviceproperties.php 0000664 0000766 0000024 00000000545 12273362323 027630 0 ustar addColumn(
'horde_activesync_device',
'device_properties',
'text');
}
public function down()
{
$this->removeColumn('horde_activesync_device', 'device_properties');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/11_horde_activesync_removepingstate.php 0000664 0000766 0000024 00000001053 12273362323 026654 0 ustar removeColumn('horde_activesync_device_users', 'device_ping');
$this->removeColumn('horde_activesync_device_users', 'device_folders');
}
public function down()
{
$this->addColumn(
'horde_activesync_device_users',
'device_ping',
'text');
$this->addColumn(
'horde_activesync_device_users',
'device_folders',
'text');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/12_horde_activesync_longtextcachefield.php 0000664 0000766 0000024 00000000611 12273362323 027274 0 ustar changeColumn(
'horde_activesync_cache',
'cache_data',
'mediumtext');
}
public function down()
{
$this->changeColumn(
'horde_activesync_cache',
'cache_data',
'text');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/13_horde_activesync_booleanfields.php 0000664 0000766 0000024 00000001640 12273362323 026252 0 ustar changeColumn(
'horde_activesync_mailmap',
'sync_deleted',
'boolean'
);
$this->changeColumn(
'horde_activesync_mailmap',
'sync_flagged',
'boolean'
);
$this->changeColumn(
'horde_activesync_mailmap',
'sync_read',
'boolean'
);
}
public function down()
{
$this->changeColumn(
'horde_activesync_mailmap',
'sync_deleted',
'integer'
);
$this->changeColumn(
'horde_activesync_mailmap',
'sync_flagged',
'integer'
);
$this->changeColumn(
'horde_activesync_mailmap',
'sync_read',
'integer'
);
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/14_horde_activesync_binarystatefield.php 0000664 0000766 0000024 00000000607 12273362323 027000 0 ustar changeColumn(
'horde_activesync_state',
'sync_data',
'binary');
}
public function down()
{
$this->changeColumn(
'horde_activesync_state',
'sync_data',
'mediumtext');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/15_horde_activesync_integerimapuidfield.php 0000664 0000766 0000024 00000001000 12273362323 027446 0 ustar changeColumn(
'horde_activesync_mailmap',
'message_uid',
'integer',
array('null' => false, 'default' => 0));
}
public function down()
{
$this->changeColumn(
'horde_activesync_mailmap',
'message_uid',
'string',
array('limit' => 255, 'null' => false)
);
}
}Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/16_horde_activesync_fix_blob_length.php 0000664 0000766 0000024 00000000350 12273362323 026571 0 ustar changeColumn('horde_activesync_state', 'sync_data', 'binary');
}
public function down()
{
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/17_horde_activesync_clearallstate.php 0000664 0000766 0000024 00000001334 12273362323 026270 0 ustar delete('DELETE FROM horde_activesync_state');
$this->delete('DELETE FROM horde_activesync_map');
$this->delete('DELETE FROM horde_activesync_mailmap');
$this->delete('DELETE FROM horde_activesync_cache');
}
public function down()
{
$this->delete('DELETE FROM horde_activesync_state');
$this->delete('DELETE FROM horde_activesync_map');
$this->delete('DELETE FROM horde_activesync_mailmap');
$this->delete('DELETE FROM horde_activesync_cache');
}
} Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/18_horde_activesync_addmapdeleteflag.php 0000664 0000766 0000024 00000000525 12273362323 026715 0 ustar addColumn(
'horde_activesync_map',
'sync_deleted',
'boolean');
}
public function down()
{
$this->removeColumn('horde_activesync_map', 'sync_deleted');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/19_horde_activesync_addtimestamp.php 0000664 0000766 0000024 00000000724 12273362323 026130 0 ustar renameColumn('horde_activesync_state', 'sync_time', 'sync_mod');
$this->addColumn('horde_activesync_state', 'sync_timestamp', 'integer');
}
public function down()
{
$this->removeColumn('horde_activesync_state', 'sync_timestamp');
$this->renameColumn('horde_activesync_state', 'sync_mod', 'sync_time');
}
}
Horde_ActiveSync-2.12.3/migration/Horde/ActiveSync/20_horde_activesync_removesynccounters.php 0000664 0000766 0000024 00000001435 12273362323 027421 0 ustar announce('Removing SyncKeyCounter data from cache.', 'cli.message');
$sql = 'SELECT * FROM horde_activesync_cache;';
$rows = $this->_connection->selectAll($sql);
$insert_sql = 'UPDATE horde_activesync_cache SET cache_data = ? WHERE cache_devid = ? AND cache_user = ?';
foreach ($rows as $row) {
$data = unserialize($row['cache_data']);
unset($data['synckeycounter']);
$row['cache_data'] = serialize($data);
$this->_connection->update($insert_sql, array($row['cache_data'], $row['cache_devid'], $row['cache_user']));
}
}
public function down()
{
// noop
}
}
Horde_ActiveSync-2.12.3/test/Horde/ActiveSync/fixtures/appointment.wbxml 0000664 0000766 0000024 00000000570 12273362323 023270 0 ustar ] ELAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAIAAAAAAAAAxP///w== g20111201T200000Z R20111201T210000Z fEvent Title WPhiladelphia, PA M2 e1 Q20111201T200000Z X0 KEvent Description L0 Horde_ActiveSync-2.12.3/test/Horde/ActiveSync/fixtures/default_policies.wbxml 0000664 0000766 0000024 00000000036 12273362323 024242 0 ustar MN0 P0 S1 W5000000 Horde_ActiveSync-2.12.3/test/Horde/ActiveSync/fixtures/default_policies.xml 0000664 0000766 0000024 00000000201 12273362323 023703 0 ustar