1 | <?php |
---|
2 | /*********************************************** |
---|
3 | * File : mapimapping.php |
---|
4 | * Project : Z-Push |
---|
5 | * Descr : |
---|
6 | * |
---|
7 | * Created : 29.04.2011 |
---|
8 | * |
---|
9 | * Copyright 2007 - 2012 Zarafa Deutschland GmbH |
---|
10 | * |
---|
11 | * This program is free software: you can redistribute it and/or modify |
---|
12 | * it under the terms of the GNU Affero General Public License, version 3, |
---|
13 | * as published by the Free Software Foundation with the following additional |
---|
14 | * term according to sec. 7: |
---|
15 | * |
---|
16 | * According to sec. 7 of the GNU Affero General Public License, version 3, |
---|
17 | * the terms of the AGPL are supplemented with the following terms: |
---|
18 | * |
---|
19 | * "Zarafa" is a registered trademark of Zarafa B.V. |
---|
20 | * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH |
---|
21 | * The licensing of the Program under the AGPL does not imply a trademark license. |
---|
22 | * Therefore any rights, title and interest in our trademarks remain entirely with us. |
---|
23 | * |
---|
24 | * However, if you propagate an unmodified version of the Program you are |
---|
25 | * allowed to use the term "Z-Push" to indicate that you distribute the Program. |
---|
26 | * Furthermore you may use our trademarks where it is necessary to indicate |
---|
27 | * the intended purpose of a product or service provided you use it in accordance |
---|
28 | * with honest practices in industrial or commercial matters. |
---|
29 | * If you want to propagate modified versions of the Program under the name "Z-Push", |
---|
30 | * you may only do so if you have a written permission by Zarafa Deutschland GmbH |
---|
31 | * (to acquire a permission please contact Zarafa at trademark@zarafa.com). |
---|
32 | * |
---|
33 | * This program is distributed in the hope that it will be useful, |
---|
34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
36 | * GNU Affero General Public License for more details. |
---|
37 | * |
---|
38 | * You should have received a copy of the GNU Affero General Public License |
---|
39 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
40 | * |
---|
41 | * Consult LICENSE file for details |
---|
42 | ************************************************/ |
---|
43 | /** |
---|
44 | * |
---|
45 | * MAPI to AS mapping class |
---|
46 | * |
---|
47 | * |
---|
48 | */ |
---|
49 | class MAPIMapping { |
---|
50 | /** |
---|
51 | * Returns the MAPI to AS mapping for contacts |
---|
52 | * |
---|
53 | * @return array |
---|
54 | */ |
---|
55 | public static function GetContactMapping() { |
---|
56 | return array ( |
---|
57 | "anniversary" => PR_WEDDING_ANNIVERSARY, |
---|
58 | "assistantname" => PR_ASSISTANT, |
---|
59 | "assistnamephonenumber" => PR_ASSISTANT_TELEPHONE_NUMBER, |
---|
60 | "birthday" => PR_BIRTHDAY, |
---|
61 | "body" => PR_BODY, |
---|
62 | "business2phonenumber" => PR_BUSINESS2_TELEPHONE_NUMBER, |
---|
63 | "businesscity" => "PT_STRING8:PSETID_Address:0x8046", |
---|
64 | "businesscountry" => "PT_STRING8:PSETID_Address:0x8049", |
---|
65 | "businesspostalcode" => "PT_STRING8:PSETID_Address:0x8048", |
---|
66 | "businessstate" => "PT_STRING8:PSETID_Address:0x8047", |
---|
67 | "businessstreet" => "PT_STRING8:PSETID_Address:0x8045", |
---|
68 | "businessfaxnumber" => PR_BUSINESS_FAX_NUMBER, |
---|
69 | "businessphonenumber" => PR_OFFICE_TELEPHONE_NUMBER, |
---|
70 | "carphonenumber" => PR_CAR_TELEPHONE_NUMBER, |
---|
71 | "categories" => "PT_MV_STRING8:PS_PUBLIC_STRINGS:Keywords", |
---|
72 | "children" => PR_CHILDRENS_NAMES, |
---|
73 | "companyname" => PR_COMPANY_NAME, |
---|
74 | "department" => PR_DEPARTMENT_NAME, |
---|
75 | "email1address" => "PT_STRING8:PSETID_Address:0x8083", |
---|
76 | "email2address" => "PT_STRING8:PSETID_Address:0x8093", |
---|
77 | "email3address" => "PT_STRING8:PSETID_Address:0x80A3", |
---|
78 | "fileas" => "PT_STRING8:PSETID_Address:0x8005", |
---|
79 | "firstname" => PR_GIVEN_NAME, |
---|
80 | "home2phonenumber" => PR_HOME2_TELEPHONE_NUMBER, |
---|
81 | "homecity" => PR_HOME_ADDRESS_CITY, |
---|
82 | "homecountry" => PR_HOME_ADDRESS_COUNTRY, |
---|
83 | "homepostalcode" => PR_HOME_ADDRESS_POSTAL_CODE, |
---|
84 | "homestate" => PR_HOME_ADDRESS_STATE_OR_PROVINCE, |
---|
85 | "homestreet" => PR_HOME_ADDRESS_STREET, |
---|
86 | "homefaxnumber" => PR_HOME_FAX_NUMBER, |
---|
87 | "homephonenumber" => PR_HOME_TELEPHONE_NUMBER, |
---|
88 | "jobtitle" => PR_TITLE, |
---|
89 | "lastname" => PR_SURNAME, |
---|
90 | "middlename" => PR_MIDDLE_NAME, |
---|
91 | "mobilephonenumber" => PR_CELLULAR_TELEPHONE_NUMBER, |
---|
92 | "officelocation" => PR_OFFICE_LOCATION, |
---|
93 | "othercity" => PR_OTHER_ADDRESS_CITY, |
---|
94 | "othercountry" => PR_OTHER_ADDRESS_COUNTRY, |
---|
95 | "otherpostalcode" => PR_OTHER_ADDRESS_POSTAL_CODE, |
---|
96 | "otherstate" => PR_OTHER_ADDRESS_STATE_OR_PROVINCE, |
---|
97 | "otherstreet" => PR_OTHER_ADDRESS_STREET, |
---|
98 | "pagernumber" => PR_PAGER_TELEPHONE_NUMBER, |
---|
99 | "radiophonenumber" => PR_RADIO_TELEPHONE_NUMBER, |
---|
100 | "spouse" => PR_SPOUSE_NAME, |
---|
101 | "suffix" => PR_GENERATION, |
---|
102 | "title" => PR_DISPLAY_NAME_PREFIX, |
---|
103 | "webpage" => "PT_STRING8:PSETID_Address:0x802b", |
---|
104 | "yomicompanyname" => "PT_STRING8:PSETID_Address:0x802e", |
---|
105 | "yomifirstname" => "PT_STRING8:PSETID_Address:0x802c", |
---|
106 | "yomilastname" => "PT_STRING8:PSETID_Address:0x802d", |
---|
107 | "rtf" => PR_RTF_COMPRESSED, |
---|
108 | // picture |
---|
109 | "customerid" => PR_CUSTOMER_ID, |
---|
110 | "governmentid" => PR_GOVERNMENT_ID_NUMBER, |
---|
111 | "imaddress" => "PT_STRING8:PSETID_Address:0x8062", |
---|
112 | "imaddress2" => "PT_STRING8:PSETID_AirSync:IMAddress2", |
---|
113 | "imaddress3" => "PT_STRING8:PSETID_AirSync:IMAddress3", |
---|
114 | "managername" => PR_MANAGER_NAME, |
---|
115 | "companymainphone" => PR_COMPANY_MAIN_PHONE_NUMBER, |
---|
116 | "accountname" => PR_ACCOUNT, |
---|
117 | "nickname" => PR_NICKNAME, |
---|
118 | // mms |
---|
119 | ); |
---|
120 | } |
---|
121 | |
---|
122 | |
---|
123 | /** |
---|
124 | * |
---|
125 | * Returns contact specific MAPI properties |
---|
126 | * |
---|
127 | * @access public |
---|
128 | * |
---|
129 | * @return array |
---|
130 | */ |
---|
131 | public static function GetContactProperties() { |
---|
132 | return array ( |
---|
133 | "haspic" => "PT_BOOLEAN:PSETID_Address:0x8015", |
---|
134 | "emailaddress1" => "PT_STRING8:PSETID_Address:0x8083", |
---|
135 | "emailaddressdname1" => "PT_STRING8:PSETID_Address:0x8080", |
---|
136 | "emailaddressdemail1" => "PT_STRING8:PSETID_Address:0x8084", |
---|
137 | "emailaddresstype1" => "PT_STRING8:PSETID_Address:0x8082", |
---|
138 | "emailaddressentryid1" => "PT_BINARY:PSETID_Address:0x8085", |
---|
139 | "emailaddress2" => "PT_STRING8:PSETID_Address:0x8093", |
---|
140 | "emailaddressdname2" => "PT_STRING8:PSETID_Address:0x8090", |
---|
141 | "emailaddressdemail2" => "PT_STRING8:PSETID_Address:0x8094", |
---|
142 | "emailaddresstype2" => "PT_STRING8:PSETID_Address:0x8092", |
---|
143 | "emailaddressentryid2" => "PT_BINARY:PSETID_Address:0x8095", |
---|
144 | "emailaddress3" => "PT_STRING8:PSETID_Address:0x80a3", |
---|
145 | "emailaddressdname3" => "PT_STRING8:PSETID_Address:0x80a0", |
---|
146 | "emailaddressdemail3" => "PT_STRING8:PSETID_Address:0x80a4", |
---|
147 | "emailaddresstype3" => "PT_STRING8:PSETID_Address:0x80a2", |
---|
148 | "emailaddressentryid3" => "PT_BINARY:PSETID_Address:0x80a5", |
---|
149 | "addressbookmv" => "PT_MV_LONG:PSETID_Address:0x8028", |
---|
150 | "addressbooklong" => "PT_LONG:PSETID_Address:0x8029", |
---|
151 | "displayname" => PR_DISPLAY_NAME, |
---|
152 | "subject" => PR_SUBJECT, |
---|
153 | "country" => PR_COUNTRY, |
---|
154 | "city" => PR_LOCALITY, |
---|
155 | "postaladdress" => PR_POSTAL_ADDRESS, |
---|
156 | "postalcode" => PR_POSTAL_CODE, |
---|
157 | "state" => PR_STATE_OR_PROVINCE, |
---|
158 | "street" => PR_STREET_ADDRESS, |
---|
159 | "homeaddress" => "PT_STRING8:PSETID_Address:0x801a", |
---|
160 | "businessaddress" => "PT_STRING8:PSETID_Address:0x801b", |
---|
161 | "otheraddress" => "PT_STRING8:PSETID_Address:0x801c", |
---|
162 | "mailingaddress" => "PT_LONG:PSETID_Address:0x8022", |
---|
163 | ); |
---|
164 | } |
---|
165 | |
---|
166 | |
---|
167 | /** |
---|
168 | * Returns the MAPI to AS mapping for emails |
---|
169 | * |
---|
170 | * @return array |
---|
171 | */ |
---|
172 | public static function GetEmailMapping() { |
---|
173 | return array ( |
---|
174 | // from |
---|
175 | "datereceived" => PR_MESSAGE_DELIVERY_TIME, |
---|
176 | "displayname" => PR_SUBJECT, |
---|
177 | "displayto" => PR_DISPLAY_TO, |
---|
178 | "importance" => PR_IMPORTANCE, |
---|
179 | "messageclass" => PR_MESSAGE_CLASS, |
---|
180 | "subject" => PR_SUBJECT, |
---|
181 | "read" => PR_MESSAGE_FLAGS, |
---|
182 | // "to" // need to be generated with SMTP addresses |
---|
183 | // "cc" |
---|
184 | // "threadtopic" => PR_CONVERSATION_TOPIC, |
---|
185 | "internetcpid" => PR_INTERNET_CPID, |
---|
186 | "nativebodytype" => PR_NATIVE_BODY_INFO, |
---|
187 | ); |
---|
188 | } |
---|
189 | |
---|
190 | |
---|
191 | /** |
---|
192 | * |
---|
193 | * Returns email specific MAPI properties |
---|
194 | * |
---|
195 | * @access public |
---|
196 | * |
---|
197 | * @return array |
---|
198 | */ |
---|
199 | public static function GetEmailProperties() { |
---|
200 | return array ( |
---|
201 | // Override 'From' to show "Full Name <user@domain.com>" |
---|
202 | "representingname" => PR_SENT_REPRESENTING_NAME, |
---|
203 | "representingentryid" => PR_SENT_REPRESENTING_ENTRYID, |
---|
204 | "sourcekey" => PR_SOURCE_KEY, |
---|
205 | "entryid" => PR_ENTRYID, |
---|
206 | "body" => PR_BODY, |
---|
207 | "rtfcompressed" => PR_RTF_COMPRESSED, |
---|
208 | "html" => PR_HTML, |
---|
209 | "rtfinsync" => PR_RTF_IN_SYNC, |
---|
210 | "processed" => PR_PROCESSED, |
---|
211 | ); |
---|
212 | } |
---|
213 | |
---|
214 | |
---|
215 | /** |
---|
216 | * Returns the MAPI to AS mapping for meeting requests |
---|
217 | * |
---|
218 | * @return array |
---|
219 | */ |
---|
220 | public static function GetMeetingRequestMapping() { |
---|
221 | return array ( |
---|
222 | "responserequested" => PR_RESPONSE_REQUESTED, |
---|
223 | // timezone |
---|
224 | "alldayevent" => "PT_BOOLEAN:PSETID_Appointment:0x8215", |
---|
225 | "busystatus" => "PT_LONG:PSETID_Appointment:0x8205", |
---|
226 | "rtf" => PR_RTF_COMPRESSED, |
---|
227 | "dtstamp" => PR_LAST_MODIFICATION_TIME, |
---|
228 | "endtime" => "PT_SYSTIME:PSETID_Appointment:0x820e", |
---|
229 | "location" => "PT_STRING8:PSETID_Appointment:0x8208", |
---|
230 | // recurrences |
---|
231 | "reminder" => "PT_LONG:PSETID_Common:0x8501", |
---|
232 | "starttime" => "PT_SYSTIME:PSETID_Appointment:0x820d", |
---|
233 | "sensitivity" => PR_SENSITIVITY, |
---|
234 | ); |
---|
235 | } |
---|
236 | |
---|
237 | |
---|
238 | public static function GetMeetingRequestProperties() { |
---|
239 | return array ( |
---|
240 | "goidtag" => "PT_BINARY:PSETID_Meeting:0x3", |
---|
241 | "timezonetag" => "PT_BINARY:PSETID_Appointment:0x8233", |
---|
242 | "recReplTime" => "PT_SYSTIME:PSETID_Appointment:0x8228", |
---|
243 | "isrecurringtag" => "PT_BOOLEAN:PSETID_Appointment:0x8223", |
---|
244 | "recurringstate" => "PT_BINARY:PSETID_Appointment:0x8216", |
---|
245 | "appSeqNr" => "PT_LONG:PSETID_Appointment:0x8201", |
---|
246 | "lidIsException" => "PT_BOOLEAN:PSETID_Appointment:0xA", |
---|
247 | "recurStartTime" => "PT_LONG:PSETID_Meeting:0xE", |
---|
248 | "reminderset" => "PT_BOOLEAN:PSETID_Common:0x8503", |
---|
249 | "remindertime" => "PT_LONG:PSETID_Common:0x8501", |
---|
250 | "recurrenceend" => "PT_SYSTIME:PSETID_Appointment:0x8236", |
---|
251 | ); |
---|
252 | } |
---|
253 | |
---|
254 | |
---|
255 | public static function GetTnefAndIcalProperties() { |
---|
256 | return array( |
---|
257 | "starttime" => "PT_SYSTIME:PSETID_Appointment:0x820d", |
---|
258 | "endtime" => "PT_SYSTIME:PSETID_Appointment:0x820e", |
---|
259 | "commonstart" => "PT_SYSTIME:PSETID_Common:0x8516", |
---|
260 | "commonend" => "PT_SYSTIME:PSETID_Common:0x8517", |
---|
261 | "clipstart" => "PT_SYSTIME:PSETID_Appointment:0x8235", //ical only |
---|
262 | "recurrenceend" => "PT_SYSTIME:PSETID_Appointment:0x8236", //ical only |
---|
263 | "isrecurringtag" => "PT_BOOLEAN:PSETID_Appointment:0x8223", |
---|
264 | "goidtag" => "PT_BINARY:PSETID_Meeting:0x3", |
---|
265 | "goid2tag" => "PT_BINARY:PSETID_Meeting:0x23", |
---|
266 | "usetnef" => "PT_LONG:PSETID_Meeting:0x8582", |
---|
267 | "tneflocation" => "PT_STRING8:PSETID_Meeting:0x2", //ical only |
---|
268 | "location" => "PT_STRING8:PSETID_Appointment:0x8208", |
---|
269 | "tnefrecurr" => "PT_BOOLEAN:PSETID_Meeting:0x5", |
---|
270 | "sideeffects" => "PT_LONG:PSETID_Common:0x8510", |
---|
271 | "type" => "PT_STRING8:PSETID_Meeting:0x24", |
---|
272 | "busystatus" => "PT_LONG:PSETID_Appointment:0x8205", |
---|
273 | "meetingstatus" => "PT_LONG:PSETID_Appointment:0x8217", |
---|
274 | "responsestatus" => "PT_LONG:PSETID_Meeting:0x8218", |
---|
275 | //the properties below are currently not used |
---|
276 | "dayinterval" => "PT_I2:PSETID_Meeting:0x11", |
---|
277 | "weekinterval" => "PT_I2:PSETID_Meeting:0x12", |
---|
278 | "monthinterval" => "PT_I2:PSETID_Meeting:0x13", |
---|
279 | "yearinterval" => "PT_I2:PSETID_Meeting:0x14", |
---|
280 | ); |
---|
281 | } |
---|
282 | |
---|
283 | |
---|
284 | /** |
---|
285 | * Returns the MAPI to AS mapping for appointments |
---|
286 | * |
---|
287 | * @return array |
---|
288 | */ |
---|
289 | public static function GetAppointmentMapping() { |
---|
290 | return array ( |
---|
291 | "alldayevent" => "PT_BOOLEAN:PSETID_Appointment:0x8215", |
---|
292 | "body" => PR_BODY, |
---|
293 | "busystatus" => "PT_LONG:PSETID_Appointment:0x8205", |
---|
294 | "categories" => "PT_MV_STRING8:PS_PUBLIC_STRINGS:Keywords", |
---|
295 | "rtf" => PR_RTF_COMPRESSED, |
---|
296 | "dtstamp" => PR_LAST_MODIFICATION_TIME, |
---|
297 | "endtime" => "PT_SYSTIME:PSETID_Appointment:0x820e", |
---|
298 | "location" => "PT_STRING8:PSETID_Appointment:0x8208", |
---|
299 | "meetingstatus" => "PT_LONG:PSETID_Appointment:0x8217", |
---|
300 | "sensitivity" => PR_SENSITIVITY, |
---|
301 | "subject" => PR_SUBJECT, |
---|
302 | "starttime" => "PT_SYSTIME:PSETID_Appointment:0x820d", |
---|
303 | "uid" => "PT_BINARY:PSETID_Meeting:0x3", |
---|
304 | "nativebodytype" => PR_NATIVE_BODY_INFO, |
---|
305 | ); |
---|
306 | } |
---|
307 | |
---|
308 | |
---|
309 | /** |
---|
310 | * |
---|
311 | * Returns appointment specific MAPI properties |
---|
312 | * |
---|
313 | * @access public |
---|
314 | * |
---|
315 | * @return array |
---|
316 | */ |
---|
317 | public static function GetAppointmentProperties() { |
---|
318 | return array( |
---|
319 | "sourcekey" => PR_SOURCE_KEY, |
---|
320 | "representingentryid" => PR_SENT_REPRESENTING_ENTRYID, |
---|
321 | "representingname" => PR_SENT_REPRESENTING_NAME, |
---|
322 | "sentrepresentingemail" => PR_SENT_REPRESENTING_EMAIL_ADDRESS, |
---|
323 | "sentrepresentingaddt" => PR_SENT_REPRESENTING_ADDRTYPE, |
---|
324 | "sentrepresentinsrchk" => PR_SENT_REPRESENTING_SEARCH_KEY, |
---|
325 | "reminderset" => "PT_BOOLEAN:PSETID_Common:0x8503", |
---|
326 | "remindertime" => "PT_LONG:PSETID_Common:0x8501", |
---|
327 | "meetingstatus" => "PT_LONG:PSETID_Appointment:0x8217", |
---|
328 | "isrecurring" => "PT_BOOLEAN:PSETID_Appointment:0x8223", |
---|
329 | "recurringstate" => "PT_BINARY:PSETID_Appointment:0x8216", |
---|
330 | "timezonetag" => "PT_BINARY:PSETID_Appointment:0x8233", |
---|
331 | "recurrenceend" => "PT_SYSTIME:PSETID_Appointment:0x8236", |
---|
332 | "responsestatus" => "PT_LONG:PSETID_Appointment:0x8218", |
---|
333 | "commonstart" => "PT_SYSTIME:PSETID_Common:0x8516", |
---|
334 | "commonend" => "PT_SYSTIME:PSETID_Common:0x8517", |
---|
335 | "reminderstart" => "PT_SYSTIME:PSETID_Common:0x8502", |
---|
336 | "duration" => "PT_LONG:PSETID_Appointment:0x8213", |
---|
337 | "private" => "PT_BOOLEAN:PSETID_Common:0x8506", |
---|
338 | "uid" => "PT_BINARY:PSETID_Meeting:0x23", |
---|
339 | "sideeffects" => "PT_LONG:PSETID_Common:0x8510", |
---|
340 | "flagdueby" => "PT_SYSTIME:PSETID_Common:0x8560", |
---|
341 | "icon" => PR_ICON_INDEX, |
---|
342 | "mrwassent" => "PT_BOOLEAN:PSETID_Appointment:0x8229", |
---|
343 | "endtime" => "PT_SYSTIME:PSETID_Appointment:0x820e",//this is here for calendar restriction, tnef and ical |
---|
344 | "starttime" => "PT_SYSTIME:PSETID_Appointment:0x820d",//this is here for calendar restriction, tnef and ical |
---|
345 | "clipstart" => "PT_SYSTIME:PSETID_Appointment:0x8235", //ical only |
---|
346 | "recurrencetype" => "PT_LONG:PSETID_Appointment:0x8231", |
---|
347 | "body" => PR_BODY, |
---|
348 | "rtfcompressed" => PR_RTF_COMPRESSED, |
---|
349 | "html" => PR_HTML, |
---|
350 | "rtfinsync" => PR_RTF_IN_SYNC, |
---|
351 | ); |
---|
352 | } |
---|
353 | |
---|
354 | |
---|
355 | /** |
---|
356 | * Returns the MAPI to AS mapping for tasks |
---|
357 | * |
---|
358 | * @return array |
---|
359 | */ |
---|
360 | public static function GetTaskMapping() { |
---|
361 | return array ( |
---|
362 | "body" => PR_BODY, |
---|
363 | "categories" => "PT_MV_STRING8:PS_PUBLIC_STRINGS:Keywords", |
---|
364 | "complete" => "PT_BOOLEAN:PSETID_Task:0x811C", |
---|
365 | "datecompleted" => "PT_SYSTIME:PSETID_Task:0x810F", |
---|
366 | "duedate" => "PT_SYSTIME:PSETID_Task:0x8105", |
---|
367 | "utcduedate" => "PT_SYSTIME:PSETID_Common:0x8517", |
---|
368 | "utcstartdate" => "PT_SYSTIME:PSETID_Common:0x8516", |
---|
369 | "importance" => PR_IMPORTANCE, |
---|
370 | // recurrence |
---|
371 | // regenerate |
---|
372 | // deadoccur |
---|
373 | "reminderset" => "PT_BOOLEAN:PSETID_Common:0x8503", |
---|
374 | "remindertime" => "PT_SYSTIME:PSETID_Common:0x8502", |
---|
375 | "sensitivity" => PR_SENSITIVITY, |
---|
376 | "startdate" => "PT_SYSTIME:PSETID_Task:0x8104", |
---|
377 | "subject" => PR_SUBJECT, |
---|
378 | "rtf" => PR_RTF_COMPRESSED, |
---|
379 | ); |
---|
380 | } |
---|
381 | |
---|
382 | |
---|
383 | /** |
---|
384 | * Returns task specific MAPI properties |
---|
385 | * |
---|
386 | * @access public |
---|
387 | * |
---|
388 | * @return array |
---|
389 | */ |
---|
390 | public static function GetTaskProperties() { |
---|
391 | return array ( |
---|
392 | "isrecurringtag" => "PT_BOOLEAN:PSETID_Task:0x8126", |
---|
393 | "recurringstate" => "PT_BINARY:PSETID_Task:0x8116", |
---|
394 | "deadoccur" => "PT_BOOLEAN:PSETID_Task:0x8109", |
---|
395 | "completion" => "PT_DOUBLE:PSETID_Task:0x8102", |
---|
396 | "status" => "PT_LONG:PSETID_Task:0x8101", |
---|
397 | "icon" => PR_ICON_INDEX, |
---|
398 | ); |
---|
399 | } |
---|
400 | |
---|
401 | |
---|
402 | /** |
---|
403 | * Returns the MAPI to AS mapping for email todo flags |
---|
404 | * |
---|
405 | * @return array |
---|
406 | */ |
---|
407 | public static function GetMailFlagsMapping() { |
---|
408 | return array ( |
---|
409 | "flagstatus" => PR_FLAG_STATUS, |
---|
410 | "flagtype" => "PT_STRING8:PSETID_Common:0x8530", |
---|
411 | "datecompleted" => "PT_SYSTIME:PSETID_Common:0x810F", |
---|
412 | "completetime" => PR_FLAG_COMPLETE_TIME, |
---|
413 | "startdate" => "PT_SYSTIME:PSETID_Task:0x8104", |
---|
414 | "duedate" => "PT_SYSTIME:PSETID_Task:0x8105", |
---|
415 | "utcstartdate" => "PT_SYSTIME:PSETID_Common:0x8516", |
---|
416 | "utcduedate" => "PT_SYSTIME:PSETID_Common:0x8517", |
---|
417 | "reminderset" => "PT_BOOLEAN:PSETID_Common:0x8503", |
---|
418 | "remindertime" => "PT_SYSTIME:PSETID_Common:0x8502", |
---|
419 | "ordinaldate" => "PT_SYSTIME:PSETID_Common:0x85A0", |
---|
420 | "subordinaldate" => "PT_STRING8:PSETID_Common:0x85A1", |
---|
421 | |
---|
422 | ); |
---|
423 | } |
---|
424 | |
---|
425 | |
---|
426 | /** |
---|
427 | * Returns email todo flags' specific MAPI properties |
---|
428 | * |
---|
429 | * @access public |
---|
430 | * |
---|
431 | * @return array |
---|
432 | */ |
---|
433 | public static function GetMailFlagsProperties() { |
---|
434 | return array( |
---|
435 | "todoitemsflags" => PR_TODO_ITEM_FLAGS, |
---|
436 | "todotitle" => "PT_STRING8:PSETID_Common:0x85A4", |
---|
437 | "flagicon" => PR_FLAG_ICON, |
---|
438 | "replyrequested" => PR_REPLY_REQUESTED, |
---|
439 | "responserequested" => PR_RESPONSE_REQUESTED, |
---|
440 | "status" => "PT_LONG:PSETID_Task:0x8101", |
---|
441 | "completion" => "PT_DOUBLE:PSETID_Task:0x8102", |
---|
442 | "complete" => "PT_BOOLEAN:PSETID_Task:0x811C", |
---|
443 | ); |
---|
444 | } |
---|
445 | |
---|
446 | |
---|
447 | /** |
---|
448 | * Returns the MAPI to AS mapping for notes |
---|
449 | * |
---|
450 | * @access public |
---|
451 | * |
---|
452 | * @return array |
---|
453 | */ |
---|
454 | public static function GetNoteMapping() { |
---|
455 | return array( |
---|
456 | "categories" => "PT_MV_STRING8:PS_PUBLIC_STRINGS:Keywords", |
---|
457 | "lastmodificationtime" => PR_LAST_MODIFICATION_TIME, |
---|
458 | "messageclass" => PR_MESSAGE_CLASS, |
---|
459 | "subject" => PR_SUBJECT, |
---|
460 | ); |
---|
461 | } |
---|
462 | |
---|
463 | |
---|
464 | /** |
---|
465 | * Returns note specific MAPI properties |
---|
466 | * |
---|
467 | * @access public |
---|
468 | * |
---|
469 | * @return array |
---|
470 | */ |
---|
471 | public static function GetNoteProperties() { |
---|
472 | return array( |
---|
473 | "body" => PR_BODY, |
---|
474 | "messageclass" => PR_MESSAGE_CLASS, |
---|
475 | ); |
---|
476 | } |
---|
477 | |
---|
478 | |
---|
479 | /** |
---|
480 | * Returns properties for sending an email |
---|
481 | * |
---|
482 | * @access public |
---|
483 | * |
---|
484 | * @return array |
---|
485 | */ |
---|
486 | public static function GetSendMailProperties() { |
---|
487 | return array( |
---|
488 | "outboxentryid" => PR_IPM_OUTBOX_ENTRYID, |
---|
489 | "ipmsentmailentryid" => PR_IPM_SENTMAIL_ENTRYID, |
---|
490 | "sentmailentryid" => PR_SENTMAIL_ENTRYID, |
---|
491 | "subject" => PR_SUBJECT, |
---|
492 | "messageclass" => PR_MESSAGE_CLASS, |
---|
493 | "deliverytime" => PR_MESSAGE_DELIVERY_TIME, |
---|
494 | "importance" => PR_IMPORTANCE, |
---|
495 | "priority" => PR_PRIORITY, |
---|
496 | "addrtype" => PR_ADDRTYPE, |
---|
497 | "emailaddress" => PR_EMAIL_ADDRESS, |
---|
498 | "displayname" => PR_DISPLAY_NAME, |
---|
499 | "recipienttype" => PR_RECIPIENT_TYPE, |
---|
500 | "entryid" => PR_ENTRYID, |
---|
501 | "iconindex" => PR_ICON_INDEX, |
---|
502 | "body" => PR_BODY, |
---|
503 | "html" => PR_HTML, |
---|
504 | "sentrepresentingname" => PR_SENT_REPRESENTING_NAME, |
---|
505 | "sentrepresentingemail" => PR_SENT_REPRESENTING_EMAIL_ADDRESS, |
---|
506 | "representingentryid" => PR_SENT_REPRESENTING_ENTRYID, |
---|
507 | "sentrepresentingaddt" => PR_SENT_REPRESENTING_ADDRTYPE, |
---|
508 | "sentrepresentinsrchk" => PR_SENT_REPRESENTING_SEARCH_KEY, |
---|
509 | "displayto" => PR_DISPLAY_TO, |
---|
510 | "displaycc" => PR_DISPLAY_CC, |
---|
511 | "clientsubmittime" => PR_CLIENT_SUBMIT_TIME, |
---|
512 | "attachnum" => PR_ATTACH_NUM, |
---|
513 | "attachdatabin" => PR_ATTACH_DATA_BIN, |
---|
514 | "internetcpid" => PR_INTERNET_CPID, |
---|
515 | ); |
---|
516 | } |
---|
517 | } |
---|
518 | ?> |
---|