/usr/share/z-push/lib/syncobjects/syncmail.php is in z-push-common 2.3.8-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | <?php
/***********************************************
* File : syncmail.php
* Project : Z-Push
* Descr : WBXML mail entities that can be parsed
* directly (as a stream) from WBXML.
* It is automatically decoded
* according to $mapping,
* and the Sync WBXML mappings.
*
* Created : 05.09.2011
*
* Copyright 2007 - 2016 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
class SyncMail extends SyncObject {
public $to;
public $cc;
public $from;
public $subject;
public $threadtopic;
public $datereceived;
public $displayto;
public $importance;
public $read;
public $attachments;
public $mimetruncated;
public $mimedata;
public $mimesize;
public $bodytruncated;
public $bodysize;
public $body;
public $messageclass;
public $meetingrequest;
public $reply_to;
// AS 2.5 prop
public $internetcpid;
// AS 12.0 props
public $asbody;
public $asattachments;
public $flag;
public $contentclass;
public $nativebodytype;
// AS 14.0 props
public $umcallerid;
public $umusernotes;
public $conversationid;
public $conversationindex;
public $lastverbexecuted; //possible values unknown, reply to sender, reply to all, forward
public $lastverbexectime;
public $receivedasbcc;
public $sender;
public $categories;
function __construct() {
$mapping = array (
SYNC_POOMMAIL_TO => array ( self::STREAMER_VAR => "to",
self::STREAMER_TYPE => self::STREAMER_TYPE_COMMA_SEPARATED,
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_LENGTHMAX => 32768,
self::STREAMER_CHECK_EMAIL => "" )),
SYNC_POOMMAIL_CC => array ( self::STREAMER_VAR => "cc",
self::STREAMER_TYPE => self::STREAMER_TYPE_COMMA_SEPARATED,
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_LENGTHMAX => 32768,
self::STREAMER_CHECK_EMAIL => "" )),
SYNC_POOMMAIL_FROM => array ( self::STREAMER_VAR => "from",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_LENGTHMAX => 32768,
self::STREAMER_CHECK_EMAIL => "" ),
self::STREAMER_RONOTIFY => true),
SYNC_POOMMAIL_SUBJECT => array ( self::STREAMER_VAR => "subject",
self::STREAMER_RONOTIFY => true),
SYNC_POOMMAIL_THREADTOPIC => array ( self::STREAMER_VAR => "threadtopic",
self::STREAMER_RONOTIFY => true),
SYNC_POOMMAIL_DATERECEIVED => array ( self::STREAMER_VAR => "datereceived",
self::STREAMER_TYPE => self::STREAMER_TYPE_DATE_DASHES,
self::STREAMER_RONOTIFY => true),
SYNC_POOMMAIL_DISPLAYTO => array ( self::STREAMER_VAR => "displayto"),
// Importance values
// 0 = Low
// 1 = Normal
// 2 = High
// even the default value 1 is optional, the native android client 2.2 interprets a non-existing value as 0 (low)
SYNC_POOMMAIL_IMPORTANCE => array ( self::STREAMER_VAR => "importance",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_REQUIRED => self::STREAMER_CHECK_SETONE,
self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2) )),
SYNC_POOMMAIL_READ => array ( self::STREAMER_VAR => "read",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(0,1) ),
self::STREAMER_RONOTIFY => true,
self::STREAMER_VALUEMAP => array( 0 => "No",
1 => "Yes")),
SYNC_POOMMAIL_ATTACHMENTS => array ( self::STREAMER_VAR => "attachments",
self::STREAMER_TYPE => "SyncAttachment",
self::STREAMER_ARRAY => SYNC_POOMMAIL_ATTACHMENT),
SYNC_POOMMAIL_MIMETRUNCATED => array ( self::STREAMER_VAR => "mimetruncated",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ZEROORONE => self::STREAMER_CHECK_SETZERO)),
SYNC_POOMMAIL_MIMEDATA => array ( self::STREAMER_VAR => "mimedata",
self::STREAMER_TYPE => self::STREAMER_TYPE_STREAM_ASPLAIN),
SYNC_POOMMAIL_MIMESIZE => array ( self::STREAMER_VAR => "mimesize",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => -1)),
SYNC_POOMMAIL_BODYTRUNCATED => array ( self::STREAMER_VAR => "bodytruncated",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ZEROORONE => self::STREAMER_CHECK_SETZERO)),
SYNC_POOMMAIL_BODYSIZE => array ( self::STREAMER_VAR => "bodysize",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_CMPHIGHER => -1)),
SYNC_POOMMAIL_BODY => array ( self::STREAMER_VAR => "body"),
SYNC_POOMMAIL_MESSAGECLASS => array ( self::STREAMER_VAR => "messageclass"),
SYNC_POOMMAIL_MEETINGREQUEST => array ( self::STREAMER_VAR => "meetingrequest",
self::STREAMER_TYPE => "SyncMeetingRequest"),
SYNC_POOMMAIL_REPLY_TO => array ( self::STREAMER_VAR => "reply_to",
self::STREAMER_TYPE => self::STREAMER_TYPE_SEMICOLON_SEPARATED,
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_EMAIL => "" )),
);
if (Request::GetProtocolVersion() >= 2.5) {
$mapping[SYNC_POOMMAIL_INTERNETCPID] = array ( self::STREAMER_VAR => "internetcpid");
}
if (Request::GetProtocolVersion() >= 12.0) {
$mapping[SYNC_AIRSYNCBASE_BODY] = array ( self::STREAMER_VAR => "asbody",
self::STREAMER_TYPE => "SyncBaseBody");
$mapping[SYNC_AIRSYNCBASE_ATTACHMENTS] = array ( self::STREAMER_VAR => "asattachments",
self::STREAMER_TYPE => "SyncBaseAttachment",
self::STREAMER_ARRAY => SYNC_AIRSYNCBASE_ATTACHMENT);
$mapping[SYNC_POOMMAIL_CONTENTCLASS] = array ( self::STREAMER_VAR => "contentclass",
self::STREAMER_CHECKS => array( self::STREAMER_CHECK_ONEVALUEOF => array(DEFAULT_EMAIL_CONTENTCLASS, DEFAULT_CALENDAR_CONTENTCLASS) ));
$mapping[SYNC_POOMMAIL_FLAG] = array ( self::STREAMER_VAR => "flag",
self::STREAMER_TYPE => "SyncMailFlags",
self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY,
self::STREAMER_RONOTIFY => true);
$mapping[SYNC_AIRSYNCBASE_NATIVEBODYTYPE] = array ( self::STREAMER_VAR => "nativebodytype");
//unset these properties because airsyncbase body and attachments will be used instead
unset($mapping[SYNC_POOMMAIL_BODY], $mapping[SYNC_POOMMAIL_BODYTRUNCATED], $mapping[SYNC_POOMMAIL_ATTACHMENTS]);
}
if (Request::GetProtocolVersion() >= 14.0) {
$mapping[SYNC_POOMMAIL2_UMCALLERID] = array ( self::STREAMER_VAR => "umcallerid");
$mapping[SYNC_POOMMAIL2_UMUSERNOTES] = array ( self::STREAMER_VAR => "umusernotes");
$mapping[SYNC_POOMMAIL2_CONVERSATIONID] = array ( self::STREAMER_VAR => "conversationid");
$mapping[SYNC_POOMMAIL2_CONVERSATIONINDEX] = array ( self::STREAMER_VAR => "conversationindex");
$mapping[SYNC_POOMMAIL2_LASTVERBEXECUTED] = array ( self::STREAMER_VAR => "lastverbexecuted");
$mapping[SYNC_POOMMAIL2_LASTVERBEXECUTIONTIME] = array ( self::STREAMER_VAR => "lastverbexectime",
self::STREAMER_TYPE => self::STREAMER_TYPE_DATE_DASHES);
$mapping[SYNC_POOMMAIL2_RECEIVEDASBCC] = array ( self::STREAMER_VAR => "receivedasbcc");
$mapping[SYNC_POOMMAIL2_SENDER] = array ( self::STREAMER_VAR => "sender");
$mapping[SYNC_POOMMAIL_CATEGORIES] = array ( self::STREAMER_VAR => "categories",
self::STREAMER_ARRAY => SYNC_POOMMAIL_CATEGORY,
self::STREAMER_RONOTIFY => true);
//TODO bodypart, accountid, rightsmanagementlicense
}
parent::__construct($mapping);
}
}
|