Commit 4c5f014c authored by Manfred Kutas's avatar Manfred Kutas

ZP-1295 Merge MAPI classes from webapp.

Released under the Affero GNU General Public License (AGPL) version 3.
parent c9c700d9
...@@ -335,7 +335,7 @@ class BackendKopano implements IBackend, ISearchProvider { ...@@ -335,7 +335,7 @@ class BackendKopano implements IBackend, ISearchProvider {
$calendar = mapi_msgstore_openentry($store, $entryid); $calendar = mapi_msgstore_openentry($store, $entryid);
$pub = new FreeBusyPublish($this->session, $store, $calendar, $storeprops[PR_USER_ENTRYID]); $pub = new FreeBusyPublish($this->session, $store, $calendar, $storeprops[PR_USER_ENTRYID]);
$pub->publishFB(time() - (7 * 24 * 60 * 60), 6 * 30 * 24 * 60 * 60); // publish from one week ago, 6 months ahead $pub->publishFB(time() - (7 * 24 * 60 * 60), time() + (6 * 30 * 24 * 60 * 60)); // publish from one week ago, 6 months ahead
} }
} }
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
/** /**
* Defines a base exception class for all custom exceptions, so every exceptions that * Defines a base exception class for all custom exceptions, so every exceptions that
* is thrown/caught by this application should extend this base class and make use of it. * is thrown/caught by this application should extend this base class and make use of it.
* it removes some peculiarities between different versions of PHP and exception handling.
* *
* Some basic function of Exception class * Some basic function of Exception class
* getMessage()- message of exception * getMessage()- message of exception
...@@ -32,12 +31,6 @@ ...@@ -32,12 +31,6 @@
*/ */
class BaseException extends Exception class BaseException extends Exception
{ {
/**
* Reference of previous exception, only used for PHP < 5.3
* can't use $previous here as its a private variable of parent class
*/
private $_previous = null;
/** /**
* Base name of the file, so we don't have to use static path of the file * Base name of the file, so we don't have to use static path of the file
*/ */
...@@ -62,37 +55,13 @@ class BaseException extends Exception ...@@ -62,37 +55,13 @@ class BaseException extends Exception
* @param string $displayMessage * @param string $displayMessage
* @return void * @return void
*/ */
public function __construct($errorMessage, $code = 0, Exception $previous = null, $displayMessage = null) { public function __construct($errorMessage, $code = 0, Exception $previous = null, $displayMessage = null)
{
// assign display message // assign display message
$this->displayMessage = $displayMessage; $this->displayMessage = $displayMessage;
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
parent::__construct($errorMessage, (int) $code);
// set previous exception
if(!is_null($previous)) {
$this->_previous = $previous;
}
} else {
parent::__construct($errorMessage, (int) $code, $previous); parent::__construct($errorMessage, (int) $code, $previous);
} }
}
/**
* Overloading of final methods to get rid of incompatibilities between different PHP versions.
*
* @param string $method
* @param array $args
* @return mixed
*/
public function __call($method, array $args)
{
if ('getprevious' == strtolower($method)) {
return $this->_getPrevious();
}
return null;
}
/** /**
* @return string returns file name and line number combined where exception occured. * @return string returns file name and line number combined where exception occured.
...@@ -146,39 +115,6 @@ class BaseException extends Exception ...@@ -146,39 +115,6 @@ class BaseException extends Exception
return $this->baseFile; return $this->baseFile;
} }
/**
* Function will check for PHP version if it is greater than 5.3 then we can use its default implementation
* otherwise we have to use our own implementation of chanining functionality.
*
* @return Exception returns previous exception
*/
public function _getPrevious()
{
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
return $this->_previous;
} else {
return parent::getPrevious();
}
}
/**
* String representation of the exception, also handles previous exception.
*
* @return string
*/
public function __toString()
{
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
if (($e = $this->getPrevious()) !== null) {
return $e->__toString()
. "\n\nNext "
. parent::__toString();
}
}
return parent::__toString();
}
/** /**
* Name of the class of exception. * Name of the class of exception.
* *
......
...@@ -740,14 +740,24 @@ ...@@ -740,14 +740,24 @@
// Go the the correct month day // Go the the correct month day
$this->recur["start"] += (((int) $this->recur["monthday"])-1) * 24*60*60; $this->recur["start"] += (((int) $this->recur["monthday"])-1) * 24*60*60;
// If the previous calculation gave us a start date *before* the original start date, then we need to skip to the next occurrence // If the previous calculation gave us a start date different than the original start date, then we need to skip to the first occurrence
if ( ($term == 0x0C /*monthly*/ && ((int) $this->recur["monthday"]) < $curmonthday) || if ( ($term == 0x0C /*monthly*/ && ((int) $this->recur["monthday"]) < $curmonthday) ||
($term == 0x0D /*yearly*/ &&( $selmonth < $curmonth || ($selmonth == $curmonth && ((int) $this->recur["monthday"]) < $curmonthday)) )) ($term == 0x0D /*yearly*/ && ( $selmonth != $curmonth || ($selmonth == $curmonth && ((int) $this->recur["monthday"]) < $curmonthday)) ))
{ {
if($term == 0x0D /*yearly*/) if ($term == 0x0D /*yearly*/) {
$count = ($everyn - ($curmonth - $selmonth)); // Yearly, go to next occurrence in 'everyn' months minus difference in first occurence and original date if ($curmonth > $selmonth) {//go to next occurrence in 'everyn' months minus difference in first occurrence and original date
else $count = $everyn - ($curmonth - $selmonth);
} else if ($curmonth < $selmonth) {//go to next occurrence upto difference in first occurrence and original date
$count = $selmonth - $curmonth;
} else {
// Go to next occurrence while recurrence start date is greater than occurrence date but within same month
if (((int) $this->recur["monthday"]) < $curmonthday) {
$count = $everyn;
}
}
} else {
$count = $everyn; // Monthly, go to next occurrence in 'everyn' months $count = $everyn; // Monthly, go to next occurrence in 'everyn' months
}
// Forward by $count months. This is done by getting the number of days in that month and forwarding that many days // Forward by $count months. This is done by getting the number of days in that month and forwarding that many days
for($i=0; $i < $count; $i++) { for($i=0; $i < $count; $i++) {
...@@ -1173,7 +1183,7 @@ ...@@ -1173,7 +1183,7 @@
mapi_setprops($this->message, Array($this->proptags["commonend"] => $utcfirstoccenddatetime )); mapi_setprops($this->message, Array($this->proptags["commonend"] => $utcfirstoccenddatetime ));
// Set Outlook properties, if it is an appointment // Set Outlook properties, if it is an appointment
if (isset($this->recur["message_class"]) && $this->recur["message_class"] == "IPM.Appointment") { if (isset($this->messageprops[$this->proptags["message_class"]]) && $this->messageprops[$this->proptags["message_class"]] == "IPM.Appointment") {
// update real begin and real end date // update real begin and real end date
mapi_setprops($this->message, Array($this->proptags["startdate_recurring"] => $utcstart)); mapi_setprops($this->message, Array($this->proptags["startdate_recurring"] => $utcstart));
mapi_setprops($this->message, Array($this->proptags["enddate_recurring"] => $utcend)); mapi_setprops($this->message, Array($this->proptags["enddate_recurring"] => $utcend));
...@@ -1657,8 +1667,8 @@ ...@@ -1657,8 +1667,8 @@
// From here on, the dates of the occurrences are calculated in local time, so the days we're looking // From here on, the dates of the occurrences are calculated in local time, so the days we're looking
// at are calculated from the local time dates of $start and $end // at are calculated from the local time dates of $start and $end
// TODO use one isset
if ($this->recur['regen'] && isset($this->action['datecompleted'])) { if (isset($this->recur['regen']) && $this->recur['regen'] && isset($this->action['datecompleted'])) {
$daystart = $this->dayStartOf($this->action['datecompleted']); $daystart = $this->dayStartOf($this->action['datecompleted']);
} else { } else {
$daystart = $this->dayStartOf($this->recur["start"]); // start on first day of occurrence $daystart = $this->dayStartOf($this->recur["start"]); // start on first day of occurrence
......
...@@ -79,13 +79,16 @@ class FreeBusyPublish { ...@@ -79,13 +79,16 @@ class FreeBusyPublish {
} }
/** /**
* Publishes the infomation * Function is used to get the calender data based on give date range.
* @paam timestamp $starttime Time from which to publish data (usually now) *
* @paam integer $length Amount of seconds from $starttime we should publish * @param timestamp $starttime Time from which to get the calender data.
* @param timestamp $length Time up till now get the calender data.
* @return Array return the calender data array.
*/ */
function publishFB($starttime, $length) { function getCalendarData($starttime, $length)
{
$start = $starttime; $start = $starttime;
$end = $starttime + $length; $end = $length;
// Get all the items in the calendar that we need // Get all the items in the calendar that we need
...@@ -220,7 +223,7 @@ class FreeBusyPublish { ...@@ -220,7 +223,7 @@ class FreeBusyPublish {
if(isset($row[$this->proptags['recurring']]) && $row[$this->proptags['recurring']]) { if(isset($row[$this->proptags['recurring']]) && $row[$this->proptags['recurring']]) {
$recur = new Recurrence($this->store, $row); $recur = new Recurrence($this->store, $row);
$occurrences = $recur->getItems($starttime, $starttime + $length); $occurrences = $recur->getItems($starttime, $length);
} else { } else {
$occurrences[] = $row; $occurrences[] = $row;
} }
...@@ -232,10 +235,19 @@ class FreeBusyPublish { ...@@ -232,10 +235,19 @@ class FreeBusyPublish {
// $calendaritems now contains all the calendar items in the specified time // $calendaritems now contains all the calendar items in the specified time
// frame. We now need to merge these into a flat array of begin/end/status // frame. We now need to merge these into a flat array of begin/end/status
// objects. This also filters out all the 'free' items (status 0) // objects. This also filters out all the 'free' items (status 0)
$freebusy = $this->mergeItemsFB($calendaritems); $freebusy = $this->mergeItemsFB($calendaritems);
// $freebusy now contains the start, end and status of all items, merged. return $freebusy;
}
/**
* Publishes Free/Busy infomation of user.
* @param timestamp $starttime Time from which to publish data (usually now)
* @param timestamp $length Time of seconds from $starttime we should publish
*/
function publishFB($start, $end)
{
$freebusy = $this->getCalendarData($start, $end);
// Get the FB interface // Get the FB interface
try { try {
...@@ -243,9 +255,7 @@ class FreeBusyPublish { ...@@ -243,9 +255,7 @@ class FreeBusyPublish {
} catch (MAPIException $e) { } catch (MAPIException $e) {
if($e->getCode() == MAPI_E_NOT_FOUND) { if($e->getCode() == MAPI_E_NOT_FOUND) {
$e->setHandled(); $e->setHandled();
if(function_exists("dump")) { ZLog::Write(LOGLEVEL_WARN, "Error in opening freebusysupport object.");
dump("Error in opening freebusysupport object.");
}
} }
} }
...@@ -300,13 +310,13 @@ class FreeBusyPublish { ...@@ -300,13 +310,13 @@ class FreeBusyPublish {
$ts["type"] = 0; $ts["type"] = 0;
$ts["time"] = $item[$this->proptags["startdate"]]; $ts["time"] = $item[$this->proptags["startdate"]];
$ts["subject"] = $item[PR_SUBJECT]; $ts["subject"] = $item[PR_SUBJECT];
$ts["status"] = (isset($item[$this->proptags["busystatus"]])) ? $item[$this->proptags["busystatus"]] : 0; //ZP-197 $ts["status"] = (isset($item[$this->proptags["busystatus"]])) ? $item[$this->proptags["busystatus"]] : fbFree; //ZP-197
$timestamps[] = $ts; $timestamps[] = $ts;
$ts["type"] = 1; $ts["type"] = 1;
$ts["time"] = $item[$this->proptags["duedate"]]; $ts["time"] = $item[$this->proptags["duedate"]];
$ts["subject"] = $item[PR_SUBJECT]; $ts["subject"] = $item[PR_SUBJECT];
$ts["status"] = (isset($item[$this->proptags["busystatus"]])) ? $item[$this->proptags["busystatus"]] : 0; //ZP-197 $ts["status"] = (isset($item[$this->proptags["busystatus"]])) ? $item[$this->proptags["busystatus"]] : fbFree; //ZP-197
$timestamps[] = $ts; $timestamps[] = $ts;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
/** /**
* Recurrence * Recurrence
* @author Steve Hardy <steve@zarafa.com>
* @author Michel de Ron <michel@zarafa.com>
*/ */
class Recurrence extends BaseRecurrence class Recurrence extends BaseRecurrence
{ {
...@@ -226,7 +224,6 @@ ...@@ -226,7 +224,6 @@
} }
$baseday = $this->dayStartOf($base_date); $baseday = $this->dayStartOf($base_date);
$basetime = $baseday + $this->recur["startocc"] * 60;
$extomodify = false; $extomodify = false;
for($i = 0, $len = count($this->recur["changed_occurences"]); $i < $len; $i++) { for($i = 0, $len = count($this->recur["changed_occurences"]); $i < $len; $i++) {
...@@ -373,8 +370,6 @@ ...@@ -373,8 +370,6 @@
*/ */
function isValidReminderTime($basedate, $reminderminutes, $startdate) function isValidReminderTime($basedate, $reminderminutes, $startdate)
{ {
$isreminderrangeset = false;
// get all occurence items before the seleceted items occurence starttime // get all occurence items before the seleceted items occurence starttime
$occitems = $this->getItems($this->messageprops[$this->proptags["startdate"]], $this->toGMT($this->tz, $basedate)); $occitems = $this->getItems($this->messageprops[$this->proptags["startdate"]], $this->toGMT($this->tz, $basedate));
...@@ -789,13 +784,14 @@ ...@@ -789,13 +784,14 @@
*/ */
function getExceptionAttachment($base_date) function getExceptionAttachment($base_date)
{ {
// Retrieve only embedded messages // Retrieve only exceptions which are stored as embedded messages
$attach_res = Array(RES_AND, $attach_res = Array(RES_AND,
Array( Array(
Array(RES_PROPERTY, Array(RES_PROPERTY,
Array(RELOP => RELOP_EQ, Array(
RELOP => RELOP_EQ,
ULPROPTAG => PR_ATTACH_METHOD, ULPROPTAG => PR_ATTACH_METHOD,
VALUE => array(PR_ATTACH_METHOD => 5) VALUE => array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG)
) )
) )
) )
...@@ -811,7 +807,13 @@ ...@@ -811,7 +807,13 @@
$data = mapi_message_getprops($exception, array($this->proptags["basedate"])); $data = mapi_message_getprops($exception, array($this->proptags["basedate"]));
if(isset($data[$this->proptags["basedate"]]) && $this->isSameDay($this->fromGMT($this->tz,$data[$this->proptags["basedate"]]), $base_date)) { if(!isset($data[$this->proptags["basedate"]])) {
// if no basedate found then it could be embedded message so ignore it
// we need proper restriction to exclude embedded messages aswell
continue;
}
if($this->isSameDay($this->fromGMT($this->tz, $data[$this->proptags["basedate"]]), $base_date)) {
return $tempattach; return $tempattach;
} }
} }
...@@ -1061,7 +1063,7 @@ ...@@ -1061,7 +1063,7 @@
} }
// Add organizer to meeting only if it is not organized. // Add organizer to meeting only if it is not organized.
$msgprops = mapi_getprops($exception, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, $this->proptags['responsestatus'])); $msgprops = mapi_getprops($exception, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_SEARCH_KEY, $this->proptags['responsestatus']));
if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){ if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){
$this->addOrganizer($msgprops, $exception_recips['add']); $this->addOrganizer($msgprops, $exception_recips['add']);
} }
...@@ -1116,7 +1118,7 @@ ...@@ -1116,7 +1118,7 @@
} }
// Add organizer to meeting only if it is not organized. // Add organizer to meeting only if it is not organized.
$msgprops = mapi_getprops($message, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, $this->proptags['responsestatus'])); $msgprops = mapi_getprops($message, array(PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_SEARCH_KEY, $this->proptags['responsestatus']));
if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){ if (isset($msgprops[$this->proptags['responsestatus']]) && $msgprops[$this->proptags['responsestatus']] != olResponseOrganized){
$this->addOrganizer($msgprops, $exception_recips); $this->addOrganizer($msgprops, $exception_recips);
} }
...@@ -1125,7 +1127,7 @@ ...@@ -1125,7 +1127,7 @@
foreach($recipientRows as $key => $recipient) { foreach($recipientRows as $key => $recipient) {
$found = false; $found = false;
foreach($exception_recips as $excep_recip) { foreach($exception_recips as $excep_recip) {
if (isset($recipient[PR_SEARCH_KEY]) && isset($excep_recip[PR_SEARCH_KEY]) && $recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY]) if (isset($recipient[PR_SEARCH_KEY], $excep_recip[PR_SEARCH_KEY]) && $recipient[PR_SEARCH_KEY] == $excep_recip[PR_SEARCH_KEY])
$found = true; $found = true;
} }
...@@ -1201,8 +1203,8 @@ ...@@ -1201,8 +1203,8 @@
* @param array $recipients recipients list of message. * @param array $recipients recipients list of message.
* @param boolean $isException true if we are processing recipient of exception * @param boolean $isException true if we are processing recipient of exception
*/ */
function addOrganizer($messageProps, &$recipients, $isException = false){ function addOrganizer($messageProps, &$recipients, $isException = false)
{
$hasOrganizer = false; $hasOrganizer = false;
// Check if meeting already has an organizer. // Check if meeting already has an organizer.
foreach ($recipients as $key => $recipient){ foreach ($recipients as $key => $recipient){
...@@ -1225,6 +1227,7 @@ ...@@ -1225,6 +1227,7 @@
$organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE])?'SMTP':$messageProps[PR_SENT_REPRESENTING_ADDRTYPE]; $organizer[PR_ADDRTYPE] = empty($messageProps[PR_SENT_REPRESENTING_ADDRTYPE])?'SMTP':$messageProps[PR_SENT_REPRESENTING_ADDRTYPE];
$organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone; $organizer[PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusNone;
$organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer; $organizer[PR_RECIPIENT_FLAGS] = recipSendable | recipOrganizer;
$organizer[PR_SEARCH_KEY] = $messageProps[PR_SENT_REPRESENTING_SEARCH_KEY];
// Add organizer to recipients list. // Add organizer to recipients list.
array_unshift($recipients, $organizer); array_unshift($recipients, $organizer);
......
...@@ -299,12 +299,12 @@ ...@@ -299,12 +299,12 @@
// Update body of original message // Update body of original message
$msgbody = mapi_message_openproperty($this->message, PR_BODY); $msgbody = mapi_message_openproperty($this->message, PR_BODY);
$msgbody = trim($this->windows1252_to_utf8($msgbody), "\0"); $msgbody = trim($msgbody, "\0");
$separator = "------------\r\n"; $separator = "------------\r\n";
if (!empty($msgbody) && strrpos($msgbody, $separator) === false) { if (!empty($msgbody) && strrpos($msgbody, $separator) === false) {
$msgbody = $separator . $msgbody; $msgbody = $separator . $msgbody;
$stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); $stream = mapi_openproperty($this->message, PR_BODY, IID_IStream, 0, 0);
mapi_stream_setsize($stream, strlen($msgbody)); mapi_stream_setsize($stream, strlen($msgbody));
mapi_stream_write($stream, $msgbody); mapi_stream_write($stream, $msgbody);
mapi_stream_commit($stream); mapi_stream_commit($stream);
...@@ -409,21 +409,4 @@ ...@@ -409,21 +409,4 @@
return $result; return $result;
} }
/**
* Convert from windows-1252 encoded string to UTF-8 string
*
* The same conversion rules as utf8_to_windows1252 apply.
*
* @param string $string the Windows-1252 string to convert
* @return string UTF-8 representation of the string
*/
function windows1252_to_utf8($string)
{
if (function_exists("iconv")){
return iconv("Windows-1252", "UTF-8//TRANSLIT", $string);
}else{
return utf8_encode($string); // no euro support here
}
}
} }
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
* task request is sent via sendTaskRequest. * task request is sent via sendTaskRequest.
*/ */
/* The TaskMode value is only used for the IPM.TaskRequest items. It must 0 (tdmtNothing) on IPM.Task items. /* The TaskMode value is only used for the IPM.TaskRequest items.
* It must 0 (tdmtNothing) on IPM.Task items.
* *
* It is used to indicate the type of change that is being carried in the IPM.TaskRequest item (although this * It is used to indicate the type of change that is being
* information seems redundant due to that information already being available in PR_MESSAGE_CLASS). * carried in the IPM.TaskRequest item (although this information seems
* redundant due to that information already being available in PR_MESSAGE_CLASS).
*/ */
define('tdmtNothing', 0); // Value in IPM.Task items define('tdmtNothing', 0); // Value in IPM.Task items
define('tdmtTaskReq', 1); // Assigner -> Assignee define('tdmtTaskReq', 1); // Assigner -> Assignee
...@@ -41,10 +43,12 @@ ...@@ -41,10 +43,12 @@
define('tdmtTaskUpd', 4); // Assignee -> Assigner define('tdmtTaskUpd', 4); // Assignee -> Assigner
define('tdmtTaskSELF', 5); // Assigner -> Assigner (?) define('tdmtTaskSELF', 5); // Assigner -> Assigner (?)
/* The TaskHistory is used to show the last action on the task on both the assigner and the assignee's side. /* The TaskHistory is used to show the last action on the task
* on both the assigner and the assignee's side.
* *
* It is used in combination with 'AssignedTime' and 'tasklastdelegate' or 'tasklastuser' to show the information * It is used in combination with 'task_assigned_time' and 'tasklastdelegate'
* at the top of the task request in the format 'Accepted by <user> on 01-01-2010 11:00'. * or 'tasklastuser' to show the information at the top of the task request in
* the format 'Accepted by <user> on 01-01-2010 11:00'.
*/ */
define('thNone', 0); define('thNone', 0);
define('thAccepted', 1); // Set by assignee define('thAccepted', 1); // Set by assignee
...@@ -53,8 +57,10 @@ ...@@ -53,8 +57,10 @@
define('thDueDateChanged', 4); define('thDueDateChanged', 4);
define('thAssigned', 5); // Set by assigner define('thAssigned', 5); // Set by assigner
/* The TaskState value is used to differentiate the version of a task in the assigner's folder and the version in the /* The TaskState value is used to differentiate the version of a task
* assignee's folder. The buttons shown depend on this and the 'taskaccepted' boolean (for the assignee) * in the assigner's folder and the version in the
* assignee's folder. The buttons shown depend on this and
* the 'taskaccepted' boolean (for the assignee)
*/ */
define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner define('tdsNOM', 0); // Got a response to a deleted task, and re-created the task for the assigner
define('tdsOWNNEW', 1); // Not assigned define('tdsOWNNEW', 1); // Not assigned
...@@ -62,21 +68,18 @@ ...@@ -62,21 +68,18 @@
define('tdsACC', 3); // Assigner version define('tdsACC', 3); // Assigner version
define('tdsDEC', 4); // Assigner version, but assignee declined define('tdsDEC', 4); // Assigner version, but assignee declined
/* The delegationstate is used for the assigner to indicate state /* The TaskAcceptanceState is used for the assigner to indicate state */
*/
define('olTaskNotDelegated', 0); define('olTaskNotDelegated', 0);
define('olTaskDelegationUnknown', 1); // After sending req define('olTaskDelegationUnknown', 1); // After sending req
define('olTaskDelegationAccepted', 2); // After receiving accept define('olTaskDelegationAccepted', 2); // After receiving accept
define('olTaskDelegationDeclined', 3); // After receiving decline define('olTaskDelegationDeclined', 3); // After receiving decline
/* The task ownership indicates the role of the current user relative to the task. /* The task ownership indicates the role of the current user relative to the task. */
*/
define('olNewTask', 0); define('olNewTask', 0);
define('olDelegatedTask', 1); // Task has been assigned define('olDelegatedTask', 1); // Task has been assigned
define('olOwnTask', 2); // Task owned define('olOwnTask', 2); // Task owned
/* taskmultrecips indicates whether the task request sent or received has multiple assignees or not. /* taskmultrecips indicates whether the task request sent or received has multiple assignees or not. */
*/
define('tmrNone', 0); define('tmrNone', 0);
define('tmrSent', 1); // Task has been sent to multiple assignee define('tmrSent', 1); // Task has been sent to multiple assignee
define('tmrReceived', 2); // Task Request received has multiple assignee define('tmrReceived', 2); // Task Request received has multiple assignee
...@@ -84,7 +87,23 @@ ...@@ -84,7 +87,23 @@
class TaskRequest { class TaskRequest {
// All recipient properties // All recipient properties
var $recipprops = Array(PR_ENTRYID, PR_DISPLAY_NAME, PR_EMAIL_ADDRESS, PR_RECIPIENT_ENTRYID, PR_RECIPIENT_TYPE, PR_SEND_INTERNET_ENCODING, PR_SEND_RICH_INFO, PR_RECIPIENT_DISPLAY_NAME, PR_ADDRTYPE, PR_DISPLAY_TYPE, PR_RECIPIENT_TRACKSTATUS, PR_RECIPIENT_TRACKSTATUS_TIME, PR_RECIPIENT_FLAGS, PR_ROWID, PR_SEARCH_KEY); var $recipProps = Array(
PR_ENTRYID,
PR_DISPLAY_NAME,
PR_EMAIL_ADDRESS,
PR_RECIPIENT_ENTRYID,
PR_RECIPIENT_TYPE,
PR_SEND_INTERNET_ENCODING,
PR_SEND_RICH_INFO,
PR_RECIPIENT_DISPLAY_NAME,
PR_ADDRTYPE,
PR_DISPLAY_TYPE,
PR_RECIPIENT_TRACKSTATUS,
PR_RECIPIENT_TRACKSTATUS_TIME,
PR_RECIPIENT_FLAGS,
PR_ROWID,
PR_SEARCH_KEY
);
/* Constructor /* Constructor
* *
...@@ -102,6 +121,7 @@ ...@@ -102,6 +121,7 @@
$this->store = $store; $this->store = $store;
$this->message = $message; $this->message = $message;
$this->session = $session; $this->session = $session;
$this->taskCommentsInfo = false;
$properties["owner"] = "PT_STRING8:PSETID_Task:0x811f"; $properties["owner"] = "PT_STRING8:PSETID_Task:0x811f";
$properties["updatecount"] = "PT_LONG:PSETID_Task:0x8112"; $properties["updatecount"] = "PT_LONG:PSETID_Task:0x8112";
...@@ -111,14 +131,14 @@ ...@@ -111,14 +131,14 @@
$properties["tasksoc"] = "PT_BOOLEAN:PSETID_Task:0x8119"; $properties["tasksoc"] = "PT_BOOLEAN:PSETID_Task:0x8119";
$properties["taskhistory"] = "PT_LONG:PSETID_Task:0x811a"; $properties["taskhistory"] = "PT_LONG:PSETID_Task:0x811a";
$properties["taskmode"] = "PT_LONG:PSETID_Common:0x8518"; $properties["taskmode"] = "PT_LONG:PSETID_Common:0x8518";
$properties["taskglobalobjid"] = "PT_BINARY:PSETID_Common:0x8519"; $properties["task_goid"] = "PT_BINARY:PSETID_Common:0x8519";
$properties["complete"] = "PT_BOOLEAN:PSETID_Common:0x811c"; $properties["complete"] = "PT_BOOLEAN:PSETID_Common:0x811c";
$properties["assignedtime"] = "PT_SYSTIME:PSETID_Task:0x8115"; $properties["task_assigned_time"] = "PT_SYSTIME:PSETID_Task:0x8115";
$properties["taskfcreator"] = "PT_BOOLEAN:PSETID_Task:0x0x811e"; $properties["taskfcreator"] = "PT_BOOLEAN:PSETID_Task:0x0x811e";
$properties["tasklastuser"] = "PT_STRING8:PSETID_Task:0x8122"; $properties["tasklastuser"] = "PT_STRING8:PSETID_Task:0x8122";
$properties["tasklastdelegate"] = "PT_STRING8:PSETID_Task:0x8125"; $properties["tasklastdelegate"] = "PT_STRING8:PSETID_Task:0x8125";
$properties["taskaccepted"] = "PT_BOOLEAN:PSETID_Task:0x8108"; $properties["taskaccepted"] = "PT_BOOLEAN:PSETID_Task:0x8108";
$properties["delegationstate"] = "PT_LONG:PSETID_Task:0x812a"; $properties["task_acceptance_state"] = "PT_LONG:PSETID_Task:0x812a";
$properties["ownership"] = "PT_LONG:PSETID_Task:0x8129"; $properties["ownership"] = "PT_LONG:PSETID_Task:0x8129";
$properties["complete"] = "PT_BOOLEAN:PSETID_Task:0x811c"; $properties["complete"] = "PT_BOOLEAN:PSETID_Task:0x811c";
...@@ -140,67 +160,115 @@ ...@@ -140,67 +160,115 @@
// General functions // General functions
/* Return TRUE if the item is a task request message /**
* Returns TRUE if the message pointed to is an incoming task request and should
* therefore be replied to with doAccept or doDecline().
* @param String $messageClass message class to use for checking.
* @return Boolean Returns true if this is a task request else false.
*/ */
function isTaskRequest() function isTaskRequest($messageClass = false)
{ {
if($messageClass === false) {
$props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS)); $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
$messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
}
if(isset($props[PR_MESSAGE_CLASS]) && $props[PR_MESSAGE_CLASS] == "IPM.TaskRequest") { if($messageClass !== false && $messageClass === "IPM.TaskRequest") {
return true; return true;
} }
return false;
} }
/* Return TRUE if the item is a task response message /**
* Returns TRUE if the message pointed to is a returning task request response.
* @param String $messageClass message class to use for checking.
* @return Boolean Returns true if this is a task request else false.
*/ */
function isTaskRequestResponse() { function isTaskRequestResponse($messageClass = false)
{
if($messageClass === false) {
$props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS)); $props = mapi_getprops($this->message, Array(PR_MESSAGE_CLASS));
$messageClass = isset($props[PR_MESSAGE_CLASS]) ? $props[PR_MESSAGE_CLASS] : false;
}
if(isset($props[PR_MESSAGE_CLASS]) && strpos($props[PR_MESSAGE_CLASS], "IPM.TaskRequest.") === 0) { if($messageClass !== false && strpos($messageClass, "IPM.TaskRequest.") === 0) {
return true; return true;
} }
return false;
} }
/* /**
* Returns TRUE if the message pointed to is an incoming task request/response.
*
* @param array $props The MAPI properties to check message is an incoming task request/response
* @return Boolean Returns true if this is an incoming task request/response. else false.
*/
function isReceivedItem($props)
{
return isset($props[PR_MESSAGE_TO_ME]) ? $props[PR_MESSAGE_TO_ME] : false;
}
/**
* Gets the task associated with an IPM.TaskRequest message * Gets the task associated with an IPM.TaskRequest message
* *
* If the task does not exist yet, it is created, using the attachment object in the * If the task does not exist yet, it is created, using the attachment object in the
* task request item. * task request item.
*
* @param boolean $create false to find the associated task in user's task folder. true to
* create task in user's task folder if task is not exist in task folder.
*
* @return MAPIMessage|false Return associated task of task request else false
*/ */
function getAssociatedTask($create) function getAssociatedTask($create)
{ {
$props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['taskglobalobjid'])); $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['task_goid']));
if($props[PR_MESSAGE_CLASS] == "IPM.Task") if($props[PR_MESSAGE_CLASS] == "IPM.Task") {
return $this->message; // Message itself is task, so return that // Message itself is task, so return that
return $this->message;
}
$tfolder = $this->getDefaultTasksFolder(); $taskFolder = $this->getDefaultTasksFolder();
$globalobjid = $props[$this->props['taskglobalobjid']]; $goid = $props[$this->props['task_goid']];
// Find the task by looking for the taskglobalobjid // Find the task by looking for the task_goid
$restriction = array(RES_PROPERTY, array(RELOP => RELOP_EQ, ULPROPTAG => $this->props['taskglobalobjid'], VALUE => $globalobjid)); $restriction = array(RES_PROPERTY, array(RELOP => RELOP_EQ,
ULPROPTAG => $this->props['task_goid'],
VALUE => $goid)
);
$contents = mapi_folder_getcontentstable($tfolder); $contents = mapi_folder_getcontentstable($taskFolder);
$rows = mapi_table_queryallrows($contents, array(PR_ENTRYID), $restriction); $rows = mapi_table_queryallrows($contents, array(PR_ENTRYID), $restriction);
if(empty($rows)) { if(empty($rows)) {
// None found, create one if possible // None found, create one if possible
if(!$create) if(!$create) {
return false; return false;
}
$task = mapi_folder_createmessage($tfolder); $task = mapi_folder_createmessage($taskFolder);
$sub = $this->getEmbeddedTask($this->message); $sub = $this->getEmbeddedTask($this->message);
mapi_copyto($sub, array(), array(), $task); mapi_copyto($sub, array(), array(), $task);
// Copy sender information from the e-mail $senderProps = array(
$senderprops = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_SEARCH_KEY)); PR_SENT_REPRESENTING_NAME,
mapi_setprops($task, $senderprops); PR_SENT_REPRESENTING_EMAIL_ADDRESS,
PR_SENT_REPRESENTING_ENTRYID,
$senderprops = mapi_getprops($this->message, array(PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_SENDER_ENTRYID, PR_SENDER_ADDRTYPE, PR_SENDER_SEARCH_KEY)); PR_SENT_REPRESENTING_ADDRTYPE,
mapi_setprops($task, $senderprops); PR_SENT_REPRESENTING_SEARCH_KEY,
PR_SENDER_NAME,
PR_SENDER_EMAIL_ADDRESS,
PR_SENDER_ENTRYID,
PR_SENDER_ADDRTYPE,
PR_SENDER_SEARCH_KEY);
// Copy sender information from the e-mail
$props = mapi_getprops($this->message, $senderProps);
mapi_setprops($task, $props);
} else { } else {
// If there are multiple, just use the first // If there are multiple, just use the first
$entryid = $rows[0][PR_ENTRYID]; $entryid = $rows[0][PR_ENTRYID];
...@@ -212,62 +280,197 @@ ...@@ -212,62 +280,197 @@
return $task; return $task;
} }
/**
* Function which checks that if we have received a task request/response
* for an already updated task in task folder.
*
* @return Boolean true if task request is updated later.
*/
function isTaskRequestUpdated() {
$props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['task_goid'], $this->props['updatecount']));
$result = false;
$associatedTask = $this->getAssociatedTask(false);
if ($this->isTaskRequest($props[PR_MESSAGE_CLASS])) {
if($associatedTask) {
return true;
} else {
$folder = $this->getDefaultTasksFolder();
$goid = $props[$this->props['task_goid']];
// Find the task by looking for the task_goid
$restriction = array(RES_PROPERTY, array(RELOP => RELOP_EQ,
ULPROPTAG => $this->props['task_goid'],
VALUE => $goid)
);
$table = mapi_folder_getcontentstable($folder, MAPI_DEFERRED_ERRORS | SHOW_SOFT_DELETES);
$softDeletedItems = mapi_table_queryallrows($table, array(PR_ENTRYID), $restriction);
if (!empty($softDeletedItems)) {
return true;
}
}
}
if ($associatedTask !== false) {
$taskItemProps = mapi_getprops($associatedTask, array($this->props['updatecount']));
/*
* if(message_counter < task_counter) task object is newer then task response (task is updated)
* if(message_counter >= task_counter) task is not updated, do normal processing
*/
if (isset($taskItemProps[$this->props['updatecount']]) && isset($props[$this->props['updatecount']])) {
if($props[$this->props['updatecount']] < $taskItemProps[$this->props['updatecount']]) {
$result = true;
}
}
}
return $result;
}
// Organizer functions (called by the organizer) // Organizer functions (called by the organizer)
/* Processes a task request response, which can be any of the following: /**
* Processes a task request response, which can be any of the following:
* - Task accept (task history is marked as accepted) * - Task accept (task history is marked as accepted)
* - Task decline (task history is marked as declined) * - Task decline (task history is marked as declined)
* - Task update (updates completion %, etc) * - Task update (updates completion %, etc)
*/ */
function processTaskResponse() { function processTaskResponse() {
$messageprops = mapi_getprops($this->message, array(PR_PROCESSED)); $messageProps = mapi_getprops($this->message, array(PR_PROCESSED, $this->props["taskupdates"], PR_MESSAGE_TO_ME));
if(isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED]) if (isset($messageProps[PR_PROCESSED]) && $messageProps[PR_PROCESSED]) {
return true; return true;
} else {
mapi_setprops($this->message, Array(PR_PROCESSED => true));
mapi_savechanges($this->message);
}
// Get the task for this response // Get the embedded task information.
$task = $this->getAssociatedTask(false); $sub = $this->getEmbeddedTask($this->message);
if(!$task) {
// Got a response for a task that has been deleted, create a new one and mark it as such
$task = $this->getAssociatedTask(true);
// tdsNOM indicates a task request that had gone missing // If task is updated in task folder then we don't need to process
mapi_setprops($task, array($this->props['taskstate'] => tdsNOM )); // old response
if($this->isTaskRequestUpdated()) {
return true;
} }
// Get the embedded task information and copy it into our task $isReceivedItem = $this->isReceivedItem($messageProps);
$sub = $this->getEmbeddedTask($this->message);
mapi_copyto($sub, array(), array($this->props['taskstate'], $this->props['taskhistory'], $this->props['taskmode'], $this->props['taskfcreator']), $task);
$isCreateAssociatedTask = false;
$isAllowUpdateAssociatedTask = $messageProps[$this->props["taskupdates"]];
$props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS)); $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS));
// Set correct taskmode and taskhistory depending on response type // Set correct taskmode and taskhistory depending on response type
switch($props[PR_MESSAGE_CLASS]) { switch ($props[PR_MESSAGE_CLASS]) {
case 'IPM.TaskRequest.Accept': case 'IPM.TaskRequest.Accept':
$taskhistory = thAccepted; $taskHistory = thAccepted;
$taskstate = tdsACC; $taskState = $isReceivedItem ? tdsACC : tdsOWN;
$delegationstate = olTaskDelegationAccepted; $taskOwner = $isReceivedItem ? olDelegatedTask : olOwnTask;
$taskAcceptanceState = $isReceivedItem ? olTaskDelegationAccepted : olTaskNotDelegated;
break; break;
case 'IPM.TaskRequest.Decline': case 'IPM.TaskRequest.Decline':
$taskhistory = thDeclined; $isCreateAssociatedTask = $isReceivedItem;
$taskstate = tdsDEC; $isAllowUpdateAssociatedTask = $isReceivedItem;
$delegationstate = olTaskDelegationDeclined; $taskHistory = thDeclined;
$taskState = $isReceivedItem ? tdsDEC : tdsACC;
$taskOwner = $isReceivedItem ? olOwnTask : olDelegatedTask;
$taskAcceptanceState = $isReceivedItem ? olTaskDelegationDeclined : olTaskDelegationUnknown;
break; break;
case 'IPM.TaskRequest.Update': case 'IPM.TaskRequest.Update':
$taskhistory = thUpdated; case 'IPM.TaskRequest.Complete':
$taskstate = tdsACC; // Doesn't actually change anything $taskHistory = thUpdated;
$delegationstate = olTaskDelegationAccepted; $taskState = $isReceivedItem ? tdsACC : tdsOWN;
$taskAcceptanceState = olTaskNotDelegated;
$taskOwner = $isReceivedItem ? olDelegatedTask : olOwnTask;
break; break;
} }
$props = array($this->props['taskhistory'] => $taskHistory,
$this->props['taskstate'] => $taskState,
$this->props['task_acceptance_state'] => $taskAcceptanceState,
$this->props['ownership'] => $taskOwner);
// Get the task for this response
$task = $this->getAssociatedTask($isCreateAssociatedTask);
if ($task && $isAllowUpdateAssociatedTask) {
// To avoid duplication of attachments in associated task. we simple remove the
// all attachments from associated task.
$taskAttachTable = mapi_message_getattachmenttable($task);
$taskAttachments = mapi_table_queryallrows($taskAttachTable, array(PR_ATTACH_NUM));
foreach($taskAttachments as $taskAttach) {
mapi_message_deleteattach($task, $taskAttach[PR_ATTACH_NUM]);
}
// We copy all properties except taskstate, taskhistory, taskmode and taskfcreator properties
// from $sub message to $task even also we copy all attachments from $sub to $task message.
mapi_copyto($sub, array(), array($this->props['taskstate'], $this->props['taskhistory'], $this->props['taskmode'], $this->props['taskfcreator']), $task);
$senderProps = mapi_getprops($this->message, array(
PR_SENDER_NAME,
PR_SENDER_EMAIL_ADDRESS,
PR_SENDER_ENTRYID,
PR_SENDER_ADDRTYPE,
PR_SENDER_SEARCH_KEY,
PR_MESSAGE_DELIVERY_TIME,
PR_SENT_REPRESENTING_NAME,
PR_SENT_REPRESENTING_EMAIL_ADDRESS,
PR_SENT_REPRESENTING_ADDRTYPE,
PR_SENT_REPRESENTING_ENTRYID,
PR_SENT_REPRESENTING_SEARCH_KEY));
mapi_setprops($task, $senderProps);
// Update taskstate (what the task looks like) and task history (last action done by the assignee) // Update taskstate (what the task looks like) and task history (last action done by the assignee)
mapi_setprops($task, array($this->props['taskhistory'] => $taskhistory, $this->props['taskstate'] => $taskstate, $this->props['delegationstate'] => $delegationstate, $this->props['ownership'] => olDelegatedTask)); mapi_setprops($task,$props);
mapi_setprops($this->message, array(PR_PROCESSED => true));
mapi_savechanges($task); mapi_savechanges($task);
}
mapi_setprops($this->message, $props);
mapi_savechanges($this->message);
if($isReceivedItem) {
$this->updateSentTaskRequest();
}
return true;
}
/**
* Update the sent task request in sent items folder.
* @return bool
*/
function updateSentTaskRequest() {
$props = mapi_getprops($this->message, array(
$this->props['taskhistory'],
$this->props["taskstate"],
$this->props["ownership"],
$this->props['task_goid'],
$this->props['task_acceptance_state'],
$this->props["tasklastuser"],
$this->props["tasklastdelegate"]));
$store = $this->getDefaultStore();
$storeProps = mapi_getprops($store, array(PR_IPM_SENTMAIL_ENTRYID));
$sentFolder = mapi_msgstore_openentry($store, $storeProps[PR_IPM_SENTMAIL_ENTRYID]);
if(!$sentFolder) {
return false;
}
// Find the task by looking for the task_goid
$restriction = array(RES_PROPERTY, array(RELOP => RELOP_EQ,
ULPROPTAG => $this->props['task_goid'],
VALUE => $props[$this->props['task_goid']])
);
$contentsTable = mapi_folder_getcontentstable($sentFolder);
$rows = mapi_table_queryallrows($contentsTable, array(PR_ENTRYID), $restriction);
if(!empty($rows)) {
foreach ($rows as $row) {
$sentTaskRequest = mapi_msgstore_openentry($store, $row[PR_ENTRYID]);
mapi_setprops($sentTaskRequest, $props);
mapi_setprops($sentTaskRequest, array(PR_PROCESSED => true));
mapi_savechanges($sentTaskRequest);
}
}
return true; return true;
} }
...@@ -283,13 +486,14 @@ ...@@ -283,13 +486,14 @@
// Set properties on Task Request // Set properties on Task Request
mapi_setprops($this->message, array( mapi_setprops($this->message, array(
$this->props['taskglobalobjid'] => $taskid, /* our new taskglobalobjid */ $this->props['task_goid'] => $taskid, /* our new task_goid */
$this->props['taskstate'] => tdsACC, /* state for our outgoing request */ $this->props['taskstate'] => tdsACC, /* state for our outgoing request */
$this->props['taskmode'] => tdmtNothing, /* we're not sending a change */ $this->props['taskmode'] => tdmtNothing, /* we're not sending a change */
$this->props['updatecount'] => 2, /* version 2 (no idea) */ $this->props['updatecount'] => 2, /* version 2 (no idea) */
$this->props['delegationstate'] => olTaskDelegationUnknown, /* no reply yet */ $this->props['task_acceptance_state'] => olTaskDelegationUnknown, /* no reply yet */
$this->props['ownership'] => olDelegatedTask, /* Task has been assigned */ $this->props['ownership'] => olDelegatedTask, /* Task has been assigned */
$this->props['taskhistory'] => thAssigned, /* Task has been assigned */ $this->props['taskhistory'] => thAssigned, /* Task has been assigned */
PR_CONVERSATION_TOPIC => $messageprops[PR_SUBJECT],
PR_ICON_INDEX => 1283 /* Task request icon*/ PR_ICON_INDEX => 1283 /* Task request icon*/
)); ));
$this->setLastUser(); $this->setLastUser();
...@@ -298,28 +502,27 @@ ...@@ -298,28 +502,27 @@
// Create outgoing task request message // Create outgoing task request message
$outgoing = $this->createOutgoingMessage(); $outgoing = $this->createOutgoingMessage();
// No need to copy attachments as task will be attached as embedded message.
mapi_copyto($this->message, array(), array(PR_MESSAGE_ATTACHMENTS), $outgoing); // No need to copy PR_SENT_* information in to outgoing message.
$ignoreProps = array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_SEARCH_KEY);
mapi_copyto($this->message, array(), $ignoreProps, $outgoing);
// Make it a task request, and put it in sent items after it is sent // Make it a task request, and put it in sent items after it is sent
mapi_setprops($outgoing, array( mapi_setprops($outgoing, array(
PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */ PR_MESSAGE_CLASS => "IPM.TaskRequest", /* class is task request */
$this->props['taskstate'] => tdsOWNNEW, /* for the recipient the task is new */ $this->props['taskstate'] => tdsOWN, /* for the recipient he is the task owner */
$this->props['taskmode'] => tdmtTaskReq, /* for the recipient it's a request */ $this->props['taskmode'] => tdmtTaskReq, /* for the recipient it's a request */
$this->props['updatecount'] => 1, /* version 2 is in the attachment */ $this->props['updatecount'] => 1, /* version 2 is in the attachment */
PR_SUBJECT_PREFIX => $prefix,
PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT], PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT],
PR_ICON_INDEX => 0xFFFFFFFF, /* show assigned icon */ PR_ICON_INDEX => 0xFFFFFFFF, /* show assigned icon */
)); ));
// Set Body
$body = $this->getBody();
$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_MODIFY | MAPI_CREATE);
mapi_stream_setsize($stream, strlen($body));
mapi_stream_write($stream, $body);
mapi_stream_commit($stream);
$attach = mapi_message_createattach($outgoing); $attach = mapi_message_createattach($outgoing);
mapi_setprops($attach, array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_SUBJECT])); mapi_setprops($attach, array(
PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG,
PR_ATTACHMENT_HIDDEN => true,
PR_DISPLAY_NAME => $messageprops[PR_SUBJECT]));
$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY | MAPI_CREATE); $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_MODIFY | MAPI_CREATE);
...@@ -357,50 +560,58 @@ ...@@ -357,50 +560,58 @@
* the task in the tasks folder if needed. * the task in the tasks folder if needed.
*/ */
function processTaskRequest() { function processTaskRequest() {
if(!$this->isTaskRequest()) if (!$this->isTaskRequest()) {
return false; return false;
}
$messageProps = mapi_getprops($this->message, array(PR_PROCESSED, $this->props["taskupdates"], PR_MESSAGE_TO_ME));
if (isset($messageProps[PR_PROCESSED]) && $messageProps[PR_PROCESSED]) {
return true;
}
$messageprops = mapi_getprops($this->message, array(PR_PROCESSED)); // if task is updated in task folder then we don't need to process
if (isset($messageprops[PR_PROCESSED]) && $messageprops[PR_PROCESSED]) // old request.
if($this->isTaskRequestUpdated()) {
return true; return true;
}
$isReceivedItem = $this->isReceivedItem($messageProps);
$props = array();
$props[PR_PROCESSED] = true;
$props[$this->props["taskstate"]] = $isReceivedItem ? tdsOWN : tdsACC;
$props[$this->props["ownership"]] = $isReceivedItem ? olOwnTask : olDelegatedTask;
mapi_setprops($this->message, $props);
mapi_savechanges($this->message);
// Don't create associated task in task folder if "taskupdates" is not true.
if (!$isReceivedItem && !$messageProps[$this->props["taskupdates"]]) {
return true;
} else {
// create an associated task in task folder while
// reading/loading task request on client side.
$task = $this->getAssociatedTask(true); $task = $this->getAssociatedTask(true);
$taskProps = mapi_getprops($task, array($this->props['taskmultrecips'])); $taskProps = mapi_getprops($task, array($this->props['taskmultrecips']));
$taskProps[$this->props["taskstate"]] = $isReceivedItem ? tdsOWN : tdsACC;
// Set the task state to say that we're the attendee receiving the message, that we have not yet responded and that this message represents no change
$taskProps[$this->props["taskstate"]] = tdsOWN;
$taskProps[$this->props["taskhistory"]] = thAssigned; $taskProps[$this->props["taskhistory"]] = thAssigned;
$taskProps[$this->props["taskmode"]] = tdmtNothing; $taskProps[$this->props["taskmode"]] = tdmtNothing;
$taskProps[$this->props["taskaccepted"]] = false; $taskProps[$this->props["taskaccepted"]] = false;
$taskProps[$this->props["taskfcreator"]] = false; $taskProps[$this->props["taskfcreator"]] = false;
$taskProps[$this->props["ownership"]] = olOwnTask; $taskProps[$this->props["ownership"]] = $isReceivedItem ? olOwnTask : olDelegatedTask;
$taskProps[$this->props["delegationstate"]] = olTaskNotDelegated; $taskProps[$this->props["task_acceptance_state"]] = olTaskNotDelegated;
$taskProps[PR_ICON_INDEX] = 1282; $taskProps[PR_ICON_INDEX] = 1282;
// This task was assigned to multiple recips, so set this user as owner
if (isset($taskProps[$this->props['taskmultrecips']]) && $taskProps[$this->props['taskmultrecips']] == tmrSent) {
$loginUserData = $this->retrieveUserData();
if ($loginUserData) {
$taskProps[$this->props['owner']] = $loginUserData[PR_DISPLAY_NAME];
$taskProps[$this->props['taskmultrecips']] = tmrReceived;
}
}
mapi_setprops($task, $taskProps); mapi_setprops($task, $taskProps);
$this->setAssignorInRecipients($task); $this->setAssignorInRecipients($task);
mapi_savechanges($task); mapi_savechanges($task);
}
$taskprops = mapi_getprops($task, array(PR_ENTRYID)); return true;
mapi_setprops($this->message, array(PR_PROCESSED => true));
mapi_savechanges($this->message);
return $taskprops[PR_ENTRYID];
} }
/* Accept a task request and send the response. /**
* Accept a task request and send the response.
* *
* Message passed should be an IPM.Task (eg the task from getAssociatedTask()) * Message passed should be an IPM.Task (eg the task from getAssociatedTask())
* *
...@@ -409,23 +620,44 @@ ...@@ -409,23 +620,44 @@
* *
* @return entryid EntryID of the accepted task * @return entryid EntryID of the accepted task
*/ */
function doAccept($prefix) { function doAccept() {
$messageprops = mapi_getprops($this->message, array($this->props['taskstate'])); $prefix = _("Task Accepted:") . " ";
$messageProps = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->props['taskstate']));
if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
return false; // Can only accept assignee task // Can only accept assignee task
return false;
}
$this->setLastUser(); $this->setLastUser();
$this->updateTaskRequest(); $this->updateTaskRequest();
$props = array(
$this->props['taskhistory'] => thAccepted,
$this->props['task_assigned_time'] => time(),
$this->props['taskaccepted'] => true,
$this->props['task_acceptance_state'] => olTaskNotDelegated);
// Message is TaskRequest then update the associated task as well.
if ($this->isTaskRequest($messageProps[PR_MESSAGE_CLASS])) {
$task = $this->getAssociatedTask(false);
if ($task) {
mapi_setprops($task, $props);
mapi_savechanges($task);
}
}
// Set as accepted // Set as accepted
mapi_setprops($this->message, array($this->props['taskhistory'] => thAccepted, $this->props['assignedtime'] => time(), $this->props['taskaccepted'] => true, $this->props['delegationstate'] => olTaskNotDelegated)); mapi_setprops($this->message, $props);
// As we copy the all properties from received message we need to remove following
// properties from accept response.
mapi_deleteprops($this->message, array(PR_MESSAGE_RECIP_ME, PR_MESSAGE_TO_ME, PR_MESSAGE_CC_ME, PR_PROCESSED));
mapi_savechanges($this->message); mapi_savechanges($this->message);
$this->sendResponse(tdmtTaskAcc, $prefix); $this->sendResponse(tdmtTaskAcc, $prefix);
//@TODO: delete received task request from Inbox
return $this->deleteReceivedTR(); return $this->deleteReceivedTR();
} }
...@@ -437,36 +669,50 @@ ...@@ -437,36 +669,50 @@
* *
* @return boolean TRUE on success, FALSE on failure * @return boolean TRUE on success, FALSE on failure
*/ */
function doDecline($prefix) { function doDecline() {
$messageprops = mapi_getprops($this->message, array($this->props['taskstate'])); $prefix = _("Task Declined:") . " ";
$messageProps = mapi_getprops($this->message, array($this->props['taskstate']));
if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
return false; // Can only decline assignee task return false; // Can only decline assignee task
}
$this->setLastUser(); $this->setLastUser();
$this->updateTaskRequest(); $this->updateTaskRequest();
// Set as declined // Set as declined
mapi_setprops($this->message, array($this->props['taskhistory'] => thDeclined, $this->props['delegationstate'] => olTaskDelegationDeclined)); mapi_setprops($this->message, array(
$this->props['taskhistory'] => thDeclined,
$this->props['task_acceptance_state'] => olTaskDelegationDeclined
));
mapi_deleteprops($this->message, array(PR_MESSAGE_RECIP_ME, PR_MESSAGE_TO_ME, PR_MESSAGE_CC_ME, PR_PROCESSED));
mapi_savechanges($this->message); mapi_savechanges($this->message);
$this->sendResponse(tdmtTaskDec, $prefix); $this->sendResponse(tdmtTaskDec, $prefix);
// Delete the associated task when task request is declined by the assignee.
$task = $this->getAssociatedTask(false);
if ($task) {
$taskFolder = $this->getDefaultTasksFolder();
$props = mapi_getprops($task, array(PR_ENTRYID));
mapi_folder_deletemessages($taskFolder, array($props[PR_ENTRYID]));
}
return $this->deleteReceivedTR(); return $this->deleteReceivedTR();
} }
/* Send an update of the task if requested, and send the Status-On-Completion report if complete and requested /**
* Send an update of the task if requested, and send the Status-On-Completion report if complete and requested
* *
* If no updates were requested from the organizer, this function does nothing. * If no updates were requested from the organizer, this function does nothing.
* *
* @return boolean TRUE if the update succeeded, FALSE otherwise. * @return boolean TRUE if the update succeeded, FALSE otherwise.
*/ */
function doUpdate($prefix, $prefixComplete) { function doUpdate() {
$messageprops = mapi_getprops($this->message, array($this->props['taskstate'], PR_SUBJECT)); $messageProps = mapi_getprops($this->message, array($this->props['taskstate'], PR_SUBJECT));
if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {
return false; // Can only update assignee task return false; // Can only update assignee task
}
$this->setLastUser(); $this->setLastUser();
$this->updateTaskRequest(); $this->updateTaskRequest();
...@@ -477,29 +723,15 @@ ...@@ -477,29 +723,15 @@
mapi_savechanges($this->message); mapi_savechanges($this->message);
$props = mapi_getprops($this->message, array($this->props['taskupdates'], $this->props['tasksoc'], $this->props['recurring'], $this->props['complete'])); $props = mapi_getprops($this->message, array($this->props['taskupdates'], $this->props['tasksoc'], $this->props['recurring'], $this->props['complete']));
if ($props[$this->props['taskupdates']] && !(isset($props[$this->props['recurring']]) && $props[$this->props['recurring']])) if (!$props[$this->props['complete']] && $props[$this->props['taskupdates']] && !(isset($props[$this->props['recurring']]) && $props[$this->props['recurring']])) {
$this->sendResponse(tdmtTaskUpd, $prefix); $this->sendResponse(tdmtTaskUpd, _("Task Updated:") . " ");
} else if($props[$this->props['complete']]) {
if($props[$this->props['tasksoc']] && $props[$this->props['complete']] ) { $this->sendResponse(tdmtTaskUpd, _("Task Completed:") . " ");
$outgoing = $this->createOutgoingMessage();
mapi_setprops($outgoing, array(PR_SUBJECT => $prefixComplete . $messageprops[PR_SUBJECT]));
$this->setRecipientsForResponse($outgoing, tdmtTaskUpd, true);
$body = $this->getBody();
$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
mapi_stream_setsize($stream, strlen($body));
mapi_stream_write($stream, $body);
mapi_stream_commit($stream);
mapi_savechanges($outgoing);
mapi_message_submitmessage($outgoing);
} }
} }
// Internal functions /**
* Get the store associated with the task
/* Get the store associated with the task
* *
* Normally this will just open the store that the processed message is in. However, if the message is opened * Normally this will just open the store that the processed message is in. However, if the message is opened
* by a delegate, this function opens the store that the message was delegated from. * by a delegate, this function opens the store that the message was delegated from.
...@@ -516,8 +748,8 @@ ...@@ -516,8 +748,8 @@
if(!$ownerentryid) { if(!$ownerentryid) {
$store = $this->store; $store = $this->store;
} else { } else {
$ab = mapi_openaddressbook($this->session); // seb changed from $session to $this->session $ab = mapi_openaddressbook($this->session);
if(!$ab) return false; // manni $ before ab was missing if(!$ab) return false;
$mailuser = mapi_ab_openentry($ab, $ownerentryid); $mailuser = mapi_ab_openentry($ab, $ownerentryid);
if(!$mailuser) return false; if(!$mailuser) return false;
...@@ -533,9 +765,8 @@ ...@@ -533,9 +765,8 @@
return $store; return $store;
} }
/* Open the default task folder for the current user, or the specified user if passed /**
* * Open the default task folder for the current user, or the specified user if passed
* @param $ownerentryid (Optional)EntryID of user for which we are opening the task folder
*/ */
function getDefaultTasksFolder() function getDefaultTasksFolder()
{ {
...@@ -549,10 +780,18 @@ ...@@ -549,10 +780,18 @@
return mapi_msgstore_openentry($store, $inboxprops[PR_IPM_TASK_ENTRYID]); return mapi_msgstore_openentry($store, $inboxprops[PR_IPM_TASK_ENTRYID]);
} }
/**
* Function prepare the sent representing properties from given MAPI store.
* @param $store MAPI store object
* @return array|bool if store is not mail box owner entryid then
* return false else prepare the sent representing props and return it.
*/
function getSentReprProps($store) function getSentReprProps($store)
{ {
$storeprops = mapi_getprops($store, array(PR_MAILBOX_OWNER_ENTRYID)); $storeprops = mapi_getprops($store, array(PR_MAILBOX_OWNER_ENTRYID));
if(!isset($storeprops[PR_MAILBOX_OWNER_ENTRYID])) return false; if (!isset($storeprops[PR_MAILBOX_OWNER_ENTRYID])) {
return false;
}
$ab = mapi_openaddressbook($this->session); $ab = mapi_openaddressbook($this->session);
$mailuser = mapi_ab_openentry($ab, $storeprops[PR_MAILBOX_OWNER_ENTRYID]); $mailuser = mapi_ab_openentry($ab, $storeprops[PR_MAILBOX_OWNER_ENTRYID]);
...@@ -568,9 +807,9 @@ ...@@ -568,9 +807,9 @@
return $props; return $props;
} }
/* /**
* Creates an outgoing message based on the passed message - will set delegate information * Creates an outgoing message based on the passed message - will set delegate information
* and sentmail folder * and sent mail folder
*/ */
function createOutgoingMessage() function createOutgoingMessage()
{ {
...@@ -594,7 +833,7 @@ ...@@ -594,7 +833,7 @@
return $outgoing; return $outgoing;
} }
/* /**
* Send a response message (from assignee back to organizer). * Send a response message (from assignee back to organizer).
* *
* @param $type int Type of response (tdmtTaskAcc, tdmtTaskDec, tdmtTaskUpd); * @param $type int Type of response (tdmtTaskAcc, tdmtTaskDec, tdmtTaskUpd);
...@@ -604,50 +843,63 @@ ...@@ -604,50 +843,63 @@
{ {
// Create a message in our outbox // Create a message in our outbox
$outgoing = $this->createOutgoingMessage(); $outgoing = $this->createOutgoingMessage();
$messageprops = mapi_getprops($this->message, array(PR_CONVERSATION_TOPIC, PR_MESSAGE_CLASS, $this->props['complete']));
$messageprops = mapi_getprops($this->message, array(PR_SUBJECT));
$attach = mapi_message_createattach($outgoing); $attach = mapi_message_createattach($outgoing);
mapi_setprops($attach, array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_SUBJECT], PR_ATTACHMENT_HIDDEN => true)); mapi_setprops($attach, array(PR_ATTACH_METHOD => ATTACH_EMBEDDED_MSG, PR_DISPLAY_NAME => $messageprops[PR_CONVERSATION_TOPIC], PR_ATTACHMENT_HIDDEN => true));
$sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY); $sub = mapi_attach_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, MAPI_CREATE | MAPI_MODIFY);
mapi_copyto($this->message, array(), array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_SEARCH_KEY), $outgoing); $message = !$this->isTaskRequest() ? $this->message : $this->getAssociatedTask(false);
mapi_copyto($this->message, array(), array(), $sub);
$ignoreProps = array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_SEARCH_KEY);
if (!$this->setRecipientsForResponse($outgoing, $type)) return false; mapi_copyto($message, array(), $ignoreProps, $outgoing);
mapi_copyto($message, array(), array(), $sub);
if (!$this->setRecipientsForResponse($outgoing, $type)) {
return false;
}
$props = array();
switch($type) { switch($type) {
case tdmtTaskAcc: case tdmtTaskAcc:
$messageclass = "IPM.TaskRequest.Accept"; $props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Accept";
break; break;
case tdmtTaskDec: case tdmtTaskDec:
$messageclass = "IPM.TaskRequest.Decline"; $props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Decline";
break; break;
case tdmtTaskUpd: case tdmtTaskUpd:
$messageclass = "IPM.TaskRequest.Update"; if($messageprops[$this->props['complete']]) {
$props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Complete";
} else {
$props[PR_MESSAGE_CLASS] = "IPM.TaskRequest.Update";
}
break; break;
}; };
mapi_savechanges($sub); mapi_savechanges($sub);
mapi_savechanges($attach); mapi_savechanges($attach);
// Set Body $props[PR_SUBJECT] = $prefix . $messageprops[PR_CONVERSATION_TOPIC];
$body = $this->getBody(); $props[$this->props['taskmode']] = $type;
$props[$this->props['task_assigned_time']] = time();
$props[PR_ICON_INDEX] = 0xFFFFFFFF;
mapi_setprops($outgoing, $props);
// taskCommentsInfo contains some comments which added by assignee while
// edit response before sending task response.
if ($this->taskCommentsInfo) {
$comments = $this->getTaskCommentsInfo();
$stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY); $stream = mapi_openproperty($outgoing, PR_BODY, IID_IStream, 0, MAPI_CREATE | MAPI_MODIFY);
mapi_stream_setsize($stream, strlen($body)); mapi_stream_setsize($stream, strlen($comments));
mapi_stream_write($stream, $body); mapi_stream_write($stream, $comments);
mapi_stream_commit($stream); mapi_stream_commit($stream);
}
// Set subject, taskmode, message class, icon index, response time
mapi_setprops($outgoing, array(PR_SUBJECT => $prefix . $messageprops[PR_SUBJECT],
$this->props['taskmode'] => $type,
PR_MESSAGE_CLASS => $messageclass,
PR_ICON_INDEX => 0xFFFFFFFF,
$this->props['assignedtime'] => time()));
mapi_savechanges($outgoing); mapi_savechanges($outgoing);
mapi_message_submitmessage($outgoing); mapi_message_submitmessage($outgoing);
return true; return true;
} }
...@@ -664,7 +916,8 @@ ...@@ -664,7 +916,8 @@
return false; return false;
} }
/* Creates a new TaskGlobalObjId /**
* Creates a new TaskGlobalObjId
* *
* Just 16 bytes of random data * Just 16 bytes of random data
*/ */
...@@ -677,21 +930,53 @@ ...@@ -677,21 +930,53 @@
return $goid; return $goid;
} }
/**
* Function used to get the embedded task of task request. Which further used to
* Create/Update associated task of assigner/assignee.
*
* @param object $message which contains embedded task.
* @return object|false $task if found embedded task else false
*/
function getEmbeddedTask($message) { function getEmbeddedTask($message) {
$table = mapi_message_getattachmenttable($message); $task = false;
$rows = mapi_table_queryallrows($table, array(PR_ATTACH_NUM)); $goid = mapi_getprops($message, array($this->props["task_goid"]));
$attachmentTable = mapi_message_getattachmenttable($message);
$restriction = array(RES_PROPERTY,
array(RELOP => RELOP_EQ,
ULPROPTAG => PR_ATTACH_METHOD,
VALUE => ATTACH_EMBEDDED_MSG)
);
$rows = mapi_table_queryallrows($attachmentTable, array(PR_ATTACH_NUM), $restriction);
// Assume only one attachment if(empty($rows)) {
if(empty($rows)) return $task;
return false; }
$attach = mapi_message_openattach($message, $rows[0][PR_ATTACH_NUM]); foreach ($rows as $row) {
$message = mapi_openproperty($attach, PR_ATTACH_DATA_OBJ, IID_IMessage, 0, 0); try {
$attach = mapi_message_openattach($message, $row[PR_ATTACH_NUM]);
$task = mapi_attach_openobj($attach);
} catch (MAPIException $e) {
continue;
}
return $message; $taskGoid = mapi_getprops($task, array($this->props["task_goid"]));
if($goid[$this->props["task_goid"]] === $taskGoid[$this->props["task_goid"]]) {
mapi_setprops($attach, array(PR_ATTACHMENT_HIDDEN => true));
mapi_savechanges($attach);
mapi_savechanges($message);
break;
}
}
return $task;
} }
function setLastUser() { /**
* Function was used to set the user name who has last used this task also it was
* update the tasklastdelegate and task_assigned_time.
*/
function setLastUser()
{
$delegatestore = $this->getDefaultStore(); $delegatestore = $this->getDefaultStore();
$taskstore = $this->getTaskFolderStore(); $taskstore = $this->getTaskFolderStore();
...@@ -703,10 +988,16 @@ ...@@ -703,10 +988,16 @@
// This is me (the one calling the script) // This is me (the one calling the script)
$delegate = $taskprops[PR_MAILBOX_OWNER_NAME]; $delegate = $taskprops[PR_MAILBOX_OWNER_NAME];
mapi_setprops($this->message, array($this->props["tasklastuser"] => $username, $this->props["tasklastdelegate"] => $delegate, $this->props['assignedtime'] => time())); if ($this->isTaskRequest()) {
$task = $this->getAssociatedTask(false);
mapi_setprops($task, array($this->props["tasklastuser"] => $username, $this->props["tasklastdelegate"] => $delegate, $this->props['task_assigned_time'] => time()));
mapi_savechanges($task);
}
mapi_setprops($this->message, array($this->props["tasklastuser"] => $username, $this->props["tasklastdelegate"] => $delegate, $this->props['task_assigned_time'] => time()));
} }
/** Assignee becomes the owner when a user/assignor assigns any task to someone. Also there can be more than one assignee. /**
* Assignee becomes the owner when a user/assignor assigns any task to someone. Also there can be more than one assignee.
* This function sets assignee as owner in the assignor's copy of task. * This function sets assignee as owner in the assignor's copy of task.
*/ */
function setOwnerForAssignor() function setOwnerForAssignor()
...@@ -725,7 +1016,8 @@ ...@@ -725,7 +1016,8 @@
} }
} }
/** Sets assignor as recipients in assignee's copy of task. /**
* Sets assignor as recipients in assignee's copy of task.
* *
* If assignor has requested task updates then the assignor is added as recipient type MAPI_CC. * If assignor has requested task updates then the assignor is added as recipient type MAPI_CC.
* *
...@@ -743,8 +1035,9 @@ ...@@ -743,8 +1035,9 @@
ULPROPTAG => PR_RECIPIENT_TYPE, ULPROPTAG => PR_RECIPIENT_TYPE,
VALUE => MAPI_TO VALUE => MAPI_TO
))); )));
foreach($recips as $recip) foreach($recips as $recip) {
mapi_message_modifyrecipients($task, MODRECIP_REMOVE, array($recip)); mapi_message_modifyrecipients($task, MODRECIP_REMOVE, array($recip));
}
$recips = array(); $recips = array();
$taskReqProps = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_ADDRTYPE)); $taskReqProps = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_ADDRTYPE));
...@@ -767,36 +1060,18 @@ ...@@ -767,36 +1060,18 @@
} }
// Assignor wants to receive an email report when task is mark as 'Complete', so in recipients as MAPI_BCC // Assignor wants to receive an email report when task is mark as 'Complete', so in recipients as MAPI_BCC
if (isset($associatedTaskProps[$this->props['taskupdates']]) && $associatedTaskProps[$this->props['tasksoc']]) { if ($associatedTaskProps[$this->props['tasksoc']]) {
$assignor[PR_RECIPIENT_TYPE] = MAPI_BCC; $assignor[PR_RECIPIENT_TYPE] = MAPI_BCC;
$recips[] = $assignor; $recips[] = $assignor;
} }
if (!empty($recips)) if (!empty($recips)) {
mapi_message_modifyrecipients($task, MODRECIP_ADD, $recips); mapi_message_modifyrecipients($task, MODRECIP_ADD, $recips);
} }
/** Returns user information who has task request
*/
function retrieveUserData()
{
// get user entryid
$storeProps = mapi_getprops($this->store, array(PR_USER_ENTRYID));
if (!$storeProps[PR_USER_ENTRYID]) return false;
$ab = mapi_openaddressbook($this->session);
// open the user entry
$user = mapi_ab_openentry($ab, $storeProps[PR_USER_ENTRYID]);
if (!$user) return false;
// receive userdata
$userProps = mapi_getprops($user, array(PR_DISPLAY_NAME));
if (!$userProps[PR_DISPLAY_NAME]) return false;
return $userProps;
} }
/** Deletes incoming task request from Inbox /**
* Deletes incoming task request from Inbox
* *
* @returns array returns PR_ENTRYID, PR_STORE_ENTRYID and PR_PARENT_ENTRYID of the deleted task request * @returns array returns PR_ENTRYID, PR_STORE_ENTRYID and PR_PARENT_ENTRYID of the deleted task request
*/ */
...@@ -806,17 +1081,20 @@ ...@@ -806,17 +1081,20 @@
$inbox = mapi_msgstore_getreceivefolder($store); $inbox = mapi_msgstore_getreceivefolder($store);
$storeProps = mapi_getprops($store, array(PR_IPM_WASTEBASKET_ENTRYID)); $storeProps = mapi_getprops($store, array(PR_IPM_WASTEBASKET_ENTRYID));
$props = mapi_getprops($this->message, array($this->props['taskglobalobjid'])); $props = mapi_getprops($this->message, array($this->props['task_goid']));
$globalobjid = $props[$this->props['taskglobalobjid']]; $goid = $props[$this->props['task_goid']];
// Find the task by looking for the taskglobalobjid // Find the task by looking for the task_goid
$restriction = array(RES_PROPERTY, array(RELOP => RELOP_EQ, ULPROPTAG => $this->props['taskglobalobjid'], VALUE => $globalobjid)); $restriction = array(RES_PROPERTY,
array(RELOP => RELOP_EQ,
ULPROPTAG => $this->props['task_goid'],
VALUE => $goid)
);
$contents = mapi_folder_getcontentstable($inbox); $contents = mapi_folder_getcontentstable($inbox);
$rows = mapi_table_queryallrows($contents, array(PR_ENTRYID, PR_PARENT_ENTRYID, PR_STORE_ENTRYID), $restriction); $rows = mapi_table_queryallrows($contents, array(PR_ENTRYID, PR_PARENT_ENTRYID, PR_STORE_ENTRYID), $restriction);
$taskrequest = false;
if(!empty($rows)) { if(!empty($rows)) {
// If there are multiple, just use the first // If there are multiple, just use the first
$entryid = $rows[0][PR_ENTRYID]; $entryid = $rows[0][PR_ENTRYID];
...@@ -829,18 +1107,8 @@ ...@@ -829,18 +1107,8 @@
return false; return false;
} }
/** Converts already sent task request to normal task /**
*/ * Sets recipients for the outgoing message according to type of the response.
function createUnassignedCopy()
{
mapi_deleteprops($this->message, array($this->props['taskglobalobjid']));
mapi_setprops($this->message, array($this->props['updatecount'] => 1));
// Remove all recipents
$this->deleteAllRecipients($this->message);
}
/** Sets recipients for the outgoing message according to type of the response.
* *
* If it is a task update, then only recipient type MAPI_CC are taken from the task message. * If it is a task update, then only recipient type MAPI_CC are taken from the task message.
* *
...@@ -848,26 +1116,29 @@ ...@@ -848,26 +1116,29 @@
* *
*@param $outgoing MAPI_message outgoing mapi message *@param $outgoing MAPI_message outgoing mapi message
*@param $responseType String response type *@param $responseType String response type
*@param $sendSOC Boolean true if sending complete response else false.
*/ */
function setRecipientsForResponse($outgoing, $responseType, $sendSOC = false) function setRecipientsForResponse($outgoing, $responseType)
{ {
// Clear recipients from outgoing msg // Clear recipients from outgoing msg
$this->deleteAllRecipients($outgoing); $this->deleteAllRecipients($outgoing);
// If it is a task update then get MAPI_CC recipients which are assignors who has asked for task update. // If it is a task update then get MAPI_CC recipients which are assignors who has asked for task update.
if ($responseType == tdmtTaskUpd) { if ($responseType == tdmtTaskUpd) {
$props = mapi_getprops($this->message, array($this->props['complete']));
$isComplete = $props[$this->props['complete']];
$recipTable = mapi_message_getrecipienttable($this->message); $recipTable = mapi_message_getrecipienttable($this->message);
$recips = mapi_table_queryallrows($recipTable, $this->recipprops, array(RES_PROPERTY, $recips = mapi_table_queryallrows($recipTable, $this->recipProps, array(RES_PROPERTY,
array( RELOP => RELOP_EQ, array( RELOP => RELOP_EQ,
ULPROPTAG => PR_RECIPIENT_TYPE, ULPROPTAG => PR_RECIPIENT_TYPE,
VALUE => ($sendSOC ? MAPI_BCC : MAPI_CC) VALUE => ($isComplete ? MAPI_BCC : MAPI_CC)
) )
)); ));
// No recipients found, return error // No recipients found, return error
if (empty($recips)) if (empty($recips)) {
return false; return false;
}
foreach($recips as $recip) { foreach($recips as $recip) {
$recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO $recip[PR_RECIPIENT_TYPE] = MAPI_TO; // Change recipient type to MAPI_TO
...@@ -877,127 +1148,74 @@ ...@@ -877,127 +1148,74 @@
} }
$orgprops = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SUBJECT)); $orgprops = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ADDRTYPE, PR_SENT_REPRESENTING_ENTRYID, PR_SUBJECT));
$recip = array(PR_DISPLAY_NAME => $orgprops[PR_SENT_REPRESENTING_NAME], PR_EMAIL_ADDRESS => $orgprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS], PR_ADDRTYPE => $orgprops[PR_SENT_REPRESENTING_ADDRTYPE], PR_ENTRYID => $orgprops[PR_SENT_REPRESENTING_ENTRYID], PR_RECIPIENT_TYPE => MAPI_TO); $recip = array(
PR_DISPLAY_NAME => $orgprops[PR_SENT_REPRESENTING_NAME],
PR_EMAIL_ADDRESS => $orgprops[PR_SENT_REPRESENTING_EMAIL_ADDRESS],
PR_ADDRTYPE => $orgprops[PR_SENT_REPRESENTING_ADDRTYPE],
PR_ENTRYID => $orgprops[PR_SENT_REPRESENTING_ENTRYID],
PR_RECIPIENT_TYPE => MAPI_TO);
mapi_message_modifyrecipients($outgoing, MODRECIP_ADD, array($recip)); mapi_message_modifyrecipients($outgoing, MODRECIP_ADD, array($recip));
return true; return true;
} }
/** Adds task details to message body and returns body. /**
* Deletes all recipients from given message object
* *
*@return string contructed body with task details. * @param $message MAPI message from which recipients are to be removed.
*/ */
function getBody() function deleteAllRecipients($message)
{ {
//@TODO: Fix translations $recipTable = mapi_message_getrecipienttable($message);
$recipRows = mapi_table_queryallrows($recipTable, array(PR_ROWID));
$msgProps = mapi_getprops($this->message);
$body = "";
if (isset($msgProps[PR_SUBJECT])) $body .= "\n" . _("Subject") . ":\t". $msgProps[PR_SUBJECT];
if (isset($msgProps[$this->props['startdate']])) $body .= "\n" . _("Start Date") . ":\t". strftime(_("%A, %B %d, %Y"),$msgProps[$this->props['startdate']]);
if (isset($msgProps[$this->props['duedate']])) $body .= "\n" . _("Due Date") . ":\t". strftime(_("%A, %B %d, %Y"),$msgProps[$this->props['duedate']]);
$body .= "\n";
if (isset($msgProps[$this->props['status']])) { foreach($recipRows as $recipient) {
$body .= "\n" . _("Status") . ":\t"; mapi_message_modifyrecipients($message, MODRECIP_REMOVE, array($recipient));
if ($msgProps[$this->props['status']] == 0) $body .= _("Not Started");
else if ($msgProps[$this->props['status']] == 1) $body .= _("In Progress");
else if ($msgProps[$this->props['status']] == 2) $body .= _("Complete");
else if ($msgProps[$this->props['status']] == 3) $body .= _("Wait for other person");
else if ($msgProps[$this->props['status']] == 4) $body .= _("Deferred");
} }
if (isset($msgProps[$this->props['percent_complete']])) {
$body .= "\n" . _("Percent Complete") . ":\t". ($msgProps[$this->props['percent_complete']] * 100).'%';
if ($msgProps[$this->props['percent_complete']] == 1 && isset($msgProps[$this->props['datecompleted']]))
$body .= "\n" . _("Date Completed") . ":\t". strftime("%A, %B %d, %Y",$msgProps[$this->props['datecompleted']]);
}
$body .= "\n";
if (isset($msgProps[$this->props['totalwork']])) $body .= "\n" . _("Total Work") . ":\t". ($msgProps[$this->props['totalwork']]/60) ." " . _("hours");
if (isset($msgProps[$this->props['actualwork']])) $body .= "\n" . _("Actual Work") . ":\t". ($msgProps[$this->props['actualwork']]/60) ." " . _("hours");
$body .="\n";
if (isset($msgProps[$this->props['owner']])) $body .= "\n" . _("Owner") . ":\t". $msgProps[$this->props['owner']];
$body .="\n";
if (isset($msgProps[$this->props['categories']]) && !empty($msgProps[$this->props['categories']])) $body .= "\nCategories:\t". implode(', ', $msgProps[$this->props['categories']]);
if (isset($msgProps[$this->props['companies']]) && !empty($msgProps[$this->props['companies']])) $body .= "\nCompany:\t". implode(', ', $msgProps[$this->props['companies']]);
if (isset($msgProps[$this->props['billinginformation']])) $body .= "\n" . _("Billing Information") . ":\t". $msgProps[$this->props['billinginformation']];
if (isset($msgProps[$this->props['mileage']])) $body .= "\n" . _("Mileage") . ":\t". $msgProps[$this->props['mileage']];
$body .="\n";
$content = mapi_message_openproperty($this->message, PR_BODY);
$body .= "\n". trim($content, "\0");
return $body;
} }
/** /**
* Convert from windows-1252 encoded string to UTF-8 string * Function used to mark the record to complete and send complete update
* * notification to assigner.
* The same conversion rules as utf8_to_windows1252 apply.
* *
* @see Conversion::utf8_to_windows1252() * @return boolean TRUE if the update succeeded, FALSE otherwise.
*
* @param string $string the Windows-1252 string to convert
* @return string UTF-8 representation of the string
*/ */
function windows1252_to_utf8($string) function sendCompleteUpdate()
{ {
if (function_exists("iconv")){ $messageprops = mapi_getprops($this->message, array($this->props['taskstate']));
return iconv("Windows-1252", "UTF-8//TRANSLIT", $string);
}else{
return utf8_encode($string); // no euro support here
}
}
/** Reclaims ownership of a decline task if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) {
* return false; // Can only decline assignee task
* Deletes taskrequest properties and recipients from the task message. }
*/
function reclaimownership()
{
// Delete task request properties
mapi_deleteprops($this->message, array($this->props['taskglobalobjid'],
$this->props['tasklastuser'],
$this->props['tasklastdelegate']));
mapi_setprops($this->message, array($this->props['updatecount'] => 2, mapi_setprops($this->message, array($this->props['complete'] => true,
$this->props['taskfcreator'] => true)); $this->props['datecompleted'] => time(),
$this->props['status'] => 2,
$this->props['percent_complete'] => 1));
// Delete recipients $this->doUpdate();
$this->deleteAllRecipients($this->message);
} }
/** Deletes all recipients from given message object /**
* Function returns extra info about task request comments along with message body
* which will be included in body while sending task request/response.
* *
*@param $message MAPI message from which recipients are to be removed. * @return string info about task request comments along with message body.
*/ */
function deleteAllRecipients($message) function getTaskCommentsInfo()
{ {
$recipTable = mapi_message_getrecipienttable($message); return $this->taskCommentsInfo;
$recipRows = mapi_table_queryallrows($recipTable, array(PR_ROWID));
foreach($recipRows as $recipient)
mapi_message_modifyrecipients($message, MODRECIP_REMOVE, array($recipient));
} }
function sendCompleteUpdate($prefix, $action, $prefixComplete) /**
* Function sets extra info about task request comments along with message body
* which will be included in body while sending task request/response.
*
* @param string $taskCommentsInfo info about task request comments along with message body.
*/
function setTaskCommentsInfo($taskCommentsInfo)
{ {
$messageprops = mapi_getprops($this->message, array($this->props['taskstate'])); $this->taskCommentsInfo = $taskCommentsInfo;
if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN)
return false; // Can only decline assignee task
mapi_setprops($this->message, array($this->props['complete'] => true,
$this->props['datecompleted'] => $action["dateCompleted"],
$this->props['status'] => 2,
$this->props['percent_complete'] => 1));
$this->doUpdate($prefix, $prefixComplete);
} }
} }
...@@ -35,24 +35,7 @@ ...@@ -35,24 +35,7 @@
*/ */
function makeGuid($guid) function makeGuid($guid)
{ {
// remove the { and } from the string and explode it into an array return pack("vvvv", hexdec(substr($guid, 5, 4)), hexdec(substr($guid, 1, 4)), hexdec(substr($guid, 10, 4)), hexdec(substr($guid, 15, 4))) . hex2bin(substr($guid, 20, 4)) . hex2bin(substr($guid, 25, 12));
$guidArray = explode('-', substr($guid, 1,strlen($guid)-2));
// convert to hex!
$data1[0] = intval(substr($guidArray[0], 0, 4),16); // we need to split the unsigned long
$data1[1] = intval(substr($guidArray[0], 4, 4),16);
$data2 = intval($guidArray[1], 16);
$data3 = intval($guidArray[2], 16);
$data4[0] = intval(substr($guidArray[3], 0, 2),16);
$data4[1] = intval(substr($guidArray[3], 2, 2),16);
for($i=0; $i < 6; $i++)
{
$data4[] = intval(substr($guidArray[4], $i*2, 2),16);
}
return pack("vvvvCCCCCCCC", $data1[1], $data1[0], $data2, $data3, $data4[0],$data4[1],$data4[2],$data4[3],$data4[4],$data4[5],$data4[6],$data4[7]);
} }
/** /**
...@@ -68,11 +51,9 @@ function get_mapi_error_name($errcode=null) ...@@ -68,11 +51,9 @@ function get_mapi_error_name($errcode=null)
} }
if ($errcode !== 0) { if ($errcode !== 0) {
// get_defined_constants(true) is preferred, but crashes PHP // Retrieve constants categories, MAPI error names are defined
// https://bugs.php.net/bug.php?id=61156 // in the 'user' category, since the WebApp code defines it in mapicode.php.
$allConstants = get_defined_constants(); foreach (get_defined_constants(true)['user'] as $key => $value) {
foreach ($allConstants as $key => $value) {
/** /**
* If PHP encounters a number beyond the bounds of the integer type, * If PHP encounters a number beyond the bounds of the integer type,
* it will be interpreted as a float instead, so when comparing these error codes * it will be interpreted as a float instead, so when comparing these error codes
...@@ -271,7 +252,6 @@ function getCalendarItems($store, $calendar, $viewstart, $viewend, $propsrequest ...@@ -271,7 +252,6 @@ function getCalendarItems($store, $calendar, $viewstart, $viewend, $propsrequest
// Get requested properties, plus whatever we need // Get requested properties, plus whatever we need
$proplist = array(PR_ENTRYID, $properties["recurring"], $properties["recurring_data"], $properties["timezone_data"]); $proplist = array(PR_ENTRYID, $properties["recurring"], $properties["recurring_data"], $properties["timezone_data"]);
$proplist = array_merge($proplist, $propsrequested); $proplist = array_merge($proplist, $propsrequested);
$propslist = array_unique($proplist);
$rows = mapi_table_queryallrows($table, $proplist, $restriction); $rows = mapi_table_queryallrows($table, $proplist, $restriction);
......
...@@ -34,7 +34,7 @@ define('SEVERITY_ERROR', 1); ...@@ -34,7 +34,7 @@ define('SEVERITY_ERROR', 1);
/* from winerror.h */ /* from winerror.h */
/** /**
* Function to make a error * Function to make an error
*/ */
function make_mapi_e($code) function make_mapi_e($code)
{ {
...@@ -43,7 +43,7 @@ function make_mapi_e($code) ...@@ -43,7 +43,7 @@ function make_mapi_e($code)
/** /**
* Function to make an warning * Function to make a warning
*/ */
function make_mapi_s($code) function make_mapi_s($code)
{ {
...@@ -95,11 +95,16 @@ function make_mapi_s($code) ...@@ -95,11 +95,16 @@ function make_mapi_s($code)
*/ */
define('NOERROR' ,0); define('NOERROR' ,0);
define('MAPI_E_CALL_FAILED' ,(int) 0x80004005); // The following codes don't use make_mapi_e because they are in the 0x000FF000 range,
define('MAPI_E_NOT_ENOUGH_MEMORY' ,(int) 0x8007000E); // but we cannot use the HEX value as would make most sense as that would break in 64bit PHP
define('MAPI_E_INVALID_PARAMETER' ,(int) 0x80070057); // (Kopano Core server will return a negative value, but PHP would convert this define into a positive
define('MAPI_E_INTERFACE_NOT_SUPPORTED' ,(int) 0x80004002); // value). Hence we declare the value exactly as we need it as integer and bypass the
define('MAPI_E_NO_ACCESS' ,(int) 0x80070005); // 32bit/64bit hell.
define('MAPI_E_CALL_FAILED' ,(int)-2147467259); // 0x80004005
define('MAPI_E_NOT_ENOUGH_MEMORY' ,(int)-2147024882); // 0x8007000E
define('MAPI_E_INVALID_PARAMETER' ,(int)-2147024809); // 0x80070057
define('MAPI_E_INTERFACE_NOT_SUPPORTED' ,(int)-2147467262); // 0x80004002
define('MAPI_E_NO_ACCESS' ,(int)-2147024891); // 0x80070005
define('MAPI_E_NO_SUPPORT' ,make_mapi_e(0x102)); define('MAPI_E_NO_SUPPORT' ,make_mapi_e(0x102));
define('MAPI_E_BAD_CHARWIDTH' ,make_mapi_e(0x103)); define('MAPI_E_BAD_CHARWIDTH' ,make_mapi_e(0x103));
......
...@@ -97,6 +97,11 @@ define('TABLE_SORT_ASCEND' ,(0x00000000)); ...@@ -97,6 +97,11 @@ define('TABLE_SORT_ASCEND' ,(0x00000000));
define('TABLE_SORT_DESCEND' ,(0x00000001)); define('TABLE_SORT_DESCEND' ,(0x00000001));
define('TABLE_SORT_COMBINE' ,(0x00000002)); define('TABLE_SORT_COMBINE' ,(0x00000002));
/* Bookmarks in Table */
define('BOOKMARK_BEGINNING' , 0); /* Before first row */
define('BOOKMARK_CURRENT' , 1); /* Before current row */
define('BOOKMARK_END' , 2); /* After last row */
define('MAPI_UNICODE' ,0x80000000); define('MAPI_UNICODE' ,0x80000000);
/* IMAPIFolder Interface --------------------------------------------------- */ /* IMAPIFolder Interface --------------------------------------------------- */
...@@ -634,3 +639,22 @@ define('fnevTableModified' ,0x00000100); ...@@ -634,3 +639,22 @@ define('fnevTableModified' ,0x00000100);
define('fnevStatusObjectModified' ,0x00000200); define('fnevStatusObjectModified' ,0x00000200);
define('fnevReservedForMapi' ,0x40000000); define('fnevReservedForMapi' ,0x40000000);
define('fnevExtended' ,0x80000000); define('fnevExtended' ,0x80000000);
/* PersistBlockType values PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX PersistIDs*/
define('PERSIST_SENTINEL' ,0x0000); // Indicates that the PersistData structure is the last one contained in the PidTagAdditionalRenEntryIdsEx property
define('RSF_PID_RSS_SUBSCRIPTION' ,0x8001); // Indicates that the structure contains data for the RSS Feeds folder
define('RSF_PID_SEND_AND_TRACK' ,0x8002); // Indicates that the structure contains data for the Tracked Mail Processing folder
define('RSF_PID_TODO_SEARCH' ,0x8004); // Indicates that the structure contains data for the To-Do folder
define('RSF_PID_CONV_ACTIONS' ,0x8006); // Indicates that the structure contains data for the Conversation Action Settings folder
define('RSF_PID_COMBINED_ACTIONS' ,0x8007); // This value is reserved.
define('RSF_PID_SUGGESTED_CONTACTS' ,0x8008); // Indicates that the structure contains data for the Suggested Contacts folder.
define('RSF_PID_CONTACT_SEARCH' ,0x8009); // Indicates that the structure contains data for the Contacts Search folder.
define('RSF_PID_BUDDYLIST_PDLS' ,0x800A); // Indicates that the structure contains data for the IM Contacts List folder.
define('RSF_PID_BUDDYLIST_CONTACTS' ,0x800B); // Indicates that the structure contains data for the Quick Contacts folder.
/* PersistElementType Values ElementIDs for persist data of PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX */
define('ELEMENT_SENTINEL' ,0x0000); // 0 bytes Indicates that the PersistElement structure is the last one contained in the DataElements field of the PersistData structure.
define('RSF_ELID_ENTRYID' ,0x0001); // variable Indicates that the ElementData field contains the entry ID of the special folder
// that is of the type indicated by the value of the PersistID field of the PersistData structure.
define('RSF_ELID_HEADER' ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
...@@ -37,5 +37,10 @@ define('PS_MAPI', makeguid("{00020328-0000-0000-C0 ...@@ -37,5 +37,10 @@ define('PS_MAPI', makeguid("{00020328-0000-0000-C0
define('PS_PUBLIC_STRINGS', makeguid("{00020329-0000-0000-C000-000000000046}")); define('PS_PUBLIC_STRINGS', makeguid("{00020329-0000-0000-C000-000000000046}"));
define('PS_INTERNET_HEADERS', makeguid("{00020386-0000-0000-c000-000000000046}")); define('PS_INTERNET_HEADERS', makeguid("{00020386-0000-0000-c000-000000000046}"));
define('MUIDECSAB', makeguid("{50A921AC-D340-48ee-B319-FBA753304425}"));
// Kopano Contact Provider GUIDs
define('MUIDZCSAB', makeguid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
// sk added for Z-Push // sk added for Z-Push
define ('PSETID_AirSync', makeguid("{71035549-0739-4DCB-9163-00F0580DBBDF}")); define ('PSETID_AirSync', makeguid("{71035549-0739-4DCB-9163-00F0580DBBDF}"));
...@@ -24,14 +24,10 @@ define('PR_ACKNOWLEDGEMENT_MODE' ,mapi_prop_tag(PT_LONG, ...@@ -24,14 +24,10 @@ define('PR_ACKNOWLEDGEMENT_MODE' ,mapi_prop_tag(PT_LONG,
define('PR_ALTERNATE_RECIPIENT_ALLOWED' ,mapi_prop_tag(PT_BOOLEAN, 0x0002)); define('PR_ALTERNATE_RECIPIENT_ALLOWED' ,mapi_prop_tag(PT_BOOLEAN, 0x0002));
define('PR_AUTHORIZING_USERS' ,mapi_prop_tag(PT_BINARY, 0x0003)); define('PR_AUTHORIZING_USERS' ,mapi_prop_tag(PT_BINARY, 0x0003));
define('PR_AUTO_FORWARD_COMMENT' ,mapi_prop_tag(PT_TSTRING, 0x0004)); define('PR_AUTO_FORWARD_COMMENT' ,mapi_prop_tag(PT_TSTRING, 0x0004));
define('PR_AUTO_FORWARD_COMMENT_W' ,mapi_prop_tag(PT_UNICODE, 0x0004));
define('PR_AUTO_FORWARD_COMMENT_A' ,mapi_prop_tag(PT_STRING8, 0x0004));
define('PR_AUTO_FORWARDED' ,mapi_prop_tag(PT_BOOLEAN, 0x0005)); define('PR_AUTO_FORWARDED' ,mapi_prop_tag(PT_BOOLEAN, 0x0005));
define('PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID' ,mapi_prop_tag(PT_BINARY, 0x0006)); define('PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID' ,mapi_prop_tag(PT_BINARY, 0x0006));
define('PR_CONTENT_CORRELATOR' ,mapi_prop_tag(PT_BINARY, 0x0007)); define('PR_CONTENT_CORRELATOR' ,mapi_prop_tag(PT_BINARY, 0x0007));
define('PR_CONTENT_IDENTIFIER' ,mapi_prop_tag(PT_TSTRING, 0x0008)); define('PR_CONTENT_IDENTIFIER' ,mapi_prop_tag(PT_TSTRING, 0x0008));
define('PR_CONTENT_IDENTIFIER_W' ,mapi_prop_tag(PT_UNICODE, 0x0008));
define('PR_CONTENT_IDENTIFIER_A' ,mapi_prop_tag(PT_STRING8, 0x0008));
define('PR_CONTENT_LENGTH' ,mapi_prop_tag(PT_LONG, 0x0009)); define('PR_CONTENT_LENGTH' ,mapi_prop_tag(PT_LONG, 0x0009));
define('PR_CONTENT_RETURN_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x000A)); define('PR_CONTENT_RETURN_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x000A));
...@@ -43,6 +39,7 @@ define('PR_CONVERSION_EITS' ,mapi_prop_tag(PT_BINARY, ...@@ -43,6 +39,7 @@ define('PR_CONVERSION_EITS' ,mapi_prop_tag(PT_BINARY,
define('PR_CONVERSION_WITH_LOSS_PROHIBITED' ,mapi_prop_tag(PT_BOOLEAN, 0x000D)); define('PR_CONVERSION_WITH_LOSS_PROHIBITED' ,mapi_prop_tag(PT_BOOLEAN, 0x000D));
define('PR_CONVERTED_EITS' ,mapi_prop_tag(PT_BINARY, 0x000E)); define('PR_CONVERTED_EITS' ,mapi_prop_tag(PT_BINARY, 0x000E));
define('PR_DEFERRED_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x000F)); define('PR_DEFERRED_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x000F));
define('PR_DEFERRED_SEND_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x3FEF));
define('PR_DELIVER_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0010)); define('PR_DELIVER_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0010));
define('PR_DISCARD_REASON' ,mapi_prop_tag(PT_LONG, 0x0011)); define('PR_DISCARD_REASON' ,mapi_prop_tag(PT_LONG, 0x0011));
define('PR_DISCLOSURE_OF_RECIPIENTS' ,mapi_prop_tag(PT_BOOLEAN, 0x0012)); define('PR_DISCLOSURE_OF_RECIPIENTS' ,mapi_prop_tag(PT_BOOLEAN, 0x0012));
...@@ -54,8 +51,6 @@ define('PR_IMPORTANCE' ,mapi_prop_tag(PT_LONG, ...@@ -54,8 +51,6 @@ define('PR_IMPORTANCE' ,mapi_prop_tag(PT_LONG,
define('PR_IPM_ID' ,mapi_prop_tag(PT_BINARY, 0x0018)); define('PR_IPM_ID' ,mapi_prop_tag(PT_BINARY, 0x0018));
define('PR_LATEST_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0019)); define('PR_LATEST_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0019));
define('PR_MESSAGE_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x001A)); define('PR_MESSAGE_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x001A));
define('PR_MESSAGE_CLASS_W' ,mapi_prop_tag(PT_UNICODE, 0x001A));
define('PR_MESSAGE_CLASS_A' ,mapi_prop_tag(PT_STRING8, 0x001A));
define('PR_MESSAGE_DELIVERY_ID' ,mapi_prop_tag(PT_BINARY, 0x001B)); define('PR_MESSAGE_DELIVERY_ID' ,mapi_prop_tag(PT_BINARY, 0x001B));
...@@ -82,8 +77,6 @@ define('PR_REDIRECTION_HISTORY' ,mapi_prop_tag(PT_BINARY, ...@@ -82,8 +77,6 @@ define('PR_REDIRECTION_HISTORY' ,mapi_prop_tag(PT_BINARY,
define('PR_RELATED_IPMS' ,mapi_prop_tag(PT_BINARY, 0x002D)); define('PR_RELATED_IPMS' ,mapi_prop_tag(PT_BINARY, 0x002D));
define('PR_ORIGINAL_SENSITIVITY' ,mapi_prop_tag(PT_LONG, 0x002E)); define('PR_ORIGINAL_SENSITIVITY' ,mapi_prop_tag(PT_LONG, 0x002E));
define('PR_LANGUAGES' ,mapi_prop_tag(PT_TSTRING, 0x002F)); define('PR_LANGUAGES' ,mapi_prop_tag(PT_TSTRING, 0x002F));
define('PR_LANGUAGES_W' ,mapi_prop_tag(PT_UNICODE, 0x002F));
define('PR_LANGUAGES_A' ,mapi_prop_tag(PT_STRING8, 0x002F));
define('PR_REPLY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0030)); define('PR_REPLY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0030));
define('PR_REPORT_TAG' ,mapi_prop_tag(PT_BINARY, 0x0031)); define('PR_REPORT_TAG' ,mapi_prop_tag(PT_BINARY, 0x0031));
define('PR_REPORT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0032)); define('PR_REPORT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0032));
...@@ -92,51 +85,31 @@ define('PR_SECURITY' ,mapi_prop_tag(PT_LONG, ...@@ -92,51 +85,31 @@ define('PR_SECURITY' ,mapi_prop_tag(PT_LONG,
define('PR_INCOMPLETE_COPY' ,mapi_prop_tag(PT_BOOLEAN, 0x0035)); define('PR_INCOMPLETE_COPY' ,mapi_prop_tag(PT_BOOLEAN, 0x0035));
define('PR_SENSITIVITY' ,mapi_prop_tag(PT_LONG, 0x0036)); define('PR_SENSITIVITY' ,mapi_prop_tag(PT_LONG, 0x0036));
define('PR_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0037)); define('PR_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0037));
define('PR_SUBJECT_W' ,mapi_prop_tag(PT_UNICODE, 0x0037));
define('PR_SUBJECT_A' ,mapi_prop_tag(PT_STRING8, 0x0037));
define('PR_SUBJECT_IPM' ,mapi_prop_tag(PT_BINARY, 0x0038)); define('PR_SUBJECT_IPM' ,mapi_prop_tag(PT_BINARY, 0x0038));
define('PR_CLIENT_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0039)); define('PR_CLIENT_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0039));
define('PR_REPORT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x003A)); define('PR_REPORT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x003A));
define('PR_REPORT_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x003A));
define('PR_REPORT_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x003A));
define('PR_SENT_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x003B)); define('PR_SENT_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x003B));
define('PR_X400_CONTENT_TYPE' ,mapi_prop_tag(PT_BINARY, 0x003C)); define('PR_X400_CONTENT_TYPE' ,mapi_prop_tag(PT_BINARY, 0x003C));
define('PR_SUBJECT_PREFIX' ,mapi_prop_tag(PT_TSTRING, 0x003D)); define('PR_SUBJECT_PREFIX' ,mapi_prop_tag(PT_TSTRING, 0x003D));
define('PR_SUBJECT_PREFIX_W' ,mapi_prop_tag(PT_UNICODE, 0x003D));
define('PR_SUBJECT_PREFIX_A' ,mapi_prop_tag(PT_STRING8, 0x003D));
define('PR_NON_RECEIPT_REASON' ,mapi_prop_tag(PT_LONG, 0x003E)); define('PR_NON_RECEIPT_REASON' ,mapi_prop_tag(PT_LONG, 0x003E));
define('PR_RECEIVED_BY_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x003F)); define('PR_RECEIVED_BY_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x003F));
define('PR_RECEIVED_BY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0040)); define('PR_RECEIVED_BY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0040));
define('PR_RECEIVED_BY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x0040));
define('PR_RECEIVED_BY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x0040));
define('PR_SENT_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0041)); define('PR_SENT_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0041));
define('PR_SENT_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0042)); define('PR_SENT_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0042));
define('PR_SENT_REPRESENTING_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x0042));
define('PR_SENT_REPRESENTING_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x0042));
define('PR_RCVD_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0043)); define('PR_RCVD_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0043));
define('PR_RCVD_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0044)); define('PR_RCVD_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0044));
define('PR_RCVD_REPRESENTING_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x0044));
define('PR_RCVD_REPRESENTING_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x0044));
define('PR_REPORT_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0045)); define('PR_REPORT_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0045));
define('PR_READ_RECEIPT_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0046)); define('PR_READ_RECEIPT_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0046));
define('PR_MESSAGE_SUBMISSION_ID' ,mapi_prop_tag(PT_BINARY, 0x0047)); define('PR_MESSAGE_SUBMISSION_ID' ,mapi_prop_tag(PT_BINARY, 0x0047));
define('PR_PROVIDER_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0048)); define('PR_PROVIDER_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0048));
define('PR_ORIGINAL_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0049)); define('PR_ORIGINAL_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0049));
define('PR_ORIGINAL_SUBJECT_W' ,mapi_prop_tag(PT_UNICODE, 0x0049));
define('PR_ORIGINAL_SUBJECT_A' ,mapi_prop_tag(PT_STRING8, 0x0049));
define('PR_DISC_VAL' ,mapi_prop_tag(PT_BOOLEAN, 0x004A)); define('PR_DISC_VAL' ,mapi_prop_tag(PT_BOOLEAN, 0x004A));
define('PR_ORIG_MESSAGE_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x004B)); define('PR_ORIG_MESSAGE_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x004B));
define('PR_ORIG_MESSAGE_CLASS_W' ,mapi_prop_tag(PT_UNICODE, 0x004B));
define('PR_ORIG_MESSAGE_CLASS_A' ,mapi_prop_tag(PT_STRING8, 0x004B));
define('PR_ORIGINAL_AUTHOR_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x004C)); define('PR_ORIGINAL_AUTHOR_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x004C));
define('PR_ORIGINAL_AUTHOR_NAME' ,mapi_prop_tag(PT_TSTRING, 0x004D)); define('PR_ORIGINAL_AUTHOR_NAME' ,mapi_prop_tag(PT_TSTRING, 0x004D));
define('PR_ORIGINAL_AUTHOR_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x004D));
define('PR_ORIGINAL_AUTHOR_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x004D));
define('PR_ORIGINAL_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x004E)); define('PR_ORIGINAL_SUBMIT_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x004E));
define('PR_REPLY_RECIPIENT_ENTRIES' ,mapi_prop_tag(PT_BINARY, 0x004F)); define('PR_REPLY_RECIPIENT_ENTRIES' ,mapi_prop_tag(PT_BINARY, 0x004F));
define('PR_REPLY_RECIPIENT_NAMES' ,mapi_prop_tag(PT_TSTRING, 0x0050)); define('PR_REPLY_RECIPIENT_NAMES' ,mapi_prop_tag(PT_TSTRING, 0x0050));
define('PR_REPLY_RECIPIENT_NAMES_W' ,mapi_prop_tag(PT_UNICODE, 0x0050));
define('PR_REPLY_RECIPIENT_NAMES_A' ,mapi_prop_tag(PT_STRING8, 0x0050));
define('PR_RECEIVED_BY_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0051)); define('PR_RECEIVED_BY_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0051));
define('PR_RCVD_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0052)); define('PR_RCVD_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0052));
...@@ -150,13 +123,9 @@ define('PR_MESSAGE_CC_ME' ,mapi_prop_tag(PT_BOOLEAN, ...@@ -150,13 +123,9 @@ define('PR_MESSAGE_CC_ME' ,mapi_prop_tag(PT_BOOLEAN,
define('PR_MESSAGE_RECIP_ME' ,mapi_prop_tag(PT_BOOLEAN, 0x0059)); define('PR_MESSAGE_RECIP_ME' ,mapi_prop_tag(PT_BOOLEAN, 0x0059));
define('PR_ORIGINAL_SENDER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x005A)); define('PR_ORIGINAL_SENDER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x005A));
define('PR_ORIGINAL_SENDER_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x005A));
define('PR_ORIGINAL_SENDER_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x005A));
define('PR_ORIGINAL_SENDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x005B)); define('PR_ORIGINAL_SENDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x005B));
define('PR_ORIGINAL_SENDER_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x005C)); define('PR_ORIGINAL_SENDER_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x005C));
define('PR_ORIGINAL_SENT_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x005D)); define('PR_ORIGINAL_SENT_REPRESENTING_NAME' ,mapi_prop_tag(PT_TSTRING, 0x005D));
define('PR_ORIGINAL_SENT_REPRESENTING_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x005D));
define('PR_ORIGINAL_SENT_REPRESENTING_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x005D));
define('PR_ORIGINAL_SENT_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x005E)); define('PR_ORIGINAL_SENT_REPRESENTING_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x005E));
define('PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x005F)); define('PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x005F));
...@@ -166,72 +135,34 @@ define('PR_OWNER_APPT_ID' ,mapi_prop_tag(PT_LONG, ...@@ -166,72 +135,34 @@ define('PR_OWNER_APPT_ID' ,mapi_prop_tag(PT_LONG,
define('PR_RESPONSE_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0063)); define('PR_RESPONSE_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0063));
define('PR_SENT_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0064)); define('PR_SENT_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0064));
define('PR_SENT_REPRESENTING_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0064));
define('PR_SENT_REPRESENTING_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0064));
define('PR_SENT_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0065)); define('PR_SENT_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0065));
define('PR_SENT_REPRESENTING_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x0065));
define('PR_SENT_REPRESENTING_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x0065));
define('PR_ORIGINAL_SENDER_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0066)); define('PR_ORIGINAL_SENDER_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0066));
define('PR_ORIGINAL_SENDER_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0066));
define('PR_ORIGINAL_SENDER_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0066));
define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0067)); define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0067));
define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x0067));
define('PR_ORIGINAL_SENDER_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x0067));
define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0068)); define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0068));
define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0068));
define('PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0068));
define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0069)); define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0069));
define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_W',mapi_prop_tag(PT_UNICODE, 0x0069));
define('PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS_A',mapi_prop_tag(PT_STRING8, 0x0069));
define('PR_CONVERSATION_TOPIC' ,mapi_prop_tag(PT_TSTRING, 0x0070)); define('PR_CONVERSATION_TOPIC' ,mapi_prop_tag(PT_TSTRING, 0x0070));
define('PR_CONVERSATION_TOPIC_W' ,mapi_prop_tag(PT_UNICODE, 0x0070));
define('PR_CONVERSATION_TOPIC_A' ,mapi_prop_tag(PT_STRING8, 0x0070));
define('PR_CONVERSATION_INDEX' ,mapi_prop_tag(PT_BINARY, 0x0071)); define('PR_CONVERSATION_INDEX' ,mapi_prop_tag(PT_BINARY, 0x0071));
define('PR_ORIGINAL_DISPLAY_BCC' ,mapi_prop_tag(PT_TSTRING, 0x0072)); define('PR_ORIGINAL_DISPLAY_BCC' ,mapi_prop_tag(PT_TSTRING, 0x0072));
define('PR_ORIGINAL_DISPLAY_BCC_W' ,mapi_prop_tag(PT_UNICODE, 0x0072));
define('PR_ORIGINAL_DISPLAY_BCC_A' ,mapi_prop_tag(PT_STRING8, 0x0072));
define('PR_ORIGINAL_DISPLAY_CC' ,mapi_prop_tag(PT_TSTRING, 0x0073)); define('PR_ORIGINAL_DISPLAY_CC' ,mapi_prop_tag(PT_TSTRING, 0x0073));
define('PR_ORIGINAL_DISPLAY_CC_W' ,mapi_prop_tag(PT_UNICODE, 0x0073));
define('PR_ORIGINAL_DISPLAY_CC_A' ,mapi_prop_tag(PT_STRING8, 0x0073));
define('PR_ORIGINAL_DISPLAY_TO' ,mapi_prop_tag(PT_TSTRING, 0x0074)); define('PR_ORIGINAL_DISPLAY_TO' ,mapi_prop_tag(PT_TSTRING, 0x0074));
define('PR_ORIGINAL_DISPLAY_TO_W' ,mapi_prop_tag(PT_UNICODE, 0x0074));
define('PR_ORIGINAL_DISPLAY_TO_A' ,mapi_prop_tag(PT_STRING8, 0x0074));
define('PR_RECEIVED_BY_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0075)); define('PR_RECEIVED_BY_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0075));
define('PR_RECEIVED_BY_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0075));
define('PR_RECEIVED_BY_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0075));
define('PR_RECEIVED_BY_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0076)); define('PR_RECEIVED_BY_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0076));
define('PR_RECEIVED_BY_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x0076));
define('PR_RECEIVED_BY_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x0076));
define('PR_RCVD_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0077)); define('PR_RCVD_REPRESENTING_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0077));
define('PR_RCVD_REPRESENTING_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0077));
define('PR_RCVD_REPRESENTING_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0077));
define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0078)); define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0078));
define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x0078));
define('PR_RCVD_REPRESENTING_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x0078));
define('PR_ORIGINAL_AUTHOR_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0079)); define('PR_ORIGINAL_AUTHOR_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0079));
define('PR_ORIGINAL_AUTHOR_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0079));
define('PR_ORIGINAL_AUTHOR_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0079));
define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x007A)); define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x007A));
define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x007A));
define('PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x007A));
define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x007B)); define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x007B));
define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x007B));
define('PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x007B));
define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x007C)); define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x007C));
define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x007C));
define('PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x007C));
define('PR_TRANSPORT_MESSAGE_HEADERS' ,mapi_prop_tag(PT_TSTRING, 0x007D)); define('PR_TRANSPORT_MESSAGE_HEADERS' ,mapi_prop_tag(PT_TSTRING, 0x007D));
define('PR_TRANSPORT_MESSAGE_HEADERS_W' ,mapi_prop_tag(PT_UNICODE, 0x007D));
define('PR_TRANSPORT_MESSAGE_HEADERS_A' ,mapi_prop_tag(PT_STRING8, 0x007D));
define('PR_DELEGATION' ,mapi_prop_tag(PT_BINARY, 0x007E)); define('PR_DELEGATION' ,mapi_prop_tag(PT_BINARY, 0x007E));
...@@ -251,18 +182,13 @@ define('PR_COLLECTOR' ,mapi_prop_tag(PT_OBJECT, ...@@ -251,18 +182,13 @@ define('PR_COLLECTOR' ,mapi_prop_tag(PT_OBJECT,
define('PR_SMTP_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x39FE)); define('PR_SMTP_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x39FE));
/* /*
* Message content properties * Message content properties
*/ */
define('PR_BODY' ,mapi_prop_tag(PT_TSTRING, 0x1000)); define('PR_BODY' ,mapi_prop_tag(PT_TSTRING, 0x1000));
define('PR_HTML' ,mapi_prop_tag(PT_BINARY, 0x1013)); define('PR_HTML' ,mapi_prop_tag(PT_BINARY, 0x1013));
define('PR_BODY_W' ,mapi_prop_tag(PT_UNICODE, 0x1000));
define('PR_BODY_A' ,mapi_prop_tag(PT_STRING8, 0x1000));
define('PR_REPORT_TEXT' ,mapi_prop_tag(PT_TSTRING, 0x1001)); define('PR_REPORT_TEXT' ,mapi_prop_tag(PT_TSTRING, 0x1001));
define('PR_REPORT_TEXT_W' ,mapi_prop_tag(PT_UNICODE, 0x1001));
define('PR_REPORT_TEXT_A' ,mapi_prop_tag(PT_STRING8, 0x1001));
define('PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY' ,mapi_prop_tag(PT_BINARY, 0x1002)); define('PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY' ,mapi_prop_tag(PT_BINARY, 0x1002));
define('PR_REPORTING_DL_NAME' ,mapi_prop_tag(PT_BINARY, 0x1003)); define('PR_REPORTING_DL_NAME' ,mapi_prop_tag(PT_BINARY, 0x1003));
define('PR_REPORTING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x1004)); define('PR_REPORTING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x1004));
...@@ -272,8 +198,6 @@ define('PR_REPORTING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, ...@@ -272,8 +198,6 @@ define('PR_REPORTING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY,
define('PR_RTF_SYNC_BODY_CRC' ,mapi_prop_tag(PT_LONG, 0x1006)); define('PR_RTF_SYNC_BODY_CRC' ,mapi_prop_tag(PT_LONG, 0x1006));
define('PR_RTF_SYNC_BODY_COUNT' ,mapi_prop_tag(PT_LONG, 0x1007)); define('PR_RTF_SYNC_BODY_COUNT' ,mapi_prop_tag(PT_LONG, 0x1007));
define('PR_RTF_SYNC_BODY_TAG' ,mapi_prop_tag(PT_TSTRING, 0x1008)); define('PR_RTF_SYNC_BODY_TAG' ,mapi_prop_tag(PT_TSTRING, 0x1008));
define('PR_RTF_SYNC_BODY_TAG_W' ,mapi_prop_tag(PT_UNICODE, 0x1008));
define('PR_RTF_SYNC_BODY_TAG_A' ,mapi_prop_tag(PT_STRING8, 0x1008));
define('PR_RTF_COMPRESSED' ,mapi_prop_tag(PT_BINARY, 0x1009)); define('PR_RTF_COMPRESSED' ,mapi_prop_tag(PT_BINARY, 0x1009));
define('PR_RTF_SYNC_PREFIX_COUNT' ,mapi_prop_tag(PT_LONG, 0x1010)); define('PR_RTF_SYNC_PREFIX_COUNT' ,mapi_prop_tag(PT_LONG, 0x1010));
define('PR_RTF_SYNC_TRAILING_COUNT' ,mapi_prop_tag(PT_LONG, 0x1011)); define('PR_RTF_SYNC_TRAILING_COUNT' ,mapi_prop_tag(PT_LONG, 0x1011));
...@@ -313,27 +237,17 @@ define('PR_PROOF_OF_DELIVERY' ,mapi_prop_tag(PT_BINARY, ...@@ -313,27 +237,17 @@ define('PR_PROOF_OF_DELIVERY' ,mapi_prop_tag(PT_BINARY,
define('PR_PROOF_OF_DELIVERY_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0C12)); define('PR_PROOF_OF_DELIVERY_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0C12));
define('PR_RECIPIENT_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x0C13)); define('PR_RECIPIENT_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x0C13));
define('PR_RECIPIENT_NUMBER_FOR_ADVICE' ,mapi_prop_tag(PT_TSTRING, 0x0C14)); define('PR_RECIPIENT_NUMBER_FOR_ADVICE' ,mapi_prop_tag(PT_TSTRING, 0x0C14));
define('PR_RECIPIENT_NUMBER_FOR_ADVICE_W' ,mapi_prop_tag(PT_UNICODE, 0x0C14));
define('PR_RECIPIENT_NUMBER_FOR_ADVICE_A' ,mapi_prop_tag(PT_STRING8, 0x0C14));
define('PR_RECIPIENT_TYPE' ,mapi_prop_tag(PT_LONG, 0x0C15)); define('PR_RECIPIENT_TYPE' ,mapi_prop_tag(PT_LONG, 0x0C15));
define('PR_REGISTERED_MAIL_TYPE' ,mapi_prop_tag(PT_LONG, 0x0C16)); define('PR_REGISTERED_MAIL_TYPE' ,mapi_prop_tag(PT_LONG, 0x0C16));
define('PR_REPLY_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0C17)); define('PR_REPLY_REQUESTED' ,mapi_prop_tag(PT_BOOLEAN, 0x0C17));
define('PR_REQUESTED_DELIVERY_METHOD' ,mapi_prop_tag(PT_LONG, 0x0C18)); define('PR_REQUESTED_DELIVERY_METHOD' ,mapi_prop_tag(PT_LONG, 0x0C18));
define('PR_SENDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0C19)); define('PR_SENDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x0C19));
define('PR_SENDER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0C1A)); define('PR_SENDER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x0C1A));
define('PR_SENDER_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x0C1A));
define('PR_SENDER_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x0C1A));
define('PR_SUPPLEMENTARY_INFO' ,mapi_prop_tag(PT_TSTRING, 0x0C1B)); define('PR_SUPPLEMENTARY_INFO' ,mapi_prop_tag(PT_TSTRING, 0x0C1B));
define('PR_SUPPLEMENTARY_INFO_W' ,mapi_prop_tag(PT_UNICODE, 0x0C1B));
define('PR_SUPPLEMENTARY_INFO_A' ,mapi_prop_tag(PT_STRING8, 0x0C1B));
define('PR_TYPE_OF_MTS_USER' ,mapi_prop_tag(PT_LONG, 0x0C1C)); define('PR_TYPE_OF_MTS_USER' ,mapi_prop_tag(PT_LONG, 0x0C1C));
define('PR_SENDER_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0C1D)); define('PR_SENDER_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x0C1D));
define('PR_SENDER_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0C1E)); define('PR_SENDER_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x0C1E));
define('PR_SENDER_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x0C1E));
define('PR_SENDER_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x0C1E));
define('PR_SENDER_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0C1F)); define('PR_SENDER_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x0C1F));
define('PR_SENDER_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x0C1F));
define('PR_SENDER_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x0C1F));
/* /*
* Message non-transmittable properties * Message non-transmittable properties
...@@ -350,17 +264,9 @@ define('PR_SENDER_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, ...@@ -350,17 +264,9 @@ define('PR_SENDER_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8,
define('PR_CURRENT_VERSION' ,mapi_prop_tag(PT_I8, 0x0E00)); define('PR_CURRENT_VERSION' ,mapi_prop_tag(PT_I8, 0x0E00));
define('PR_DELETE_AFTER_SUBMIT' ,mapi_prop_tag(PT_BOOLEAN, 0x0E01)); define('PR_DELETE_AFTER_SUBMIT' ,mapi_prop_tag(PT_BOOLEAN, 0x0E01));
define('PR_DISPLAY_BCC' ,mapi_prop_tag(PT_TSTRING, 0x0E02)); define('PR_DISPLAY_BCC' ,mapi_prop_tag(PT_TSTRING, 0x0E02));
define('PR_DISPLAY_BCC_W' ,mapi_prop_tag(PT_UNICODE, 0x0E02));
define('PR_DISPLAY_BCC_A' ,mapi_prop_tag(PT_STRING8, 0x0E02));
define('PR_DISPLAY_CC' ,mapi_prop_tag(PT_TSTRING, 0x0E03)); define('PR_DISPLAY_CC' ,mapi_prop_tag(PT_TSTRING, 0x0E03));
define('PR_DISPLAY_CC_W' ,mapi_prop_tag(PT_UNICODE, 0x0E03));
define('PR_DISPLAY_CC_A' ,mapi_prop_tag(PT_STRING8, 0x0E03));
define('PR_DISPLAY_TO' ,mapi_prop_tag(PT_TSTRING, 0x0E04)); define('PR_DISPLAY_TO' ,mapi_prop_tag(PT_TSTRING, 0x0E04));
define('PR_DISPLAY_TO_W' ,mapi_prop_tag(PT_UNICODE, 0x0E04));
define('PR_DISPLAY_TO_A' ,mapi_prop_tag(PT_STRING8, 0x0E04));
define('PR_PARENT_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x0E05)); define('PR_PARENT_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x0E05));
define('PR_PARENT_DISPLAY_W' ,mapi_prop_tag(PT_UNICODE, 0x0E05));
define('PR_PARENT_DISPLAY_A' ,mapi_prop_tag(PT_STRING8, 0x0E05));
define('PR_MESSAGE_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0E06)); define('PR_MESSAGE_DELIVERY_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x0E06));
define('PR_MESSAGE_FLAGS' ,mapi_prop_tag(PT_LONG, 0x0E07)); define('PR_MESSAGE_FLAGS' ,mapi_prop_tag(PT_LONG, 0x0E07));
define('PR_MESSAGE_SIZE' ,mapi_prop_tag(PT_LONG, 0x0E08)); define('PR_MESSAGE_SIZE' ,mapi_prop_tag(PT_LONG, 0x0E08));
...@@ -385,8 +291,6 @@ define('PR_MODIFY_VERSION' ,mapi_prop_tag(PT_I8, ...@@ -385,8 +291,6 @@ define('PR_MODIFY_VERSION' ,mapi_prop_tag(PT_I8,
define('PR_HASATTACH' ,mapi_prop_tag(PT_BOOLEAN, 0x0E1B)); define('PR_HASATTACH' ,mapi_prop_tag(PT_BOOLEAN, 0x0E1B));
define('PR_BODY_CRC' ,mapi_prop_tag(PT_LONG, 0x0E1C)); define('PR_BODY_CRC' ,mapi_prop_tag(PT_LONG, 0x0E1C));
define('PR_NORMALIZED_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0E1D)); define('PR_NORMALIZED_SUBJECT' ,mapi_prop_tag(PT_TSTRING, 0x0E1D));
define('PR_NORMALIZED_SUBJECT_W' ,mapi_prop_tag(PT_UNICODE, 0x0E1D));
define('PR_NORMALIZED_SUBJECT_A' ,mapi_prop_tag(PT_STRING8, 0x0E1D));
define('PR_RTF_IN_SYNC' ,mapi_prop_tag(PT_BOOLEAN, 0x0E1F)); define('PR_RTF_IN_SYNC' ,mapi_prop_tag(PT_BOOLEAN, 0x0E1F));
define('PR_ATTACH_SIZE' ,mapi_prop_tag(PT_LONG, 0x0E20)); define('PR_ATTACH_SIZE' ,mapi_prop_tag(PT_LONG, 0x0E20));
define('PR_ATTACH_NUM' ,mapi_prop_tag(PT_LONG, 0x0E21)); define('PR_ATTACH_NUM' ,mapi_prop_tag(PT_LONG, 0x0E21));
...@@ -397,6 +301,7 @@ define('PR_PREPROCESS' ,mapi_prop_tag(PT_BOOLEAN, ...@@ -397,6 +301,7 @@ define('PR_PREPROCESS' ,mapi_prop_tag(PT_BOOLEAN,
define('PR_ORIGINATING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x0E25)); define('PR_ORIGINATING_MTA_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x0E25));
define('PR_PROOF_OF_SUBMISSION' ,mapi_prop_tag(PT_BINARY, 0x0E26)); define('PR_PROOF_OF_SUBMISSION' ,mapi_prop_tag(PT_BINARY, 0x0E26));
define('PR_TODO_ITEM_FLAGS' ,mapi_prop_tag(PT_LONG, 0x0E2B));
/* /*
* The range of non-message and non-recipient property IDs (0x3000 - 0x3FFF)); is * The range of non-message and non-recipient property IDs (0x3000 - 0x3FFF)); is
...@@ -453,27 +358,15 @@ define('PR_ACCESS' ,mapi_prop_tag(PT_LONG, ...@@ -453,27 +358,15 @@ define('PR_ACCESS' ,mapi_prop_tag(PT_LONG,
define('PR_ROWID' ,mapi_prop_tag(PT_LONG, 0x3000)); define('PR_ROWID' ,mapi_prop_tag(PT_LONG, 0x3000));
define('PR_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3001)); define('PR_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3001));
define('PR_DISPLAY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3001));
define('PR_DISPLAY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3001));
define('PR_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x3002)); define('PR_ADDRTYPE' ,mapi_prop_tag(PT_TSTRING, 0x3002));
define('PR_ADDRTYPE_W' ,mapi_prop_tag(PT_UNICODE, 0x3002));
define('PR_ADDRTYPE_A' ,mapi_prop_tag(PT_STRING8, 0x3002));
define('PR_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3003)); define('PR_EMAIL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3003));
define('PR_EMAIL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x3003));
define('PR_EMAIL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x3003));
define('PR_COMMENT' ,mapi_prop_tag(PT_TSTRING, 0x3004)); define('PR_COMMENT' ,mapi_prop_tag(PT_TSTRING, 0x3004));
define('PR_COMMENT_W' ,mapi_prop_tag(PT_UNICODE, 0x3004));
define('PR_COMMENT_A' ,mapi_prop_tag(PT_STRING8, 0x3004));
define('PR_DEPTH' ,mapi_prop_tag(PT_LONG, 0x3005)); define('PR_DEPTH' ,mapi_prop_tag(PT_LONG, 0x3005));
define('PR_PROVIDER_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x3006)); define('PR_PROVIDER_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x3006));
define('PR_PROVIDER_DISPLAY_W' ,mapi_prop_tag(PT_UNICODE, 0x3006));
define('PR_PROVIDER_DISPLAY_A' ,mapi_prop_tag(PT_STRING8, 0x3006));
define('PR_CREATION_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x3007)); define('PR_CREATION_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x3007));
define('PR_LAST_MODIFICATION_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x3008)); define('PR_LAST_MODIFICATION_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x3008));
define('PR_RESOURCE_FLAGS' ,mapi_prop_tag(PT_LONG, 0x3009)); define('PR_RESOURCE_FLAGS' ,mapi_prop_tag(PT_LONG, 0x3009));
define('PR_PROVIDER_DLL_NAME' ,mapi_prop_tag(PT_TSTRING, 0x300A)); define('PR_PROVIDER_DLL_NAME' ,mapi_prop_tag(PT_TSTRING, 0x300A));
define('PR_PROVIDER_DLL_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x300A));
define('PR_PROVIDER_DLL_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x300A));
define('PR_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x300B)); define('PR_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x300B));
define('PR_PROVIDER_UID' ,mapi_prop_tag(PT_BINARY, 0x300C)); define('PR_PROVIDER_UID' ,mapi_prop_tag(PT_BINARY, 0x300C));
define('PR_PROVIDER_ORDINAL' ,mapi_prop_tag(PT_LONG, 0x300D)); define('PR_PROVIDER_ORDINAL' ,mapi_prop_tag(PT_LONG, 0x300D));
...@@ -482,23 +375,13 @@ define('PR_PROVIDER_ORDINAL' ,mapi_prop_tag(PT_LONG, ...@@ -482,23 +375,13 @@ define('PR_PROVIDER_ORDINAL' ,mapi_prop_tag(PT_LONG,
* MAPI Form properties * MAPI Form properties
*/ */
define('PR_FORM_VERSION' ,mapi_prop_tag(PT_TSTRING, 0x3301)); define('PR_FORM_VERSION' ,mapi_prop_tag(PT_TSTRING, 0x3301));
define('PR_FORM_VERSION_W' ,mapi_prop_tag(PT_UNICODE, 0x3301));
define('PR_FORM_VERSION_A' ,mapi_prop_tag(PT_STRING8, 0x3301));
define('PR_FORM_CLSID' ,mapi_prop_tag(PT_CLSID, 0x3302)); define('PR_FORM_CLSID' ,mapi_prop_tag(PT_CLSID, 0x3302));
define('PR_FORM_CONTACT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3303)); define('PR_FORM_CONTACT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3303));
define('PR_FORM_CONTACT_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3303));
define('PR_FORM_CONTACT_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3303));
define('PR_FORM_CATEGORY' ,mapi_prop_tag(PT_TSTRING, 0x3304)); define('PR_FORM_CATEGORY' ,mapi_prop_tag(PT_TSTRING, 0x3304));
define('PR_FORM_CATEGORY_W' ,mapi_prop_tag(PT_UNICODE, 0x3304));
define('PR_FORM_CATEGORY_A' ,mapi_prop_tag(PT_STRING8, 0x3304));
define('PR_FORM_CATEGORY_SUB' ,mapi_prop_tag(PT_TSTRING, 0x3305)); define('PR_FORM_CATEGORY_SUB' ,mapi_prop_tag(PT_TSTRING, 0x3305));
define('PR_FORM_CATEGORY_SUB_W' ,mapi_prop_tag(PT_UNICODE, 0x3305));
define('PR_FORM_CATEGORY_SUB_A' ,mapi_prop_tag(PT_STRING8, 0x3305));
define('PR_FORM_HOST_MAP' ,mapi_prop_tag(PT_MV_LONG, 0x3306)); define('PR_FORM_HOST_MAP' ,mapi_prop_tag(PT_MV_LONG, 0x3306));
define('PR_FORM_HIDDEN' ,mapi_prop_tag(PT_BOOLEAN, 0x3307)); define('PR_FORM_HIDDEN' ,mapi_prop_tag(PT_BOOLEAN, 0x3307));
define('PR_FORM_DESIGNER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3308)); define('PR_FORM_DESIGNER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3308));
define('PR_FORM_DESIGNER_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3308));
define('PR_FORM_DESIGNER_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3308));
define('PR_FORM_DESIGNER_GUID' ,mapi_prop_tag(PT_CLSID, 0x3309)); define('PR_FORM_DESIGNER_GUID' ,mapi_prop_tag(PT_CLSID, 0x3309));
define('PR_FORM_MESSAGE_BEHAVIOR' ,mapi_prop_tag(PT_LONG, 0x330A)); define('PR_FORM_MESSAGE_BEHAVIOR' ,mapi_prop_tag(PT_LONG, 0x330A));
...@@ -548,8 +431,6 @@ define('PR_SELECTABLE' ,mapi_prop_tag(PT_BOOLEAN, ...@@ -548,8 +431,6 @@ define('PR_SELECTABLE' ,mapi_prop_tag(PT_BOOLEAN,
define('PR_SUBFOLDERS' ,mapi_prop_tag(PT_BOOLEAN, 0x360A)); define('PR_SUBFOLDERS' ,mapi_prop_tag(PT_BOOLEAN, 0x360A));
define('PR_STATUS' ,mapi_prop_tag(PT_LONG, 0x360B)); define('PR_STATUS' ,mapi_prop_tag(PT_LONG, 0x360B));
define('PR_ANR' ,mapi_prop_tag(PT_TSTRING, 0x360C)); define('PR_ANR' ,mapi_prop_tag(PT_TSTRING, 0x360C));
define('PR_ANR_W' ,mapi_prop_tag(PT_UNICODE, 0x360C));
define('PR_ANR_A' ,mapi_prop_tag(PT_STRING8, 0x360C));
define('PR_CONTENTS_SORT_ORDER' ,mapi_prop_tag(PT_MV_LONG, 0x360D)); define('PR_CONTENTS_SORT_ORDER' ,mapi_prop_tag(PT_MV_LONG, 0x360D));
define('PR_CONTAINER_HIERARCHY' ,mapi_prop_tag(PT_OBJECT, 0x360E)); define('PR_CONTAINER_HIERARCHY' ,mapi_prop_tag(PT_OBJECT, 0x360E));
define('PR_CONTAINER_CONTENTS' ,mapi_prop_tag(PT_OBJECT, 0x360F)); define('PR_CONTAINER_CONTENTS' ,mapi_prop_tag(PT_OBJECT, 0x360F));
...@@ -557,8 +438,6 @@ define('PR_FOLDER_ASSOCIATED_CONTENTS' ,mapi_prop_tag(PT_OBJECT, ...@@ -557,8 +438,6 @@ define('PR_FOLDER_ASSOCIATED_CONTENTS' ,mapi_prop_tag(PT_OBJECT,
define('PR_DEF_CREATE_DL' ,mapi_prop_tag(PT_BINARY, 0x3611)); define('PR_DEF_CREATE_DL' ,mapi_prop_tag(PT_BINARY, 0x3611));
define('PR_DEF_CREATE_MAILUSER' ,mapi_prop_tag(PT_BINARY, 0x3612)); define('PR_DEF_CREATE_MAILUSER' ,mapi_prop_tag(PT_BINARY, 0x3612));
define('PR_CONTAINER_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x3613)); define('PR_CONTAINER_CLASS' ,mapi_prop_tag(PT_TSTRING, 0x3613));
define('PR_CONTAINER_CLASS_W' ,mapi_prop_tag(PT_UNICODE, 0x3613));
define('PR_CONTAINER_CLASS_A' ,mapi_prop_tag(PT_STRING8, 0x3613));
define('PR_CONTAINER_MODIFY_VERSION' ,mapi_prop_tag(PT_I8, 0x3614)); define('PR_CONTAINER_MODIFY_VERSION' ,mapi_prop_tag(PT_I8, 0x3614));
define('PR_AB_PROVIDER_ID' ,mapi_prop_tag(PT_BINARY, 0x3615)); define('PR_AB_PROVIDER_ID' ,mapi_prop_tag(PT_BINARY, 0x3615));
define('PR_DEFAULT_VIEW_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3616)); define('PR_DEFAULT_VIEW_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3616));
...@@ -577,34 +456,19 @@ define('PR_ATTACHMENT_X400_PARAMETERS' ,mapi_prop_tag(PT_BINARY, ...@@ -577,34 +456,19 @@ define('PR_ATTACHMENT_X400_PARAMETERS' ,mapi_prop_tag(PT_BINARY,
define('PR_ATTACH_DATA_OBJ' ,mapi_prop_tag(PT_OBJECT, 0x3701)); define('PR_ATTACH_DATA_OBJ' ,mapi_prop_tag(PT_OBJECT, 0x3701));
define('PR_ATTACH_DATA_BIN' ,mapi_prop_tag(PT_BINARY, 0x3701)); define('PR_ATTACH_DATA_BIN' ,mapi_prop_tag(PT_BINARY, 0x3701));
define('PR_ATTACH_CONTENT_ID' ,mapi_prop_tag(PT_STRING8, 0x3712)); define('PR_ATTACH_CONTENT_ID' ,mapi_prop_tag(PT_STRING8, 0x3712));
define('PR_ATTACH_CONTENT_ID_W' ,mapi_prop_tag(PT_UNICODE, 0x3712));
define('PR_ATTACH_CONTENT_LOCATION' ,mapi_prop_tag(PT_STRING8, 0x3713)); define('PR_ATTACH_CONTENT_LOCATION' ,mapi_prop_tag(PT_STRING8, 0x3713));
define('PR_ATTACH_ENCODING' ,mapi_prop_tag(PT_BINARY, 0x3702)); define('PR_ATTACH_ENCODING' ,mapi_prop_tag(PT_BINARY, 0x3702));
define('PR_ATTACH_EXTENSION' ,mapi_prop_tag(PT_TSTRING, 0x3703)); define('PR_ATTACH_EXTENSION' ,mapi_prop_tag(PT_TSTRING, 0x3703));
define('PR_ATTACH_EXTENSION_W' ,mapi_prop_tag(PT_UNICODE, 0x3703));
define('PR_ATTACH_EXTENSION_A' ,mapi_prop_tag(PT_STRING8, 0x3703));
define('PR_ATTACH_FILENAME' ,mapi_prop_tag(PT_TSTRING, 0x3704)); define('PR_ATTACH_FILENAME' ,mapi_prop_tag(PT_TSTRING, 0x3704));
define('PR_ATTACH_FILENAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3704));
define('PR_ATTACH_FILENAME_A' ,mapi_prop_tag(PT_STRING8, 0x3704));
define('PR_ATTACH_METHOD' ,mapi_prop_tag(PT_LONG, 0x3705)); define('PR_ATTACH_METHOD' ,mapi_prop_tag(PT_LONG, 0x3705));
define('PR_ATTACH_LONG_FILENAME' ,mapi_prop_tag(PT_TSTRING, 0x3707)); define('PR_ATTACH_LONG_FILENAME' ,mapi_prop_tag(PT_TSTRING, 0x3707));
define('PR_ATTACH_LONG_FILENAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3707));
define('PR_ATTACH_LONG_FILENAME_A' ,mapi_prop_tag(PT_STRING8, 0x3707));
define('PR_ATTACH_PATHNAME' ,mapi_prop_tag(PT_TSTRING, 0x3708)); define('PR_ATTACH_PATHNAME' ,mapi_prop_tag(PT_TSTRING, 0x3708));
define('PR_ATTACH_PATHNAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3708));
define('PR_ATTACH_PATHNAME_A' ,mapi_prop_tag(PT_STRING8, 0x3708));
define('PR_ATTACH_RENDERING' ,mapi_prop_tag(PT_BINARY, 0x3709)); define('PR_ATTACH_RENDERING' ,mapi_prop_tag(PT_BINARY, 0x3709));
define('PR_ATTACH_TAG' ,mapi_prop_tag(PT_BINARY, 0x370A)); define('PR_ATTACH_TAG' ,mapi_prop_tag(PT_BINARY, 0x370A));
define('PR_RENDERING_POSITION' ,mapi_prop_tag(PT_LONG, 0x370B)); define('PR_RENDERING_POSITION' ,mapi_prop_tag(PT_LONG, 0x370B));
define('PR_ATTACH_TRANSPORT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x370C)); define('PR_ATTACH_TRANSPORT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x370C));
define('PR_ATTACH_TRANSPORT_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x370C));
define('PR_ATTACH_TRANSPORT_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x370C));
define('PR_ATTACH_LONG_PATHNAME' ,mapi_prop_tag(PT_TSTRING, 0x370D)); define('PR_ATTACH_LONG_PATHNAME' ,mapi_prop_tag(PT_TSTRING, 0x370D));
define('PR_ATTACH_LONG_PATHNAME_W' ,mapi_prop_tag(PT_UNICODE, 0x370D));
define('PR_ATTACH_LONG_PATHNAME_A' ,mapi_prop_tag(PT_STRING8, 0x370D));
define('PR_ATTACH_MIME_TAG' ,mapi_prop_tag(PT_TSTRING, 0x370E)); define('PR_ATTACH_MIME_TAG' ,mapi_prop_tag(PT_TSTRING, 0x370E));
define('PR_ATTACH_MIME_TAG_W' ,mapi_prop_tag(PT_UNICODE, 0x370E));
define('PR_ATTACH_MIME_TAG_A' ,mapi_prop_tag(PT_STRING8, 0x370E));
define('PR_ATTACH_ADDITIONAL_INFO' ,mapi_prop_tag(PT_BINARY, 0x370F)); define('PR_ATTACH_ADDITIONAL_INFO' ,mapi_prop_tag(PT_BINARY, 0x370F));
define('PR_ATTACHMENT_FLAGS' ,mapi_prop_tag(PT_LONG, 0x7FFD)); define('PR_ATTACHMENT_FLAGS' ,mapi_prop_tag(PT_LONG, 0x7FFD));
define('PR_ATTACHMENT_HIDDEN' ,mapi_prop_tag(PT_BOOLEAN, 0x7FFE)); define('PR_ATTACHMENT_HIDDEN' ,mapi_prop_tag(PT_BOOLEAN, 0x7FFE));
...@@ -628,123 +492,49 @@ define('PR_PRIMARY_CAPABILITY' ,mapi_prop_tag(PT_BINARY, ...@@ -628,123 +492,49 @@ define('PR_PRIMARY_CAPABILITY' ,mapi_prop_tag(PT_BINARY,
*/ */
define('PR_7BIT_DISPLAY_NAME' ,mapi_prop_tag(PT_STRING8, 0x39FF)); define('PR_7BIT_DISPLAY_NAME' ,mapi_prop_tag(PT_STRING8, 0x39FF));
define('PR_ACCOUNT' ,mapi_prop_tag(PT_TSTRING, 0x3A00)); define('PR_ACCOUNT' ,mapi_prop_tag(PT_TSTRING, 0x3A00));
define('PR_ACCOUNT_W' ,mapi_prop_tag(PT_UNICODE, 0x3A00));
define('PR_ACCOUNT_A' ,mapi_prop_tag(PT_STRING8, 0x3A00));
define('PR_ALTERNATE_RECIPIENT' ,mapi_prop_tag(PT_BINARY, 0x3A01)); define('PR_ALTERNATE_RECIPIENT' ,mapi_prop_tag(PT_BINARY, 0x3A01));
define('PR_CALLBACK_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A02)); define('PR_CALLBACK_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A02));
define('PR_CALLBACK_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A02));
define('PR_CALLBACK_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A02));
define('PR_CONVERSION_PROHIBITED' ,mapi_prop_tag(PT_BOOLEAN, 0x3A03)); define('PR_CONVERSION_PROHIBITED' ,mapi_prop_tag(PT_BOOLEAN, 0x3A03));
define('PR_DISCLOSE_RECIPIENTS' ,mapi_prop_tag(PT_BOOLEAN, 0x3A04)); define('PR_DISCLOSE_RECIPIENTS' ,mapi_prop_tag(PT_BOOLEAN, 0x3A04));
define('PR_GENERATION' ,mapi_prop_tag(PT_TSTRING, 0x3A05)); define('PR_GENERATION' ,mapi_prop_tag(PT_TSTRING, 0x3A05));
define('PR_GENERATION_W' ,mapi_prop_tag(PT_UNICODE, 0x3A05));
define('PR_GENERATION_A' ,mapi_prop_tag(PT_STRING8, 0x3A05));
define('PR_GIVEN_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A06)); define('PR_GIVEN_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A06));
define('PR_GIVEN_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A06));
define('PR_GIVEN_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A06));
define('PR_GOVERNMENT_ID_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A07)); define('PR_GOVERNMENT_ID_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A07));
define('PR_GOVERNMENT_ID_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A07));
define('PR_GOVERNMENT_ID_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A07));
define('PR_BUSINESS_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A08)); define('PR_BUSINESS_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A08));
define('PR_BUSINESS_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A08));
define('PR_BUSINESS_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A08));
define('PR_OFFICE_TELEPHONE_NUMBER' ,PR_BUSINESS_TELEPHONE_NUMBER); define('PR_OFFICE_TELEPHONE_NUMBER' ,PR_BUSINESS_TELEPHONE_NUMBER);
define('PR_OFFICE_TELEPHONE_NUMBER_W' ,PR_BUSINESS_TELEPHONE_NUMBER_W);
define('PR_OFFICE_TELEPHONE_NUMBER_A' ,PR_BUSINESS_TELEPHONE_NUMBER_A);
define('PR_HOME_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A09)); define('PR_HOME_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A09));
define('PR_HOME_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A09));
define('PR_HOME_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A09));
define('PR_INITIALS' ,mapi_prop_tag(PT_TSTRING, 0x3A0A)); define('PR_INITIALS' ,mapi_prop_tag(PT_TSTRING, 0x3A0A));
define('PR_INITIALS_W' ,mapi_prop_tag(PT_UNICODE, 0x3A0A));
define('PR_INITIALS_A' ,mapi_prop_tag(PT_STRING8, 0x3A0A));
define('PR_KEYWORD' ,mapi_prop_tag(PT_TSTRING, 0x3A0B)); define('PR_KEYWORD' ,mapi_prop_tag(PT_TSTRING, 0x3A0B));
define('PR_KEYWORD_W' ,mapi_prop_tag(PT_UNICODE, 0x3A0B));
define('PR_KEYWORD_A' ,mapi_prop_tag(PT_STRING8, 0x3A0B));
define('PR_LANGUAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A0C)); define('PR_LANGUAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A0C));
define('PR_LANGUAGE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A0C));
define('PR_LANGUAGE_A' ,mapi_prop_tag(PT_STRING8, 0x3A0C));
define('PR_LOCATION' ,mapi_prop_tag(PT_TSTRING, 0x3A0D)); define('PR_LOCATION' ,mapi_prop_tag(PT_TSTRING, 0x3A0D));
define('PR_LOCATION_W' ,mapi_prop_tag(PT_UNICODE, 0x3A0D));
define('PR_LOCATION_A' ,mapi_prop_tag(PT_STRING8, 0x3A0D));
define('PR_MAIL_PERMISSION' ,mapi_prop_tag(PT_BOOLEAN, 0x3A0E)); define('PR_MAIL_PERMISSION' ,mapi_prop_tag(PT_BOOLEAN, 0x3A0E));
define('PR_MHS_COMMON_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A0F)); define('PR_MHS_COMMON_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A0F));
define('PR_MHS_COMMON_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A0F));
define('PR_MHS_COMMON_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A0F));
define('PR_ORGANIZATIONAL_ID_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A10)); define('PR_ORGANIZATIONAL_ID_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A10));
define('PR_ORGANIZATIONAL_ID_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A10));
define('PR_ORGANIZATIONAL_ID_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A10));
define('PR_SURNAME' ,mapi_prop_tag(PT_TSTRING, 0x3A11)); define('PR_SURNAME' ,mapi_prop_tag(PT_TSTRING, 0x3A11));
define('PR_SURNAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A11));
define('PR_SURNAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A11));
define('PR_ORIGINAL_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3A12)); define('PR_ORIGINAL_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3A12));
define('PR_ORIGINAL_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A13)); define('PR_ORIGINAL_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A13));
define('PR_ORIGINAL_DISPLAY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A13));
define('PR_ORIGINAL_DISPLAY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A13));
define('PR_ORIGINAL_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x3A14)); define('PR_ORIGINAL_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x3A14));
define('PR_POSTAL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3A15)); define('PR_POSTAL_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3A15));
define('PR_POSTAL_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x3A15));
define('PR_POSTAL_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x3A15));
define('PR_COMPANY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A16)); define('PR_COMPANY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A16));
define('PR_COMPANY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A16));
define('PR_COMPANY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A16));
define('PR_TITLE' ,mapi_prop_tag(PT_TSTRING, 0x3A17)); define('PR_TITLE' ,mapi_prop_tag(PT_TSTRING, 0x3A17));
define('PR_TITLE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A17));
define('PR_TITLE_A' ,mapi_prop_tag(PT_STRING8, 0x3A17));
define('PR_DEPARTMENT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A18)); define('PR_DEPARTMENT_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A18));
define('PR_DEPARTMENT_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A18));
define('PR_DEPARTMENT_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A18));
define('PR_OFFICE_LOCATION' ,mapi_prop_tag(PT_TSTRING, 0x3A19)); define('PR_OFFICE_LOCATION' ,mapi_prop_tag(PT_TSTRING, 0x3A19));
define('PR_OFFICE_LOCATION_W' ,mapi_prop_tag(PT_UNICODE, 0x3A19));
define('PR_OFFICE_LOCATION_A' ,mapi_prop_tag(PT_STRING8, 0x3A19));
define('PR_PRIMARY_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1A)); define('PR_PRIMARY_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1A));
define('PR_PRIMARY_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1A));
define('PR_PRIMARY_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1A));
define('PR_BUSINESS2_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1B)); define('PR_BUSINESS2_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1B));
define('PR_BUSINESS2_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1B));
define('PR_BUSINESS2_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1B));
define('PR_OFFICE2_TELEPHONE_NUMBER' ,PR_BUSINESS2_TELEPHONE_NUMBER); define('PR_OFFICE2_TELEPHONE_NUMBER' ,PR_BUSINESS2_TELEPHONE_NUMBER);
define('PR_OFFICE2_TELEPHONE_NUMBER_W' ,PR_BUSINESS2_TELEPHONE_NUMBER_W);
define('PR_OFFICE2_TELEPHONE_NUMBER_A' ,PR_BUSINESS2_TELEPHONE_NUMBER_A);
define('PR_MOBILE_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1C)); define('PR_MOBILE_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1C));
define('PR_MOBILE_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1C));
define('PR_MOBILE_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1C));
define('PR_CELLULAR_TELEPHONE_NUMBER' ,PR_MOBILE_TELEPHONE_NUMBER); define('PR_CELLULAR_TELEPHONE_NUMBER' ,PR_MOBILE_TELEPHONE_NUMBER);
define('PR_CELLULAR_TELEPHONE_NUMBER_W' ,PR_MOBILE_TELEPHONE_NUMBER_W);
define('PR_CELLULAR_TELEPHONE_NUMBER_A' ,PR_MOBILE_TELEPHONE_NUMBER_A);
define('PR_RADIO_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1D)); define('PR_RADIO_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1D));
define('PR_RADIO_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1D));
define('PR_RADIO_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1D));
define('PR_CAR_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1E)); define('PR_CAR_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1E));
define('PR_CAR_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1E));
define('PR_CAR_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1E));
define('PR_OTHER_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1F)); define('PR_OTHER_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A1F));
define('PR_OTHER_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A1F));
define('PR_OTHER_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A1F));
define('PR_TRANSMITABLE_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A20)); define('PR_TRANSMITABLE_DISPLAY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A20));
define('PR_TRANSMITABLE_DISPLAY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A20));
define('PR_TRANSMITABLE_DISPLAY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A20));
define('PR_PAGER_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A21)); define('PR_PAGER_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A21));
define('PR_PAGER_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A21));
define('PR_PAGER_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A21));
define('PR_BEEPER_TELEPHONE_NUMBER' ,PR_PAGER_TELEPHONE_NUMBER); define('PR_BEEPER_TELEPHONE_NUMBER' ,PR_PAGER_TELEPHONE_NUMBER);
define('PR_BEEPER_TELEPHONE_NUMBER_W' ,PR_PAGER_TELEPHONE_NUMBER_W);
define('PR_BEEPER_TELEPHONE_NUMBER_A' ,PR_PAGER_TELEPHONE_NUMBER_A);
define('PR_USER_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x3A22)); define('PR_USER_CERTIFICATE' ,mapi_prop_tag(PT_BINARY, 0x3A22));
define('PR_PRIMARY_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A23)); define('PR_PRIMARY_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A23));
define('PR_PRIMARY_FAX_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A23));
define('PR_PRIMARY_FAX_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A23));
define('PR_BUSINESS_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A24)); define('PR_BUSINESS_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A24));
define('PR_BUSINESS_FAX_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A24));
define('PR_BUSINESS_FAX_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A24));
define('PR_HOME_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A25)); define('PR_HOME_FAX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A25));
define('PR_HOME_FAX_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A25));
define('PR_HOME_FAX_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A25));
define('PR_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A26)); define('PR_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A26));
define('PR_COUNTRY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A26));
define('PR_COUNTRY_A' ,mapi_prop_tag(PT_STRING8, 0x3A26));
define('PR_BUSINESS_ADDRESS_COUNTRY' ,PR_COUNTRY); define('PR_BUSINESS_ADDRESS_COUNTRY' ,PR_COUNTRY);
define('PR_BUSINESS_ADDRESS_COUNTRY_W' ,PR_COUNTRY_W);
define('PR_BUSINESS_ADDRESS_COUNTRY_A' ,PR_COUNTRY_A);
define('PR_FLAG_STATUS' ,mapi_prop_tag(PT_LONG, 0x1090)); define('PR_FLAG_STATUS' ,mapi_prop_tag(PT_LONG, 0x1090));
define('PR_FLAG_COMPLETE_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x1091)); define('PR_FLAG_COMPLETE_TIME' ,mapi_prop_tag(PT_SYSTIME, 0x1091));
...@@ -752,193 +542,103 @@ define('PR_FLAG_ICON' ,mapi_prop_tag(PT_LONG, ...@@ -752,193 +542,103 @@ define('PR_FLAG_ICON' ,mapi_prop_tag(PT_LONG,
define('PR_BLOCK_STATUS' ,mapi_prop_tag(PT_LONG, 0x1096)); define('PR_BLOCK_STATUS' ,mapi_prop_tag(PT_LONG, 0x1096));
define('PR_LOCALITY' ,mapi_prop_tag(PT_TSTRING, 0x3A27)); define('PR_LOCALITY' ,mapi_prop_tag(PT_TSTRING, 0x3A27));
define('PR_LOCALITY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A27));
define('PR_LOCALITY_A' ,mapi_prop_tag(PT_STRING8, 0x3A27));
define('PR_BUSINESS_ADDRESS_CITY' ,PR_LOCALITY); define('PR_BUSINESS_ADDRESS_CITY' ,PR_LOCALITY);
define('PR_BUSINESS_ADDRESS_CITY_W' ,PR_LOCALITY_W);
define('PR_BUSINESS_ADDRESS_CITY_A' ,PR_LOCALITY_A);
define('PR_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A28)); define('PR_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A28));
define('PR_STATE_OR_PROVINCE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A28));
define('PR_STATE_OR_PROVINCE_A' ,mapi_prop_tag(PT_STRING8, 0x3A28));
define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE' ,PR_STATE_OR_PROVINCE); define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE' ,PR_STATE_OR_PROVINCE);
define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_W' ,PR_STATE_OR_PROVINCE_W);
define('PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_A' ,PR_STATE_OR_PROVINCE_A);
define('PR_STREET_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3A29)); define('PR_STREET_ADDRESS' ,mapi_prop_tag(PT_TSTRING, 0x3A29));
define('PR_STREET_ADDRESS_W' ,mapi_prop_tag(PT_UNICODE, 0x3A29));
define('PR_STREET_ADDRESS_A' ,mapi_prop_tag(PT_STRING8, 0x3A29));
define('PR_BUSINESS_ADDRESS_STREET' ,PR_STREET_ADDRESS); define('PR_BUSINESS_ADDRESS_STREET' ,PR_STREET_ADDRESS);
define('PR_BUSINESS_ADDRESS_STREET_W' ,PR_STREET_ADDRESS_W);
define('PR_BUSINESS_ADDRESS_STREET_A' ,PR_STREET_ADDRESS_A);
define('PR_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A2A)); define('PR_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A2A));
define('PR_POSTAL_CODE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2A));
define('PR_POSTAL_CODE_A' ,mapi_prop_tag(PT_STRING8, 0x3A2A));
define('PR_BUSINESS_ADDRESS_POSTAL_CODE' ,PR_POSTAL_CODE); define('PR_BUSINESS_ADDRESS_POSTAL_CODE' ,PR_POSTAL_CODE);
define('PR_BUSINESS_ADDRESS_POSTAL_CODE_W' ,PR_POSTAL_CODE_W);
define('PR_BUSINESS_ADDRESS_POSTAL_CODE_A' ,PR_POSTAL_CODE_A);
define('PR_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A2B)); define('PR_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A2B));
define('PR_POST_OFFICE_BOX_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2B));
define('PR_POST_OFFICE_BOX_A' ,mapi_prop_tag(PT_STRING8, 0x3A2B));
define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX' ,PR_POST_OFFICE_BOX); define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX' ,PR_POST_OFFICE_BOX);
define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_W' ,PR_POST_OFFICE_BOX_W);
define('PR_BUSINESS_ADDRESS_POST_OFFICE_BOX_A' ,PR_POST_OFFICE_BOX_A);
define('PR_TELEX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2C)); define('PR_TELEX_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2C));
define('PR_TELEX_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2C));
define('PR_TELEX_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A2C));
define('PR_ISDN_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2D)); define('PR_ISDN_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2D));
define('PR_ISDN_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2D));
define('PR_ISDN_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A2D));
define('PR_ASSISTANT_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2E)); define('PR_ASSISTANT_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2E));
define('PR_ASSISTANT_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2E));
define('PR_ASSISTANT_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A2E));
define('PR_HOME2_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2F)); define('PR_HOME2_TELEPHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A2F));
define('PR_HOME2_TELEPHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A2F));
define('PR_HOME2_TELEPHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A2F));
define('PR_ASSISTANT' ,mapi_prop_tag(PT_TSTRING, 0x3A30)); define('PR_ASSISTANT' ,mapi_prop_tag(PT_TSTRING, 0x3A30));
define('PR_ASSISTANT_W' ,mapi_prop_tag(PT_UNICODE, 0x3A30));
define('PR_ASSISTANT_A' ,mapi_prop_tag(PT_STRING8, 0x3A30));
define('PR_SEND_RICH_INFO' ,mapi_prop_tag(PT_BOOLEAN, 0x3A40)); define('PR_SEND_RICH_INFO' ,mapi_prop_tag(PT_BOOLEAN, 0x3A40));
define('PR_WEDDING_ANNIVERSARY' ,mapi_prop_tag(PT_SYSTIME, 0x3A41)); define('PR_WEDDING_ANNIVERSARY' ,mapi_prop_tag(PT_SYSTIME, 0x3A41));
define('PR_BIRTHDAY' ,mapi_prop_tag(PT_SYSTIME, 0x3A42)); define('PR_BIRTHDAY' ,mapi_prop_tag(PT_SYSTIME, 0x3A42));
define('PR_HOBBIES' ,mapi_prop_tag(PT_TSTRING, 0x3A43)); define('PR_HOBBIES' ,mapi_prop_tag(PT_TSTRING, 0x3A43));
define('PR_HOBBIES_W' ,mapi_prop_tag(PT_UNICODE, 0x3A43));
define('PR_HOBBIES_A' ,mapi_prop_tag(PT_STRING8, 0x3A43));
define('PR_MIDDLE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A44)); define('PR_MIDDLE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A44));
define('PR_MIDDLE_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A44));
define('PR_MIDDLE_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A44));
define('PR_DISPLAY_NAME_PREFIX' ,mapi_prop_tag(PT_TSTRING, 0x3A45)); define('PR_DISPLAY_NAME_PREFIX' ,mapi_prop_tag(PT_TSTRING, 0x3A45));
define('PR_DISPLAY_NAME_PREFIX_W' ,mapi_prop_tag(PT_UNICODE, 0x3A45));
define('PR_DISPLAY_NAME_PREFIX_A' ,mapi_prop_tag(PT_STRING8, 0x3A45));
define('PR_PROFESSION' ,mapi_prop_tag(PT_TSTRING, 0x3A46)); define('PR_PROFESSION' ,mapi_prop_tag(PT_TSTRING, 0x3A46));
define('PR_PROFESSION_W' ,mapi_prop_tag(PT_UNICODE, 0x3A46));
define('PR_PROFESSION_A' ,mapi_prop_tag(PT_STRING8, 0x3A46));
define('PR_PREFERRED_BY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A47)); define('PR_PREFERRED_BY_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A47));
define('PR_PREFERRED_BY_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A47));
define('PR_PREFERRED_BY_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A47));
define('PR_SPOUSE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A48)); define('PR_SPOUSE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A48));
define('PR_SPOUSE_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A48));
define('PR_SPOUSE_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A48));
define('PR_COMPUTER_NETWORK_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A49)); define('PR_COMPUTER_NETWORK_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A49));
define('PR_COMPUTER_NETWORK_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A49));
define('PR_COMPUTER_NETWORK_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A49));
define('PR_CUSTOMER_ID' ,mapi_prop_tag(PT_TSTRING, 0x3A4A)); define('PR_CUSTOMER_ID' ,mapi_prop_tag(PT_TSTRING, 0x3A4A));
define('PR_CUSTOMER_ID_W' ,mapi_prop_tag(PT_UNICODE, 0x3A4A));
define('PR_CUSTOMER_ID_A' ,mapi_prop_tag(PT_STRING8, 0x3A4A));
define('PR_TTYTDD_PHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A4B)); define('PR_TTYTDD_PHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A4B));
define('PR_TTYTDD_PHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A4B));
define('PR_TTYTDD_PHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A4B));
define('PR_FTP_SITE' ,mapi_prop_tag(PT_TSTRING, 0x3A4C)); define('PR_FTP_SITE' ,mapi_prop_tag(PT_TSTRING, 0x3A4C));
define('PR_FTP_SITE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A4C));
define('PR_FTP_SITE_A' ,mapi_prop_tag(PT_STRING8, 0x3A4C));
define('PR_GENDER' ,mapi_prop_tag(PT_SHORT, 0x3A4D)); define('PR_GENDER' ,mapi_prop_tag(PT_SHORT, 0x3A4D));
define('PR_MANAGER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A4E)); define('PR_MANAGER_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3A4E));
define('PR_MANAGER_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A4E));
define('PR_MANAGER_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A4E));
define('PR_NICKNAME' ,mapi_prop_tag(PT_TSTRING, 0x3A4F)); define('PR_NICKNAME' ,mapi_prop_tag(PT_TSTRING, 0x3A4F));
define('PR_NICKNAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3A4F));
define('PR_NICKNAME_A' ,mapi_prop_tag(PT_STRING8, 0x3A4F));
define('PR_PERSONAL_HOME_PAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A50)); define('PR_PERSONAL_HOME_PAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A50));
define('PR_PERSONAL_HOME_PAGE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A50));
define('PR_PERSONAL_HOME_PAGE_A' ,mapi_prop_tag(PT_STRING8, 0x3A50));
define('PR_BUSINESS_HOME_PAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A51)); define('PR_BUSINESS_HOME_PAGE' ,mapi_prop_tag(PT_TSTRING, 0x3A51));
define('PR_BUSINESS_HOME_PAGE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A51));
define('PR_BUSINESS_HOME_PAGE_A' ,mapi_prop_tag(PT_STRING8, 0x3A51));
define('PR_CONTACT_VERSION' ,mapi_prop_tag(PT_CLSID, 0x3A52)); define('PR_CONTACT_VERSION' ,mapi_prop_tag(PT_CLSID, 0x3A52));
define('PR_CONTACT_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x3A53)); define('PR_CONTACT_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x3A53));
define('PR_CONTACT_ADDRTYPES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A54)); define('PR_CONTACT_ADDRTYPES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A54));
define('PR_CONTACT_ADDRTYPES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x3A54));
define('PR_CONTACT_ADDRTYPES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x3A54));
define('PR_CONTACT_DEFAULT_ADDRESS_INDEX' ,mapi_prop_tag(PT_LONG, 0x3A55)); define('PR_CONTACT_DEFAULT_ADDRESS_INDEX' ,mapi_prop_tag(PT_LONG, 0x3A55));
define('PR_CONTACT_EMAIL_ADDRESSES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A56)); define('PR_CONTACT_EMAIL_ADDRESSES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A56));
define('PR_CONTACT_EMAIL_ADDRESSES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x3A56));
define('PR_CONTACT_EMAIL_ADDRESSES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x3A56));
define('PR_ATTACHMENT_CONTACTPHOTO' ,mapi_prop_tag(PT_BOOLEAN, 0x7FFF)); define('PR_ATTACHMENT_CONTACTPHOTO' ,mapi_prop_tag(PT_BOOLEAN, 0x7FFF));
define('PR_COMPANY_MAIN_PHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A57)); define('PR_COMPANY_MAIN_PHONE_NUMBER' ,mapi_prop_tag(PT_TSTRING, 0x3A57));
define('PR_COMPANY_MAIN_PHONE_NUMBER_W' ,mapi_prop_tag(PT_UNICODE, 0x3A57));
define('PR_COMPANY_MAIN_PHONE_NUMBER_A' ,mapi_prop_tag(PT_STRING8, 0x3A57));
define('PR_CHILDRENS_NAMES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A58)); define('PR_CHILDRENS_NAMES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3A58));
define('PR_CHILDRENS_NAMES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x3A58));
define('PR_CHILDRENS_NAMES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x3A58));
define('PR_HOME_ADDRESS_CITY' ,mapi_prop_tag(PT_TSTRING, 0x3A59)); define('PR_HOME_ADDRESS_CITY' ,mapi_prop_tag(PT_TSTRING, 0x3A59));
define('PR_HOME_ADDRESS_CITY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A59));
define('PR_HOME_ADDRESS_CITY_A' ,mapi_prop_tag(PT_STRING8, 0x3A59));
define('PR_HOME_ADDRESS_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A5A)); define('PR_HOME_ADDRESS_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A5A));
define('PR_HOME_ADDRESS_COUNTRY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5A));
define('PR_HOME_ADDRESS_COUNTRY_A' ,mapi_prop_tag(PT_STRING8, 0x3A5A));
define('PR_HOME_ADDRESS_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A5B)); define('PR_HOME_ADDRESS_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A5B));
define('PR_HOME_ADDRESS_POSTAL_CODE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5B));
define('PR_HOME_ADDRESS_POSTAL_CODE_A' ,mapi_prop_tag(PT_STRING8, 0x3A5B));
define('PR_HOME_ADDRESS_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A5C)); define('PR_HOME_ADDRESS_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A5C));
define('PR_HOME_ADDRESS_STATE_OR_PROVINCE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5C));
define('PR_HOME_ADDRESS_STATE_OR_PROVINCE_A' ,mapi_prop_tag(PT_STRING8, 0x3A5C));
define('PR_HOME_ADDRESS_STREET' ,mapi_prop_tag(PT_TSTRING, 0x3A5D)); define('PR_HOME_ADDRESS_STREET' ,mapi_prop_tag(PT_TSTRING, 0x3A5D));
define('PR_HOME_ADDRESS_STREET_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5D));
define('PR_HOME_ADDRESS_STREET_A' ,mapi_prop_tag(PT_STRING8, 0x3A5D));
define('PR_HOME_ADDRESS_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A5E)); define('PR_HOME_ADDRESS_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A5E));
define('PR_HOME_ADDRESS_POST_OFFICE_BOX_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5E));
define('PR_HOME_ADDRESS_POST_OFFICE_BOX_A' ,mapi_prop_tag(PT_STRING8, 0x3A5E));
define('PR_OTHER_ADDRESS_CITY' ,mapi_prop_tag(PT_TSTRING, 0x3A5F)); define('PR_OTHER_ADDRESS_CITY' ,mapi_prop_tag(PT_TSTRING, 0x3A5F));
define('PR_OTHER_ADDRESS_CITY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A5F));
define('PR_OTHER_ADDRESS_CITY_A' ,mapi_prop_tag(PT_STRING8, 0x3A5F));
define('PR_OTHER_ADDRESS_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A60)); define('PR_OTHER_ADDRESS_COUNTRY' ,mapi_prop_tag(PT_TSTRING, 0x3A60));
define('PR_OTHER_ADDRESS_COUNTRY_W' ,mapi_prop_tag(PT_UNICODE, 0x3A60));
define('PR_OTHER_ADDRESS_COUNTRY_A' ,mapi_prop_tag(PT_STRING8, 0x3A60));
define('PR_OTHER_ADDRESS_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A61)); define('PR_OTHER_ADDRESS_POSTAL_CODE' ,mapi_prop_tag(PT_TSTRING, 0x3A61));
define('PR_OTHER_ADDRESS_POSTAL_CODE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A61));
define('PR_OTHER_ADDRESS_POSTAL_CODE_A' ,mapi_prop_tag(PT_STRING8, 0x3A61));
define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A62)); define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE' ,mapi_prop_tag(PT_TSTRING, 0x3A62));
define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE_W' ,mapi_prop_tag(PT_UNICODE, 0x3A62));
define('PR_OTHER_ADDRESS_STATE_OR_PROVINCE_A' ,mapi_prop_tag(PT_STRING8, 0x3A62));
define('PR_OTHER_ADDRESS_STREET' ,mapi_prop_tag(PT_TSTRING, 0x3A63)); define('PR_OTHER_ADDRESS_STREET' ,mapi_prop_tag(PT_TSTRING, 0x3A63));
define('PR_OTHER_ADDRESS_STREET_W' ,mapi_prop_tag(PT_UNICODE, 0x3A63));
define('PR_OTHER_ADDRESS_STREET_A' ,mapi_prop_tag(PT_STRING8, 0x3A63));
define('PR_OTHER_ADDRESS_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A64)); define('PR_OTHER_ADDRESS_POST_OFFICE_BOX' ,mapi_prop_tag(PT_TSTRING, 0x3A64));
define('PR_OTHER_ADDRESS_POST_OFFICE_BOX_W' ,mapi_prop_tag(PT_UNICODE, 0x3A64));
define('PR_OTHER_ADDRESS_POST_OFFICE_BOX_A' ,mapi_prop_tag(PT_STRING8, 0x3A64));
define('PR_USER_X509_CERTIFICATE' ,mapi_prop_tag(PT_MV_BINARY, 0x3A70)); define('PR_USER_X509_CERTIFICATE' ,mapi_prop_tag(PT_MV_BINARY, 0x3A70));
...@@ -957,33 +657,21 @@ define('PR_AB_DEFAULT_PAB' ,mapi_prop_tag(PT_BINARY, ...@@ -957,33 +657,21 @@ define('PR_AB_DEFAULT_PAB' ,mapi_prop_tag(PT_BINARY,
define('PR_FILTERING_HOOKS' ,mapi_prop_tag(PT_BINARY, 0x3D08)); define('PR_FILTERING_HOOKS' ,mapi_prop_tag(PT_BINARY, 0x3D08));
define('PR_SERVICE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D09)); define('PR_SERVICE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D09));
define('PR_SERVICE_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3D09));
define('PR_SERVICE_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3D09));
define('PR_SERVICE_DLL_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D0A)); define('PR_SERVICE_DLL_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D0A));
define('PR_SERVICE_DLL_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3D0A));
define('PR_SERVICE_DLL_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3D0A));
define('PR_SERVICE_ENTRY_NAME' ,mapi_prop_tag(PT_STRING8, 0x3D0B)); define('PR_SERVICE_ENTRY_NAME' ,mapi_prop_tag(PT_STRING8, 0x3D0B));
define('PR_SERVICE_UID' ,mapi_prop_tag(PT_BINARY, 0x3D0C)); define('PR_SERVICE_UID' ,mapi_prop_tag(PT_BINARY, 0x3D0C));
define('PR_SERVICE_EXTRA_UIDS' ,mapi_prop_tag(PT_BINARY, 0x3D0D)); define('PR_SERVICE_EXTRA_UIDS' ,mapi_prop_tag(PT_BINARY, 0x3D0D));
define('PR_SERVICES' ,mapi_prop_tag(PT_BINARY, 0x3D0E)); define('PR_SERVICES' ,mapi_prop_tag(PT_BINARY, 0x3D0E));
define('PR_SERVICE_SUPPORT_FILES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3D0F)); define('PR_SERVICE_SUPPORT_FILES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3D0F));
define('PR_SERVICE_SUPPORT_FILES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x3D0F));
define('PR_SERVICE_SUPPORT_FILES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x3D0F));
define('PR_SERVICE_DELETE_FILES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3D10)); define('PR_SERVICE_DELETE_FILES' ,mapi_prop_tag(PT_MV_TSTRING, 0x3D10));
define('PR_SERVICE_DELETE_FILES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x3D10));
define('PR_SERVICE_DELETE_FILES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x3D10));
define('PR_AB_SEARCH_PATH_UPDATE' ,mapi_prop_tag(PT_BINARY, 0x3D11)); define('PR_AB_SEARCH_PATH_UPDATE' ,mapi_prop_tag(PT_BINARY, 0x3D11));
define('PR_PROFILE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D12)); define('PR_PROFILE_NAME' ,mapi_prop_tag(PT_TSTRING, 0x3D12));
define('PR_PROFILE_NAME_A' ,mapi_prop_tag(PT_STRING8, 0x3D12));
define('PR_PROFILE_NAME_W' ,mapi_prop_tag(PT_UNICODE, 0x3D12));
/* /*
* Status object properties * Status object properties
*/ */
define('PR_IDENTITY_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x3E00)); define('PR_IDENTITY_DISPLAY' ,mapi_prop_tag(PT_TSTRING, 0x3E00));
define('PR_IDENTITY_DISPLAY_W' ,mapi_prop_tag(PT_UNICODE, 0x3E00));
define('PR_IDENTITY_DISPLAY_A' ,mapi_prop_tag(PT_STRING8, 0x3E00));
define('PR_IDENTITY_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E01)); define('PR_IDENTITY_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E01));
define('PR_RESOURCE_METHODS' ,mapi_prop_tag(PT_LONG, 0x3E02)); define('PR_RESOURCE_METHODS' ,mapi_prop_tag(PT_LONG, 0x3E02));
define('PR_RESOURCE_TYPE' ,mapi_prop_tag(PT_LONG, 0x3E03)); define('PR_RESOURCE_TYPE' ,mapi_prop_tag(PT_LONG, 0x3E03));
...@@ -991,17 +679,11 @@ define('PR_STATUS_CODE' ,mapi_prop_tag(PT_LONG, ...@@ -991,17 +679,11 @@ define('PR_STATUS_CODE' ,mapi_prop_tag(PT_LONG,
define('PR_IDENTITY_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x3E05)); define('PR_IDENTITY_SEARCH_KEY' ,mapi_prop_tag(PT_BINARY, 0x3E05));
define('PR_OWN_STORE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E06)); define('PR_OWN_STORE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E06));
define('PR_RESOURCE_PATH' ,mapi_prop_tag(PT_TSTRING, 0x3E07)); define('PR_RESOURCE_PATH' ,mapi_prop_tag(PT_TSTRING, 0x3E07));
define('PR_RESOURCE_PATH_W' ,mapi_prop_tag(PT_UNICODE, 0x3E07));
define('PR_RESOURCE_PATH_A' ,mapi_prop_tag(PT_STRING8, 0x3E07));
define('PR_STATUS_STRING' ,mapi_prop_tag(PT_TSTRING, 0x3E08)); define('PR_STATUS_STRING' ,mapi_prop_tag(PT_TSTRING, 0x3E08));
define('PR_STATUS_STRING_W' ,mapi_prop_tag(PT_UNICODE, 0x3E08));
define('PR_STATUS_STRING_A' ,mapi_prop_tag(PT_STRING8, 0x3E08));
define('PR_X400_DEFERRED_DELIVERY_CANCEL' ,mapi_prop_tag(PT_BOOLEAN, 0x3E09)); define('PR_X400_DEFERRED_DELIVERY_CANCEL' ,mapi_prop_tag(PT_BOOLEAN, 0x3E09));
define('PR_HEADER_FOLDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E0A)); define('PR_HEADER_FOLDER_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x3E0A));
define('PR_REMOTE_PROGRESS' ,mapi_prop_tag(PT_LONG, 0x3E0B)); define('PR_REMOTE_PROGRESS' ,mapi_prop_tag(PT_LONG, 0x3E0B));
define('PR_REMOTE_PROGRESS_TEXT' ,mapi_prop_tag(PT_TSTRING, 0x3E0C)); define('PR_REMOTE_PROGRESS_TEXT' ,mapi_prop_tag(PT_TSTRING, 0x3E0C));
define('PR_REMOTE_PROGRESS_TEXT_W' ,mapi_prop_tag(PT_UNICODE, 0x3E0C));
define('PR_REMOTE_PROGRESS_TEXT_A' ,mapi_prop_tag(PT_STRING8, 0x3E0C));
define('PR_REMOTE_VALIDATE_OK' ,mapi_prop_tag(PT_BOOLEAN, 0x3E0D)); define('PR_REMOTE_VALIDATE_OK' ,mapi_prop_tag(PT_BOOLEAN, 0x3E0D));
/* /*
...@@ -1050,6 +732,7 @@ define('PR_ADDITIONAL_REN_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINAR ...@@ -1050,6 +732,7 @@ define('PR_ADDITIONAL_REN_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINAR
define('PR_FREEBUSY_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x36E4)); define('PR_FREEBUSY_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x36E4));
define('PR_REM_ONLINE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x36D5)); define('PR_REM_ONLINE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x36D5));
define('PR_REM_OFFLINE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x36D6)); define('PR_REM_OFFLINE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x36D6));
define('PR_FREEBUSY_COUNT_MONTHS' ,mapi_prop_tag(PT_LONG, 0x6869));
/* /*
PR_IPM_OL2007_ENTRYIDS: PR_IPM_OL2007_ENTRYIDS:
This is a single binary property containing the entryids for: This is a single binary property containing the entryids for:
...@@ -1082,6 +765,9 @@ PR_IPM_OL2007_ENTRYIDS: ...@@ -1082,6 +765,9 @@ PR_IPM_OL2007_ENTRYIDS:
00000000 (terminator?) 00000000 (terminator?)
*/ */
define('PR_IPM_OL2007_ENTRYIDS' ,mapi_prop_tag(PT_BINARY, 0x36D9)); define('PR_IPM_OL2007_ENTRYIDS' ,mapi_prop_tag(PT_BINARY, 0x36D9));
// Note: PR_IPM_OL2007_ENTRYIDS is the same property as PR_ADDITIONAL_REN_ENTRYIDS_EX, but Microsoft
// seems to use the latter hence we will also use that to not confuse developers that want to Google it.
define('PR_ADDITIONAL_REN_ENTRYIDS_EX' ,mapi_prop_tag(PT_BINARY, 0x36D9));
...@@ -1103,8 +789,8 @@ define('PR_RECIPIENT_TRACKSTATUS_TIME' ,mapi_prop_tag(PT_SYSTIME, ...@@ -1103,8 +789,8 @@ define('PR_RECIPIENT_TRACKSTATUS_TIME' ,mapi_prop_tag(PT_SYSTIME,
define('PR_EC_OUTOFOFFICE' ,mapi_prop_tag(PT_BOOLEAN, 0x6760)); define('PR_EC_OUTOFOFFICE' ,mapi_prop_tag(PT_BOOLEAN, 0x6760));
define('PR_EC_OUTOFOFFICE_MSG' ,mapi_prop_tag(PT_STRING8, 0x6761)); define('PR_EC_OUTOFOFFICE_MSG' ,mapi_prop_tag(PT_STRING8, 0x6761));
define('PR_EC_OUTOFOFFICE_SUBJECT' ,mapi_prop_tag(PT_STRING8, 0x6762)); define('PR_EC_OUTOFOFFICE_SUBJECT' ,mapi_prop_tag(PT_STRING8, 0x6762));
define('PR_EC_OUTOFOFFICE_FROM', mapi_prop_tag(PT_SYSTIME, 0x6763)); define('PR_EC_OUTOFOFFICE_FROM' ,mapi_prop_tag(PT_SYSTIME, 0x6763));
define('PR_EC_OUTOFOFFICE_UNTIL', mapi_prop_tag(PT_SYSTIME, 0x6764)); define('PR_EC_OUTOFOFFICE_UNTIL' ,mapi_prop_tag(PT_SYSTIME, 0x6764));
/* quota support */ /* quota support */
define('PR_QUOTA_WARNING_THRESHOLD' ,mapi_prop_tag(PT_LONG, 0x6721)); define('PR_QUOTA_WARNING_THRESHOLD' ,mapi_prop_tag(PT_LONG, 0x6721));
...@@ -1119,6 +805,9 @@ define('PR_EC_RECIPIENT_HISTORY' ,mapi_prop_tag(PT_STRING8, ...@@ -1119,6 +805,9 @@ define('PR_EC_RECIPIENT_HISTORY' ,mapi_prop_tag(PT_STRING8,
define('PR_EC_WEBACCESS_SETTINGS_JSON' ,mapi_prop_tag(PT_STRING8, 0x6772)); define('PR_EC_WEBACCESS_SETTINGS_JSON' ,mapi_prop_tag(PT_STRING8, 0x6772));
define('PR_EC_RECIPIENT_HISTORY_JSON' ,mapi_prop_tag(PT_STRING8, 0x6773)); define('PR_EC_RECIPIENT_HISTORY_JSON' ,mapi_prop_tag(PT_STRING8, 0x6773));
/* The peristent settings are settings that will not be touched when the settings are reset */
define('PR_EC_WEBAPP_PERSISTENT_SETTINGS_JSON' ,mapi_prop_tag(PT_STRING8, 0x6774));
/* statistics properties */ /* statistics properties */
define('PR_EC_STATSTABLE_SYSTEM' ,mapi_prop_tag(PT_OBJECT, 0x6730)); define('PR_EC_STATSTABLE_SYSTEM' ,mapi_prop_tag(PT_OBJECT, 0x6730));
define('PR_EC_STATSTABLE_SESSIONS' ,mapi_prop_tag(PT_OBJECT, 0x6731)); define('PR_EC_STATSTABLE_SESSIONS' ,mapi_prop_tag(PT_OBJECT, 0x6731));
...@@ -1135,20 +824,9 @@ define('PR_EC_STATS_SESSION_LOCKED' ,mapi_prop_tag(PT_BOOLEAN, ...@@ -1135,20 +824,9 @@ define('PR_EC_STATS_SESSION_LOCKED' ,mapi_prop_tag(PT_BOOLEAN,
define('PR_EC_STATS_SESSION_BUSYSTATES' ,mapi_prop_tag(PT_MV_STRING8, 0x6747)); define('PR_EC_STATS_SESSION_BUSYSTATES' ,mapi_prop_tag(PT_MV_STRING8, 0x6747));
define('PR_EC_COMPANY_NAME' ,mapi_prop_tag(PT_STRING8, 0x6748)); define('PR_EC_COMPANY_NAME' ,mapi_prop_tag(PT_STRING8, 0x6748));
/* kopano specific properties for optimization of imap functionality */
define('PR_EC_IMAP_EMAIL' ,mapi_prop_tag(PT_BINARY, 0x678C)); // the complete rfc822 email
define('PR_EC_IMAP_EMAIL_SIZE' ,mapi_prop_tag(PT_LONG, 0x678D));
define('PR_EC_IMAP_BODY' ,mapi_prop_tag(PT_STRING8, 0x678E)); // simplified bodystructure (mostly unused by clients)
define('PR_EC_IMAP_BODYSTRUCTURE' ,mapi_prop_tag(PT_STRING8, 0x678F)); // extended bodystructure (often used by clients)
/* user features */ /* user features */
define('PR_EC_ENABLED_FEATURES' ,mapi_prop_tag(PT_MV_TSTRING, 0x67B3)); define('PR_EC_ENABLED_FEATURES' ,mapi_prop_tag(PT_MV_TSTRING, 0x67B3));
define('PR_EC_ENABLED_FEATURES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x67B3));
define('PR_EC_ENABLED_FEATURES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x67B3));
define('PR_EC_DISABLED_FEATURES' ,mapi_prop_tag(PT_MV_TSTRING, 0x67B4)); define('PR_EC_DISABLED_FEATURES' ,mapi_prop_tag(PT_MV_TSTRING, 0x67B4));
define('PR_EC_DISABLED_FEATURES_A' ,mapi_prop_tag(PT_MV_STRING8, 0x67B4));
define('PR_EC_DISABLED_FEATURES_W' ,mapi_prop_tag(PT_MV_UNICODE, 0x67B4));
/* WA properties */ /* WA properties */
define('PR_EC_WA_ATTACHMENT_HIDDEN_OVERRIDE' ,mapi_prop_tag(PT_BOOLEAN, 0x67E0)); define('PR_EC_WA_ATTACHMENT_HIDDEN_OVERRIDE' ,mapi_prop_tag(PT_BOOLEAN, 0x67E0));
...@@ -1218,34 +896,34 @@ define('PR_EMS_AB_IS_MEMBER_OF_DL' ,mapi_prop_tag(PT_MV_BINAR ...@@ -1218,34 +896,34 @@ define('PR_EMS_AB_IS_MEMBER_OF_DL' ,mapi_prop_tag(PT_MV_BINAR
define('PR_EMS_AB_OWNER' ,mapi_prop_tag(PT_BINARY, 0x800C)); define('PR_EMS_AB_OWNER' ,mapi_prop_tag(PT_BINARY, 0x800C));
define('PR_EMS_AB_ROOM_CAPACITY' ,mapi_prop_tag(PT_LONG, 0x0807)); define('PR_EMS_AB_ROOM_CAPACITY' ,mapi_prop_tag(PT_LONG, 0x0807));
define('PR_EMS_AB_TAGGED_X509_CERT' ,mapi_prop_tag(PT_MV_BINARY, 0x8C6A)); define('PR_EMS_AB_TAGGED_X509_CERT' ,mapi_prop_tag(PT_MV_BINARY, 0x8C6A));
define('PR_EMS_AB_THUMBNAIL_PHOTO' ,mapi_prop_tag(PT_MV_BINARY, 0x8C9E));
define('PR_EC_ARCHIVE_SERVERS' ,mapi_prop_tag(PT_MV_TSTRING, 0x67c4)); define('PR_EC_ARCHIVE_SERVERS' ,mapi_prop_tag(PT_MV_TSTRING, 0x67c4));
/* zarafa contacts provider properties */ /* kopano contacts provider properties */
define('PR_ZC_CONTACT_STORE_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x6711)); define('PR_ZC_CONTACT_STORE_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x6711));
define('PR_ZC_CONTACT_FOLDER_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x6712)); define('PR_ZC_CONTACT_FOLDER_ENTRYIDS' ,mapi_prop_tag(PT_MV_BINARY, 0x6712));
define('PR_ZC_CONTACT_FOLDER_NAMES' ,mapi_prop_tag(PT_MV_TSTRING, 0x6713)); define('PR_ZC_CONTACT_FOLDER_NAMES' ,mapi_prop_tag(PT_MV_TSTRING, 0x6713));
//Properties defined for Z-Push /* kopano specific properties for optimization of imap functionality */
define('PR_TODO_ITEM_FLAGS' ,mapi_prop_tag(PT_LONG, 0x0E2B)); define('PR_EC_IMAP_EMAIL' ,mapi_prop_tag(PT_BINARY, 0x678C)); //the complete rfc822 email
define('PR_EC_IMAP_EMAIL_SIZE' ,mapi_prop_tag(PT_LONG, 0x678D));
define('PR_EC_IMAP_BODY' ,mapi_prop_tag(PT_STRING8, 0x678E)); //simplified bodystructure (mostly unused by clients)
define('PR_EC_IMAP_BODYSTRUCTURE' ,mapi_prop_tag(PT_STRING8, 0x678F)); //extended bodystructure (often used by clients)
/* Folder properties for unread counters */
define('PR_LOCAL_COMMIT_TIME_MAX' ,mapi_prop_tag(PT_SYSTIME, 0x670A)); define('PR_LOCAL_COMMIT_TIME_MAX' ,mapi_prop_tag(PT_SYSTIME, 0x670A));
define('PR_DELETED_MSG_COUNT' ,mapi_prop_tag(PT_LONG, 0x6640)); define('PR_DELETED_MSG_COUNT' ,mapi_prop_tag(PT_LONG, 0x6640));
/* Favorites folder properties*/
// PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX PersistIDs define('PR_WLINK_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x684C));
define('RSF_PID_RSS_SUBSCRIPTION' ,0x8001); // Indicates that the structure contains data for the RSS Feeds folder define('PR_WLINK_FLAGS' ,mapi_prop_tag(PT_LONG, 0x684A));
define('RSF_PID_SEND_AND_TRACK' ,0x8002); // Indicates that the structure contains data for the Tracked Mail Processing folder define('PR_WLINK_ORDINAL' ,mapi_prop_tag(PT_BINARY, 0x684B));
define('RSF_PID_TODO_SEARCH' ,0x8004); // Indicates that the structure contains data for the To-Do folder define('PR_WLINK_STORE_ENTRYID' ,mapi_prop_tag(PT_BINARY, 0x684E));
define('RSF_PID_CONV_ACTIONS' ,0x8006); // Indicates that the structure contains data for the Conversation Action Settings folder define('PR_WLINK_TYPE' ,mapi_prop_tag(PT_LONG, 0x6849));
define('RSF_PID_COMBINED_ACTIONS' ,0x8007); // This value is reserved. define('PR_WLINK_SECTION' ,mapi_prop_tag(PT_LONG, 0x6852));
define('RSF_PID_SUGGESTED_CONTACTS' ,0x8008); // Indicates that the structure contains data for the Suggested Contacts folder. define('PR_WLINK_RECKEY' ,mapi_prop_tag(PT_BINARY, 0x684D));
define('RSF_PID_CONTACT_SEARCH' ,0x8009); // Indicates that the structure contains data for the Contacts Search folder. define('PR_WB_SF_ID' ,mapi_prop_tag(PT_BINARY, 0x6842));
define('RSF_PID_BUDDYLIST_PDLS' ,0x800A); // Indicates that the structure contains data for the IM Contacts List folder.
define('RSF_PID_BUDDYLIST_CONTACTS' ,0x800B); // Indicates that the structure contains data for the Quick Contacts folder. /* Search folder properties */
define('PERSIST_SENTINEL' ,0x0000); // Indicates that the PersistData structure is the last one contained in the PidTagAdditionalRenEntryIdsEx property define('PR_EC_SUGGESTION' ,mapi_prop_tag(PT_TSTRING, 0x6707));
// ElementIDs for persist data of PR_IPM_OL2007_ENTRYIDS / PR_ADDITIONAL_REN_ENTRYIDS_EX
define('RSF_ELID_HEADER' ,0x0002); // 4 bytes Indicates that the ElementData field contains a 4-byte header value equal to 0x00000000.
define('RSF_ELID_ENTRYID' ,0x0001); // variable Indicates that the ElementData field contains the entry ID of the special folder
// that is of the type indicated by the value of the PersistID field of the PersistData structure.
define('ELEMENT_SENTINEL' ,0x0000); // 0 bytes Indicates that the PersistElement structure is the last one contained in the DataElements field of the PersistData structure.
\ No newline at end of file
...@@ -621,4 +621,186 @@ class MAPIUtils { ...@@ -621,4 +621,186 @@ class MAPIUtils {
} }
// TODO check if we need to do this for encrypted (and signed?) message as well // TODO check if we need to do this for encrypted (and signed?) message as well
} }
/**
* Compares two entryIds. It is possible to have two different entryIds that should match as they
* represent the same object (in multiserver environments).
* @param string $entryId1
* @param string $entryId2
*
* @access public
* @return boolean
*/
public static function CompareEntryIds($entryId1, $entryId2) {
if (!is_string($entryId1) || !is_string($entryId2)) {
return false;
}
if ($entryId1 === $entryId2) {
// if normal comparison succeeds then we can directly say that entryids are same
return true;
}
$eid1 = self::createEntryIdObj($entryId1);
$eid2 = self::createEntryIdObj($entryId2);
if ($eid1['length'] != $eid2['length'] ||
$eid1['abFlags'] != $eid2['abFlags'] ||
$eid1['version'] != $eid2['version'] ||
$eid1['type'] != $eid2['type']) {
return false;
}
if ($eid1['name'] == 'EID_V0') {
if ($eid1['length'] < $eid1['min_length'] || $eid1['id'] != $eid2['id']) {
return false;
}
}
elseif ($eid1['length'] < $eid1['min_length'] || $eid1['uniqueId'] != $eid2['uniqueId']) {
return false;
}
return true;
}
/**
* Creates an object that has split up all the components of an entryID.
* @param string $entryid Entryid
*
* @access private
* @return Object EntryID object
*/
private static function createEntryIdObj($entryid) {
// check if we are dealing with old or new object entryids
return (substr($entryid, 40, 8) == '00000000') ? self::getEID_V0Version($entryid) : self::getEIDVersion($entryid);
}
/**
* The entryid from the begin of zarafa till 5.20.
* @param string $entryid
*
* @access private
* @return Object EntryID object
*
*/
private static function getEID_V0Version($entryid) {
// always make entryids in uppercase so comparison will be case insensitive
$entryId = strtoupper($entryid);
$res = array(
'abFlags' => '', // BYTE[4], 4 bytes, 8 hex characters
'guid' => '', // GUID, 16 bytes, 32 hex characters
'version' => '', // ULONG, 4 bytes, 8 hex characters
'type' => '', // ULONG, 4 bytes, 8 hex characters
'id' => '', // ULONG, 4 bytes, 8 hex characters
'server' => '', // CHAR, variable length
'padding' => '', // TCHAR[3], 4 bytes, 8 hex characters (upto 4 bytes)
);
$res['length'] = strlen($entryId);
$offset = 0;
// First determine padding, and remove if from the entryId
$res['padding'] = self::getPadding($entryId);
$entryId = substr($entryId, 0, strlen($entryId) - strlen($res['padding']));
$res['abFlags'] = substr($entryId, $offset, 8);
$offset =+ 8;
$res['guid'] = substr($entryId, $offset, 32);
$offset += 32;
$res['version'] = substr($entryId, $offset, 8);
$offset += 8;
$res['type'] = substr($entryId, $offset, 8);
$offset += 8;
$res['id'] = substr($entryId, $offset, 8);
$offset += 8;
$res['server'] = substr($entryId, $offset);
$res['min_lenth'] = 64;
$res['name'] = 'EID_V0';
return $res;
}
/**
* Entryid from version 6.
* @param string $entryid
*
* @access private
* @return string[]|number[]|NULL[]
*/
private static function getEIDVersion($entryid) {
// always make entryids in uppercase so comparison will be case insensitive
$entryId = strtoupper($entryid);
$res = array(
'abFlags' => '', // BYTE[4], 4 bytes, 8 hex characters
'guid' => '', // GUID, 16 bytes, 32 hex characters
'version' => '', // ULONG, 4 bytes, 8 hex characters
'type' => '', // ULONG, 4 bytes, 8 hex characters
'uniqueId' => '', // ULONG, 16 bytes, 32 hex characters
'server' => '', // CHAR, variable length
'padding' => '', // TCHAR[3], 4 bytes, 8 hex characters (upto 4 bytes)
);
$res['length'] = strlen($entryId);
$offset = 0;
// First determine padding, and remove if from the entryId
$res['padding'] = self::getPadding($entryId);
$entryId = substr($entryId, 0, strlen($entryId) - strlen($res['padding']));
$res['abFlags'] = substr($entryId, $offset, 8);
$offset =+ 8;
$res['guid'] = substr($entryId, $offset, 32);
$offset += 32;
$res['version'] = substr($entryId, $offset, 8);
$offset += 8;
$res['type'] = substr($entryId, $offset, 8);
$offset += 8;
$res['uniqueId'] = substr($entryId, $offset, 32);
$offset += 32;
$res['server'] = substr($entryId, $offset);
$res['min_length'] = 88;
$res['name'] = 'EID';
return $res;
}
/**
* Detect padding (max 3 bytes) from the entryId.
* @param string $entryId
*
* @access private
* @return string
*/
private static function getPadding($entryId) {
$len = strlen($entryId);
$padding = '';
$offset = 0;
for ($iterations = 4; $iterations > 0; $iterations--) {
if (substr($entryId, $len - ($offset + 2), $len - $offset) == '00') {
$padding .= '00';
$offset += 2;
}
else {
// if non-null character found then break the loop
break;
}
}
return $padding;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment