comparison src/libpst.c @ 34:07177825c91b

fix signed/unsigned to allow very small pst files with only leaf nodes
author carl
date Thu, 12 Jul 2007 14:59:13 -0700
parents 12cac756bc05
children b2f247463b83
comparison
equal deleted inserted replaced
33:12cac756bc05 34:07177825c91b
42 #define SECOND_POINTER_64 0xE0 42 #define SECOND_POINTER_64 0xE0
43 43
44 #define PST_SIGNATURE 0x4E444221 44 #define PST_SIGNATURE 0x4E444221
45 45
46 struct _pst_table_ptr_struct{ 46 struct _pst_table_ptr_struct{
47 int32_t start; 47 u_int32_t start;
48 int32_t u1; 48 int32_t u1;
49 int32_t offset; 49 int32_t offset;
50 }; 50 };
51 51
52 typedef struct _pst_block_header { 52 typedef struct _pst_block_header {
294 WARN(("Cannot load index for a NULL pst_file\n")); 294 WARN(("Cannot load index for a NULL pst_file\n"));
295 DEBUG_RET(); 295 DEBUG_RET();
296 return -1; 296 return -1;
297 } 297 }
298 298
299 x = _pst_build_id_ptr(pf, pf->index1, 0, pf->index1_count, -1, INT32_MAX); 299 x = _pst_build_id_ptr(pf, pf->index1, 0, pf->index1_count, 0, INT32_MAX);
300 DEBUG_INDEX(("build id ptr returns %i\n", x)); 300 DEBUG_INDEX(("build id ptr returns %i\n", x));
301 301
302 y = 0; 302 y = 0;
303 x = _pst_build_desc_ptr(pf, pf->index2, 0, pf->index2_count, &y, 0x21, INT32_MAX); 303 x = _pst_build_desc_ptr(pf, pf->index2, 0, pf->index2_count, &y, 0x21, INT32_MAX);
304 DEBUG_INDEX(("build desc ptr returns %i\n", x)); 304 DEBUG_INDEX(("build desc ptr returns %i\n", x));
465 #define ITEM_SIZE 12 465 #define ITEM_SIZE 12
466 #define DESC_SIZE 16 466 #define DESC_SIZE 16
467 #define INDEX_COUNT_MAX 41 // max active items 467 #define INDEX_COUNT_MAX 41 // max active items
468 #define DESC_COUNT_MAX 31 // max active items 468 #define DESC_COUNT_MAX 31 // max active items
469 469
470 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, int32_t start_val, int32_t end_val) { 470 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t linku1, u_int32_t start_val, u_int32_t end_val) {
471 struct _pst_table_ptr_struct table, table2; 471 struct _pst_table_ptr_struct table, table2;
472 pst_index_ll *i_ptr=NULL; 472 pst_index_ll *i_ptr=NULL;
473 pst_index index; 473 pst_index index;
474 int32_t x, item_count; 474 int32_t x, item_count;
475 int32_t old = start_val; 475 u_int32_t old = start_val;
476 char *buf = NULL, *bptr; 476 char *buf = NULL, *bptr;
477 477
478 DEBUG_ENT("_pst_build_id_ptr"); 478 DEBUG_ENT("_pst_build_id_ptr");
479 DEBUG_INDEX(("offset %x depth %i linku1 %x start %x end %x\n", offset, depth, linku1, start_val, end_val)); 479 DEBUG_INDEX(("offset %x depth %i linku1 %x start %x end %x\n", offset, depth, linku1, start_val, end_val));
480 if (end_val <= start_val) { 480 if (end_val <= start_val) {
528 DEBUG_RET(); 528 DEBUG_RET();
529 return -1; 529 return -1;
530 } 530 }
531 old = index.id; 531 old = index.id;
532 if (x == 1) { // first entry 532 if (x == 1) { // first entry
533 if ((start_val != -1) && (index.id != start_val)) { 533 if ((start_val) && (index.id != start_val)) {
534 DEBUG_WARN(("This item isn't right. Must be corruption, or I got it wrong!\n")); 534 DEBUG_WARN(("This item isn't right. Must be corruption, or I got it wrong!\n"));
535 if (buf) free(buf); 535 if (buf) free(buf);
536 DEBUG_RET(); 536 DEBUG_RET();
537 return -1; 537 return -1;
538 } 538 }
573 DEBUG_RET(); 573 DEBUG_RET();
574 return -1; 574 return -1;
575 } 575 }
576 old = table.start; 576 old = table.start;
577 if (x == 1) { // first entry 577 if (x == 1) { // first entry
578 if (start_val != -1 && table.start != start_val) { 578 if ((start_val) && (table.start != start_val)) {
579 DEBUG_WARN(("This table isn't right. Must be corruption, or I got it wrong!\n")); 579 DEBUG_WARN(("This table isn't right. Must be corruption, or I got it wrong!\n"));
580 if (buf) free(buf); 580 if (buf) free(buf);
581 DEBUG_RET(); 581 DEBUG_RET();
582 return -1; 582 return -1;
583 } 583 }
1160 1160
1161 _pst_getBlockOffset(buf, read_size, ind_ptr, table_rec.value, &block_offset); 1161 _pst_getBlockOffset(buf, read_size, ind_ptr, table_rec.value, &block_offset);
1162 list_start = block_offset.from; 1162 list_start = block_offset.from;
1163 to_ptr = block_offset.to; 1163 to_ptr = block_offset.to;
1164 num_list = (to_ptr - list_start)/sizeof(table_rec); 1164 num_list = (to_ptr - list_start)/sizeof(table_rec);
1165 num_recs = 1; // only going to one object in these blocks 1165 num_recs = 1; // only going to be one object in these blocks
1166 rec_size = 0; // doesn't matter cause there is only one object 1166 rec_size = 0; // doesn't matter cause there is only one object
1167 } 1167 }
1168 else if (block_hdr.type == 0x7CEC) { //type 2 1168 else if (block_hdr.type == 0x7CEC) { //type 2
1169 block_type = 2; 1169 block_type = 2;
1170 1170
1435 targ = type realloc(targ, list->items[x]->size+1); \ 1435 targ = type realloc(targ, list->items[x]->size+1); \
1436 memset(targ, 0, list->items[x]->size+1); \ 1436 memset(targ, 0, list->items[x]->size+1); \
1437 memcpy(targ, list->items[x]->data, list->items[x]->size); \ 1437 memcpy(targ, list->items[x]->data, list->items[x]->size); \
1438 } 1438 }
1439 1439
1440
1441 /* free(list->items[x]->data); \
1442 list->items[x]->data=NULL; \*/
1443
1444 //#define INC_CHECK_X() { if (++x >= list->count_item) break; }
1445 #define NULL_CHECK(x) { if (!x) { DEBUG_EMAIL(("NULL_CHECK: Null Found\n")); break;} } 1440 #define NULL_CHECK(x) { if (!x) { DEBUG_EMAIL(("NULL_CHECK: Null Found\n")); break;} }
1446 1441
1447 #define MOVE_NEXT(targ) { \ 1442 #define MOVE_NEXT(targ) { \
1448 if (next){\ 1443 if (next){\
1449 if (!targ) {\ 1444 if (!targ) {\
1502 item->email->autoforward = 1; 1497 item->email->autoforward = 1;
1503 } else { 1498 } else {
1504 DEBUG_EMAIL(("False\n")); 1499 DEBUG_EMAIL(("False\n"));
1505 item->email->autoforward = -1; 1500 item->email->autoforward = -1;
1506 } 1501 }
1507 // INC_CHECK_X();
1508 break; 1502 break;
1509 case 0x0003: // Extended Attributes table 1503 case 0x0003: // Extended Attributes table
1510 DEBUG_EMAIL(("Extended Attributes Table - NOT PROCESSED\n")); 1504 DEBUG_EMAIL(("Extended Attributes Table - NOT PROCESSED\n"));
1511 break; 1505 break;
1512 case 0x0017: // PR_IMPORTANCE 1506 case 0x0017: // PR_IMPORTANCE
1519 MALLOC_EMAIL(item); 1513 MALLOC_EMAIL(item);
1520 memcpy(&(item->email->importance), list->items[x]->data, sizeof(item->email->importance)); 1514 memcpy(&(item->email->importance), list->items[x]->data, sizeof(item->email->importance));
1521 LE32_CPU(item->email->importance); 1515 LE32_CPU(item->email->importance);
1522 t = item->email->importance; 1516 t = item->email->importance;
1523 DEBUG_EMAIL(("%s [%i]\n", (t==0?"Low":(t==1?"Normal":"High")), t)); 1517 DEBUG_EMAIL(("%s [%i]\n", (t==0?"Low":(t==1?"Normal":"High")), t));
1524 // INC_CHECK_X();
1525 break; 1518 break;
1526 case 0x001A: // PR_MESSAGE_CLASS Ascii type of messages - NOT FOLDERS 1519 case 0x001A: // PR_MESSAGE_CLASS Ascii type of messages - NOT FOLDERS
1527 // must be case insensitive 1520 // must be case insensitive
1528 DEBUG_EMAIL(("IPM.x - ")); 1521 DEBUG_EMAIL(("IPM.x - "));
1529 LIST_COPY(item->ascii_type, (char*)); 1522 LIST_COPY(item->ascii_type, (char*));
1545 item->type = PST_TYPE_APPOINTMENT; 1538 item->type = PST_TYPE_APPOINTMENT;
1546 else 1539 else
1547 item->type = PST_TYPE_OTHER; 1540 item->type = PST_TYPE_OTHER;
1548 1541
1549 DEBUG_EMAIL(("%s\n", item->ascii_type)); 1542 DEBUG_EMAIL(("%s\n", item->ascii_type));
1550 // INC_CHECK_X(); //increment x here so that the next if statement has a chance of matching the next item
1551 break; 1543 break;
1552 case 0x0023: // PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED 1544 case 0x0023: // PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED
1553 // set if the sender wants a delivery report from all recipients 1545 // set if the sender wants a delivery report from all recipients
1554 DEBUG_EMAIL(("Global Delivery Report - ")); 1546 DEBUG_EMAIL(("Global Delivery Report - "));
1555 MALLOC_EMAIL(item); 1547 MALLOC_EMAIL(item);
1558 item->email->delivery_report = 1; 1550 item->email->delivery_report = 1;
1559 } else { 1551 } else {
1560 DEBUG_EMAIL(("False\n")); 1552 DEBUG_EMAIL(("False\n"));
1561 item->email->delivery_report = 0; 1553 item->email->delivery_report = 0;
1562 } 1554 }
1563 // INC_CHECK_X();
1564 break; 1555 break;
1565 case 0x0026: // PR_PRIORITY 1556 case 0x0026: // PR_PRIORITY
1566 // Priority of a message 1557 // Priority of a message
1567 // -1 NonUrgent 1558 // -1 NonUrgent
1568 // 0 Normal 1559 // 0 Normal
1571 MALLOC_EMAIL(item); 1562 MALLOC_EMAIL(item);
1572 memcpy(&(item->email->priority), list->items[x]->data, sizeof(item->email->priority)); 1563 memcpy(&(item->email->priority), list->items[x]->data, sizeof(item->email->priority));
1573 LE32_CPU(item->email->priority); 1564 LE32_CPU(item->email->priority);
1574 t = item->email->priority; 1565 t = item->email->priority;
1575 DEBUG_EMAIL(("%s [%i]\n", (t<0?"NonUrgent":(t==0?"Normal":"Urgent")), t)); 1566 DEBUG_EMAIL(("%s [%i]\n", (t<0?"NonUrgent":(t==0?"Normal":"Urgent")), t));
1576 // INC_CHECK_X();
1577 break; 1567 break;
1578 case 0x0029:// PR_READ_RECEIPT_REQUESTED 1568 case 0x0029:// PR_READ_RECEIPT_REQUESTED
1579 DEBUG_EMAIL(("Read Receipt - ")); 1569 DEBUG_EMAIL(("Read Receipt - "));
1580 MALLOC_EMAIL(item); 1570 MALLOC_EMAIL(item);
1581 if (*(short int*)list->items[x]->data != 0) { 1571 if (*(short int*)list->items[x]->data != 0) {
1583 item->email->read_receipt = 1; 1573 item->email->read_receipt = 1;
1584 } else { 1574 } else {
1585 DEBUG_EMAIL(("False\n")); 1575 DEBUG_EMAIL(("False\n"));
1586 item->email->read_receipt = 0; 1576 item->email->read_receipt = 0;
1587 } 1577 }
1588 // INC_CHECK_X();
1589 break; 1578 break;
1590 case 0x002B: // PR_RECIPIENT_REASSIGNMENT_PROHIBITED 1579 case 0x002B: // PR_RECIPIENT_REASSIGNMENT_PROHIBITED
1591 DEBUG_EMAIL(("Reassignment Prohibited (Private) - ")); 1580 DEBUG_EMAIL(("Reassignment Prohibited (Private) - "));
1592 if (*(short int*)list->items[x]->data != 0) { 1581 if (*(short int*)list->items[x]->data != 0) {
1593 DEBUG_EMAIL(("True\n")); 1582 DEBUG_EMAIL(("True\n"));
1608 memcpy(&(item->email->orig_sensitivity), list->items[x]->data, sizeof(item->email->orig_sensitivity)); 1597 memcpy(&(item->email->orig_sensitivity), list->items[x]->data, sizeof(item->email->orig_sensitivity));
1609 LE32_CPU(item->email->orig_sensitivity); 1598 LE32_CPU(item->email->orig_sensitivity);
1610 t = item->email->orig_sensitivity; 1599 t = item->email->orig_sensitivity;
1611 DEBUG_EMAIL(("%s [%i]\n", (t==0?"None":(t==1?"Personal": 1600 DEBUG_EMAIL(("%s [%i]\n", (t==0?"None":(t==1?"Personal":
1612 (t==2?"Private":"Company Confidential"))), t)); 1601 (t==2?"Private":"Company Confidential"))), t));
1613 // INC_CHECK_X();
1614 break; 1602 break;
1615 case 0x0036: // PR_SENSITIVITY 1603 case 0x0036: // PR_SENSITIVITY
1616 // sender's opinion of the sensitivity of an email 1604 // sender's opinion of the sensitivity of an email
1617 // 0 - None 1605 // 0 - None
1618 // 1 - Personal 1606 // 1 - Personal
1623 memcpy(&(item->email->sensitivity), list->items[x]->data, sizeof(item->email->sensitivity)); 1611 memcpy(&(item->email->sensitivity), list->items[x]->data, sizeof(item->email->sensitivity));
1624 LE32_CPU(item->email->sensitivity); 1612 LE32_CPU(item->email->sensitivity);
1625 t = item->email->sensitivity; 1613 t = item->email->sensitivity;
1626 DEBUG_EMAIL(("%s [%i]\n", (t==0?"None":(t==1?"Personal": 1614 DEBUG_EMAIL(("%s [%i]\n", (t==0?"None":(t==1?"Personal":
1627 (t==2?"Private":"Company Confidential"))), t)); 1615 (t==2?"Private":"Company Confidential"))), t));
1628 // INC_CHECK_X();
1629 break; 1616 break;
1630 case 0x0037: // PR_SUBJECT raw subject 1617 case 0x0037: // PR_SUBJECT raw subject
1631 // if (list->items[x]->id == 0x0037) { 1618 // if (list->items[x]->id == 0x0037) {
1632 DEBUG_EMAIL(("Raw Subject - ")); 1619 DEBUG_EMAIL(("Raw Subject - "));
1633 MALLOC_EMAIL(item); 1620 MALLOC_EMAIL(item);
1658 item->email->subject->off2 = 0; 1645 item->email->subject->off2 = 0;
1659 item->email->subject = NULL; 1646 item->email->subject = NULL;
1660 DEBUG_EMAIL(("NULL subject detected\n")); 1647 DEBUG_EMAIL(("NULL subject detected\n"));
1661 } 1648 }
1662 break; 1649 break;
1663 // INC_CHECK_X();
1664 case 0x0039: // PR_CLIENT_SUBMIT_TIME Date Email Sent/Created 1650 case 0x0039: // PR_CLIENT_SUBMIT_TIME Date Email Sent/Created
1665 DEBUG_EMAIL(("Date sent - ")); 1651 DEBUG_EMAIL(("Date sent - "));
1666 MALLOC_EMAIL(item); 1652 MALLOC_EMAIL(item);
1667 LIST_COPY(item->email->sent_date, (FILETIME*)); 1653 LIST_COPY(item->email->sent_date, (FILETIME*));
1668 LE32_CPU(item->email->sent_date->dwLowDateTime); 1654 LE32_CPU(item->email->sent_date->dwLowDateTime);
1669 LE32_CPU(item->email->sent_date->dwHighDateTime); 1655 LE32_CPU(item->email->sent_date->dwHighDateTime);
1670 DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->sent_date))); 1656 DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->sent_date)));
1671 // INC_CHECK_X();
1672 break; 1657 break;
1673 case 0x003B: // PR_SENT_REPRESENTING_SEARCH_KEY Sender address 1 1658 case 0x003B: // PR_SENT_REPRESENTING_SEARCH_KEY Sender address 1
1674 DEBUG_EMAIL(("Sent on behalf of address 1 - ")); 1659 DEBUG_EMAIL(("Sent on behalf of address 1 - "));
1675 MALLOC_EMAIL(item); 1660 MALLOC_EMAIL(item);
1676 LIST_COPY(item->email->outlook_sender, (char*)); 1661 LIST_COPY(item->email->outlook_sender, (char*));
1677 DEBUG_EMAIL(("%s\n", item->email->outlook_sender)); 1662 DEBUG_EMAIL(("%s\n", item->email->outlook_sender));
1678 // INC_CHECK_X();
1679 break; 1663 break;
1680 case 0x003F: // PR_RECEIVED_BY_ENTRYID Structure containing Recipient 1664 case 0x003F: // PR_RECEIVED_BY_ENTRYID Structure containing Recipient
1681 DEBUG_EMAIL(("Recipient Structure 1 -- NOT HANDLED\n")); 1665 DEBUG_EMAIL(("Recipient Structure 1 -- NOT HANDLED\n"));
1682 // INC_CHECK_X();
1683 break; 1666 break;
1684 case 0x0040: // PR_RECEIVED_BY_NAME Name of Recipient Structure 1667 case 0x0040: // PR_RECEIVED_BY_NAME Name of Recipient Structure
1685 DEBUG_EMAIL(("Received By Name 1 -- NOT HANDLED\n")); 1668 DEBUG_EMAIL(("Received By Name 1 -- NOT HANDLED\n"));
1686 //INC_CHECK_X();
1687 break; 1669 break;
1688 case 0x0041: // PR_SENT_REPRESENTING_ENTRYID Structure containing Sender 1670 case 0x0041: // PR_SENT_REPRESENTING_ENTRYID Structure containing Sender
1689 DEBUG_EMAIL(("Sent on behalf of Structure 1 -- NOT HANDLED\n")); 1671 DEBUG_EMAIL(("Sent on behalf of Structure 1 -- NOT HANDLED\n"));
1690 //INC_CHECK_X();
1691 break; 1672 break;
1692 case 0x0042: // PR_SENT_REPRESENTING_NAME Name of Sender Structure 1673 case 0x0042: // PR_SENT_REPRESENTING_NAME Name of Sender Structure
1693 DEBUG_EMAIL(("Sent on behalf of Structure Name - ")); 1674 DEBUG_EMAIL(("Sent on behalf of Structure Name - "));
1694 MALLOC_EMAIL(item); 1675 MALLOC_EMAIL(item);
1695 LIST_COPY(item->email->outlook_sender_name, (char*)); 1676 LIST_COPY(item->email->outlook_sender_name, (char*));
1696 DEBUG_EMAIL(("%s\n", item->email->outlook_sender_name)); 1677 DEBUG_EMAIL(("%s\n", item->email->outlook_sender_name));
1697 //INC_CHECK_X();
1698 break; 1678 break;
1699 case 0x0043: // PR_RCVD_REPRESENTING_ENTRYID Recipient Structure 2 1679 case 0x0043: // PR_RCVD_REPRESENTING_ENTRYID Recipient Structure 2
1700 DEBUG_EMAIL(("Received on behalf of Structure -- NOT HANDLED\n")); 1680 DEBUG_EMAIL(("Received on behalf of Structure -- NOT HANDLED\n"));
1701 //INC_CHECK_X();
1702 break; 1681 break;
1703 case 0x0044: // PR_RCVD_REPRESENTING_NAME Name of Recipient Structure 2 1682 case 0x0044: // PR_RCVD_REPRESENTING_NAME Name of Recipient Structure 2
1704 DEBUG_EMAIL(("Received on behalf of Structure Name -- NOT HANDLED\n")); 1683 DEBUG_EMAIL(("Received on behalf of Structure Name -- NOT HANDLED\n"));
1705 //INC_CHECK_X();
1706 break; 1684 break;
1707 case 0x004F: // PR_REPLY_RECIPIENT_ENTRIES Reply-To Structure 1685 case 0x004F: // PR_REPLY_RECIPIENT_ENTRIES Reply-To Structure
1708 DEBUG_EMAIL(("Reply-To Structure -- NOT HANDLED\n")); 1686 DEBUG_EMAIL(("Reply-To Structure -- NOT HANDLED\n"));
1709 //INC_CHECK_X();
1710 break; 1687 break;
1711 case 0x0050: // PR_REPLY_RECIPIENT_NAMES Name of Reply-To Structure 1688 case 0x0050: // PR_REPLY_RECIPIENT_NAMES Name of Reply-To Structure
1712 DEBUG_EMAIL(("Name of Reply-To Structure -")); 1689 DEBUG_EMAIL(("Name of Reply-To Structure -"));
1713 MALLOC_EMAIL(item); 1690 MALLOC_EMAIL(item);
1714 LIST_COPY(item->email->reply_to, (char*)); 1691 LIST_COPY(item->email->reply_to, (char*));
1715 DEBUG_EMAIL(("%s\n", item->email->reply_to)); 1692 DEBUG_EMAIL(("%s\n", item->email->reply_to));
1716 //INC_CHECK_X();
1717 break; 1693 break;
1718 case 0x0051: // PR_RECEIVED_BY_SEARCH_KEY Recipient Address 1 1694 case 0x0051: // PR_RECEIVED_BY_SEARCH_KEY Recipient Address 1
1719 DEBUG_EMAIL(("Recipient's Address 1 (Search Key) - ")); 1695 DEBUG_EMAIL(("Recipient's Address 1 (Search Key) - "));
1720 MALLOC_EMAIL(item); 1696 MALLOC_EMAIL(item);
1721 LIST_COPY (item->email->outlook_recipient, (char*)); 1697 LIST_COPY (item->email->outlook_recipient, (char*));
1722 DEBUG_EMAIL(("%s\n", item->email->outlook_recipient)); 1698 DEBUG_EMAIL(("%s\n", item->email->outlook_recipient));
1723 //INC_CHECK_X();
1724 break; 1699 break;
1725 case 0x0052: // PR_RCVD_REPRESENTING_SEARCH_KEY Recipient Address 2 1700 case 0x0052: // PR_RCVD_REPRESENTING_SEARCH_KEY Recipient Address 2
1726 DEBUG_EMAIL(("Received on behalf of Address (Search Key) - ")); 1701 DEBUG_EMAIL(("Received on behalf of Address (Search Key) - "));
1727 MALLOC_EMAIL(item); 1702 MALLOC_EMAIL(item);
1728 LIST_COPY(item->email->outlook_recipient2, (char*)); 1703 LIST_COPY(item->email->outlook_recipient2, (char*));
1729 DEBUG_EMAIL(("%s\n", item->email->outlook_recipient2)); 1704 DEBUG_EMAIL(("%s\n", item->email->outlook_recipient2));
1730 //INC_CHECK_X();
1731 break; 1705 break;
1732 case 0x0057: // PR_MESSAGE_TO_ME 1706 case 0x0057: // PR_MESSAGE_TO_ME
1733 // this user is listed explicitly in the TO address 1707 // this user is listed explicitly in the TO address
1734 DEBUG_EMAIL(("My address in TO field - ")); 1708 DEBUG_EMAIL(("My address in TO field - "));
1735 MALLOC_EMAIL(item); 1709 MALLOC_EMAIL(item);
1738 item->email->message_to_me = 1; 1712 item->email->message_to_me = 1;
1739 } else { 1713 } else {
1740 DEBUG_EMAIL(("False\n")); 1714 DEBUG_EMAIL(("False\n"));
1741 item->email->message_to_me = 0; 1715 item->email->message_to_me = 0;
1742 } 1716 }
1743 //INC_CHECK_X();
1744 break; 1717 break;
1745 case 0x0058: // PR_MESSAGE_CC_ME 1718 case 0x0058: // PR_MESSAGE_CC_ME
1746 // this user is listed explicitly in the CC address 1719 // this user is listed explicitly in the CC address
1747 DEBUG_EMAIL(("My address in CC field - ")); 1720 DEBUG_EMAIL(("My address in CC field - "));
1748 MALLOC_EMAIL(item); 1721 MALLOC_EMAIL(item);
1751 item->email->message_cc_me = 1; 1724 item->email->message_cc_me = 1;
1752 } else { 1725 } else {
1753 DEBUG_EMAIL(("False\n")); 1726 DEBUG_EMAIL(("False\n"));
1754 item->email->message_cc_me = 0; 1727 item->email->message_cc_me = 0;
1755 } 1728 }
1756 //INC_CHECK_X();
1757 break; 1729 break;
1758 case 0x0059: //PR_MESSAGE_RECIP_ME 1730 case 0x0059: //PR_MESSAGE_RECIP_ME
1759 // this user appears in TO, CC or BCC address list 1731 // this user appears in TO, CC or BCC address list
1760 DEBUG_EMAIL(("Message addressed to me - ")); 1732 DEBUG_EMAIL(("Message addressed to me - "));
1761 MALLOC_EMAIL(item); 1733 MALLOC_EMAIL(item);
1764 item->email->message_recip_me = 1; 1736 item->email->message_recip_me = 1;
1765 } else { 1737 } else {
1766 DEBUG_EMAIL(("False\n")); 1738 DEBUG_EMAIL(("False\n"));
1767 item->email->message_recip_me = 0; 1739 item->email->message_recip_me = 0;
1768 } 1740 }
1769 //INC_CHECK_X();
1770 break; 1741 break;
1771 case 0x0063: // PR_RESPONSE_REQUESTED 1742 case 0x0063: // PR_RESPONSE_REQUESTED
1772 DEBUG_EMAIL(("Response requested - ")); 1743 DEBUG_EMAIL(("Response requested - "));
1773 if (*(int16_t*)list->items[x]->data != 0) { 1744 if (*(int16_t*)list->items[x]->data != 0) {
1774 DEBUG_EMAIL(("True\n")); 1745 DEBUG_EMAIL(("True\n"));
1781 case 0x0064: // PR_SENT_REPRESENTING_ADDRTYPE Access method for Sender Address 1752 case 0x0064: // PR_SENT_REPRESENTING_ADDRTYPE Access method for Sender Address
1782 DEBUG_EMAIL(("Sent on behalf of address type - ")); 1753 DEBUG_EMAIL(("Sent on behalf of address type - "));
1783 MALLOC_EMAIL(item); 1754 MALLOC_EMAIL(item);
1784 LIST_COPY(item->email->sender_access, (char*)); 1755 LIST_COPY(item->email->sender_access, (char*));
1785 DEBUG_EMAIL(("%s\n", item->email->sender_access)); 1756 DEBUG_EMAIL(("%s\n", item->email->sender_access));
1786 //INC_CHECK_X();
1787 break; 1757 break;
1788 case 0x0065: // PR_SENT_REPRESENTING_EMAIL_ADDRESS Sender Address 1758 case 0x0065: // PR_SENT_REPRESENTING_EMAIL_ADDRESS Sender Address
1789 DEBUG_EMAIL(("Sent on behalf of Address - ")); 1759 DEBUG_EMAIL(("Sent on behalf of Address - "));
1790 MALLOC_EMAIL(item); 1760 MALLOC_EMAIL(item);
1791 LIST_COPY(item->email->sender_address, (char*)); 1761 LIST_COPY(item->email->sender_address, (char*));
1792 DEBUG_EMAIL(("%s\n", item->email->sender_address)); 1762 DEBUG_EMAIL(("%s\n", item->email->sender_address));
1793 //INC_CHECK_X();
1794 break; 1763 break;
1795 case 0x0070: // PR_CONVERSATION_TOPIC Processed Subject 1764 case 0x0070: // PR_CONVERSATION_TOPIC Processed Subject
1796 DEBUG_EMAIL(("Processed Subject (Conversation Topic) - ")); 1765 DEBUG_EMAIL(("Processed Subject (Conversation Topic) - "));
1797 MALLOC_EMAIL(item); 1766 MALLOC_EMAIL(item);
1798 LIST_COPY(item->email->proc_subject, (char*)); 1767 LIST_COPY(item->email->proc_subject, (char*));
1799 DEBUG_EMAIL(("%s\n", item->email->proc_subject)); 1768 DEBUG_EMAIL(("%s\n", item->email->proc_subject));
1800 //INC_CHECK_X();
1801 break; 1769 break;
1802 case 0x0071: // PR_CONVERSATION_INDEX Date 2 1770 case 0x0071: // PR_CONVERSATION_INDEX Date 2
1803 DEBUG_EMAIL(("Conversation Index - ")); 1771 DEBUG_EMAIL(("Conversation Index - "));
1804 MALLOC_EMAIL(item); 1772 MALLOC_EMAIL(item);
1805 memcpy(&(item->email->conv_index), list->items[x]->data, sizeof(item->email->conv_index)); 1773 memcpy(&(item->email->conv_index), list->items[x]->data, sizeof(item->email->conv_index));
1806 DEBUG_EMAIL(("%i\n", item->email->conv_index)); 1774 DEBUG_EMAIL(("%i\n", item->email->conv_index));
1807 //INC_CHECK_X();
1808 break; 1775 break;
1809 case 0x0075: // PR_RECEIVED_BY_ADDRTYPE Recipient Access Method 1776 case 0x0075: // PR_RECEIVED_BY_ADDRTYPE Recipient Access Method
1810 DEBUG_EMAIL(("Received by Address type - ")); 1777 DEBUG_EMAIL(("Received by Address type - "));
1811 MALLOC_EMAIL(item); 1778 MALLOC_EMAIL(item);
1812 LIST_COPY(item->email->recip_access, (char*)); 1779 LIST_COPY(item->email->recip_access, (char*));
1813 DEBUG_EMAIL(("%s\n", item->email->recip_access)); 1780 DEBUG_EMAIL(("%s\n", item->email->recip_access));
1814 //INC_CHECK_X();
1815 break; 1781 break;
1816 case 0x0076: // PR_RECEIVED_BY_EMAIL_ADDRESS Recipient Address 1782 case 0x0076: // PR_RECEIVED_BY_EMAIL_ADDRESS Recipient Address
1817 DEBUG_EMAIL(("Received by Address - ")); 1783 DEBUG_EMAIL(("Received by Address - "));
1818 MALLOC_EMAIL(item); 1784 MALLOC_EMAIL(item);
1819 LIST_COPY(item->email->recip_address, (char*)); 1785 LIST_COPY(item->email->recip_address, (char*));
1820 DEBUG_EMAIL(("%s\n", item->email->recip_address)); 1786 DEBUG_EMAIL(("%s\n", item->email->recip_address));
1821 //INC_CHECK_X();
1822 break; 1787 break;
1823 case 0x0077: // PR_RCVD_REPRESENTING_ADDRTYPE Recipient Access Method 2 1788 case 0x0077: // PR_RCVD_REPRESENTING_ADDRTYPE Recipient Access Method 2
1824 DEBUG_EMAIL(("Received on behalf of Address type - ")); 1789 DEBUG_EMAIL(("Received on behalf of Address type - "));
1825 MALLOC_EMAIL(item); 1790 MALLOC_EMAIL(item);
1826 LIST_COPY(item->email->recip2_access, (char*)); 1791 LIST_COPY(item->email->recip2_access, (char*));
1827 DEBUG_EMAIL(("%s\n", item->email->recip2_access)); 1792 DEBUG_EMAIL(("%s\n", item->email->recip2_access));
1828 //INC_CHECK_X();
1829 break; 1793 break;
1830 case 0x0078: // PR_RCVD_REPRESENTING_EMAIL_ADDRESS Recipient Address 2 1794 case 0x0078: // PR_RCVD_REPRESENTING_EMAIL_ADDRESS Recipient Address 2
1831 DEBUG_EMAIL(("Received on behalf of Address -")); 1795 DEBUG_EMAIL(("Received on behalf of Address -"));
1832 MALLOC_EMAIL(item); 1796 MALLOC_EMAIL(item);
1833 LIST_COPY(item->email->recip2_address, (char*)); 1797 LIST_COPY(item->email->recip2_address, (char*));
1834 DEBUG_EMAIL(("%s\n", item->email->recip2_address)); 1798 DEBUG_EMAIL(("%s\n", item->email->recip2_address));
1835 //INC_CHECK_X();
1836 break; 1799 break;
1837 case 0x007D: // PR_TRANSPORT_MESSAGE_HEADERS Internet Header 1800 case 0x007D: // PR_TRANSPORT_MESSAGE_HEADERS Internet Header
1838 DEBUG_EMAIL(("Internet Header - ")); 1801 DEBUG_EMAIL(("Internet Header - "));
1839 MALLOC_EMAIL(item); 1802 MALLOC_EMAIL(item);
1840 LIST_COPY(item->email->header, (char*)); 1803 LIST_COPY(item->email->header, (char*));
1841 //DEBUG_EMAIL(("%s\n", item->email->header)); 1804 //DEBUG_EMAIL(("%s\n", item->email->header));
1842 DEBUG_EMAIL(("NOT PRINTED\n")); 1805 DEBUG_EMAIL(("NOT PRINTED\n"));
1843 //INC_CHECK_X();
1844 break; 1806 break;
1845 case 0x0C17: // PR_REPLY_REQUESTED 1807 case 0x0C17: // PR_REPLY_REQUESTED
1846 DEBUG_EMAIL(("Reply Requested - ")); 1808 DEBUG_EMAIL(("Reply Requested - "));
1847 MALLOC_EMAIL(item); 1809 MALLOC_EMAIL(item);
1848 if (*(int16_t*)list->items[x]->data != 0) { 1810 if (*(int16_t*)list->items[x]->data != 0) {
1853 item->email->reply_requested = 0; 1815 item->email->reply_requested = 0;
1854 } 1816 }
1855 break; 1817 break;
1856 case 0x0C19: // PR_SENDER_ENTRYID Sender Structure 2 1818 case 0x0C19: // PR_SENDER_ENTRYID Sender Structure 2
1857 DEBUG_EMAIL(("Sender Structure 2 -- NOT HANDLED\n")); 1819 DEBUG_EMAIL(("Sender Structure 2 -- NOT HANDLED\n"));
1858 //INC_CHECK_X();
1859 break; 1820 break;
1860 case 0x0C1A: // PR_SENDER_NAME Name of Sender Structure 2 1821 case 0x0C1A: // PR_SENDER_NAME Name of Sender Structure 2
1861 DEBUG_EMAIL(("Name of Sender Structure 2 -- NOT HANDLED\n")); 1822 DEBUG_EMAIL(("Name of Sender Structure 2 -- NOT HANDLED\n"));
1862 //INC_CHECK_X();
1863 break; 1823 break;
1864 case 0x0C1D: // PR_SENDER_SEARCH_KEY Name of Sender Address 2 1824 case 0x0C1D: // PR_SENDER_SEARCH_KEY Name of Sender Address 2
1865 DEBUG_EMAIL(("Name of Sender Address 2 (Sender search key) - ")); 1825 DEBUG_EMAIL(("Name of Sender Address 2 (Sender search key) - "));
1866 MALLOC_EMAIL(item); 1826 MALLOC_EMAIL(item);
1867 LIST_COPY(item->email->outlook_sender2, (char*)); 1827 LIST_COPY(item->email->outlook_sender2, (char*));
1868 DEBUG_EMAIL(("%s\n", item->email->outlook_sender2)); 1828 DEBUG_EMAIL(("%s\n", item->email->outlook_sender2));
1869 //INC_CHECK_X();
1870 break; 1829 break;
1871 case 0x0C1E: // PR_SENDER_ADDRTYPE Sender Address 2 access method 1830 case 0x0C1E: // PR_SENDER_ADDRTYPE Sender Address 2 access method
1872 DEBUG_EMAIL(("Sender Address type - ")); 1831 DEBUG_EMAIL(("Sender Address type - "));
1873 MALLOC_EMAIL(item); 1832 MALLOC_EMAIL(item);
1874 LIST_COPY(item->email->sender2_access, (char*)); 1833 LIST_COPY(item->email->sender2_access, (char*));
1875 DEBUG_EMAIL(("%s\n", item->email->sender2_access)); 1834 DEBUG_EMAIL(("%s\n", item->email->sender2_access));
1876 //INC_CHECK_X();
1877 break; 1835 break;
1878 case 0x0C1F: // PR_SENDER_EMAIL_ADDRESS Sender Address 2 1836 case 0x0C1F: // PR_SENDER_EMAIL_ADDRESS Sender Address 2
1879 DEBUG_EMAIL(("Sender Address - ")); 1837 DEBUG_EMAIL(("Sender Address - "));
1880 MALLOC_EMAIL(item); 1838 MALLOC_EMAIL(item);
1881 LIST_COPY(item->email->sender2_address, (char*)); 1839 LIST_COPY(item->email->sender2_address, (char*));
1882 DEBUG_EMAIL(("%s\n", item->email->sender2_address)); 1840 DEBUG_EMAIL(("%s\n", item->email->sender2_address));
1883 //INC_CHECK_X();
1884 break; 1841 break;
1885 case 0x0E01: // PR_DELETE_AFTER_SUBMIT 1842 case 0x0E01: // PR_DELETE_AFTER_SUBMIT
1886 // I am not too sure how this works 1843 // I am not too sure how this works
1887 DEBUG_EMAIL(("Delete after submit - ")); 1844 DEBUG_EMAIL(("Delete after submit - "));
1888 MALLOC_EMAIL(item); 1845 MALLOC_EMAIL(item);
1891 item->email->delete_after_submit = 1; 1848 item->email->delete_after_submit = 1;
1892 } else { 1849 } else {
1893 DEBUG_EMAIL(("False\n")); 1850 DEBUG_EMAIL(("False\n"));
1894 item->email->delete_after_submit = 0; 1851 item->email->delete_after_submit = 0;
1895 } 1852 }
1896 //INC_CHECK_X();
1897 break; 1853 break;
1898 case 0x0E03: // PR_DISPLAY_CC CC Addresses 1854 case 0x0E03: // PR_DISPLAY_CC CC Addresses
1899 DEBUG_EMAIL(("Display CC Addresses - ")); 1855 DEBUG_EMAIL(("Display CC Addresses - "));
1900 MALLOC_EMAIL(item); 1856 MALLOC_EMAIL(item);
1901 LIST_COPY(item->email->cc_address, (char*)); 1857 LIST_COPY(item->email->cc_address, (char*));
1902 DEBUG_EMAIL(("%s\n", item->email->cc_address)); 1858 DEBUG_EMAIL(("%s\n", item->email->cc_address));
1903 //INC_CHECK_X();
1904 break; 1859 break;
1905 case 0x0E04: // PR_DISPLAY_TO Address Sent-To 1860 case 0x0E04: // PR_DISPLAY_TO Address Sent-To
1906 DEBUG_EMAIL(("Display Sent-To Address - ")); 1861 DEBUG_EMAIL(("Display Sent-To Address - "));
1907 MALLOC_EMAIL(item); 1862 MALLOC_EMAIL(item);
1908 LIST_COPY(item->email->sentto_address, (char*)); 1863 LIST_COPY(item->email->sentto_address, (char*));
1909 DEBUG_EMAIL(("%s\n", item->email->sentto_address)); 1864 DEBUG_EMAIL(("%s\n", item->email->sentto_address));
1910 //INC_CHECK_X();
1911 break; 1865 break;
1912 case 0x0E06: // PR_MESSAGE_DELIVERY_TIME Date 3 - Email Arrival Date 1866 case 0x0E06: // PR_MESSAGE_DELIVERY_TIME Date 3 - Email Arrival Date
1913 DEBUG_EMAIL(("Date 3 (Delivery Time) - ")); 1867 DEBUG_EMAIL(("Date 3 (Delivery Time) - "));
1914 MALLOC_EMAIL(item); 1868 MALLOC_EMAIL(item);
1915 LIST_COPY(item->email->arrival_date, (FILETIME*)); 1869 LIST_COPY(item->email->arrival_date, (FILETIME*));
1916 DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->arrival_date))); 1870 DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->arrival_date)));
1917 //INC_CHECK_X();
1918 break; 1871 break;
1919 case 0x0E07: // PR_MESSAGE_FLAGS Email Flag 1872 case 0x0E07: // PR_MESSAGE_FLAGS Email Flag
1920 // 0x01 - Read 1873 // 0x01 - Read
1921 // 0x02 - Unmodified 1874 // 0x02 - Unmodified
1922 // 0x04 - Submit 1875 // 0x04 - Submit
1930 DEBUG_EMAIL(("Message Flags - ")); 1883 DEBUG_EMAIL(("Message Flags - "));
1931 MALLOC_EMAIL(item); 1884 MALLOC_EMAIL(item);
1932 memcpy(&(item->email->flag), list->items[x]->data, sizeof(item->email->flag)); 1885 memcpy(&(item->email->flag), list->items[x]->data, sizeof(item->email->flag));
1933 LE32_CPU(item->email->flag); 1886 LE32_CPU(item->email->flag);
1934 DEBUG_EMAIL(("%i\n", item->email->flag)); 1887 DEBUG_EMAIL(("%i\n", item->email->flag));
1935 //INC_CHECK_X();
1936 break; 1888 break;
1937 case 0x0E08: // PR_MESSAGE_SIZE Total size of a message object 1889 case 0x0E08: // PR_MESSAGE_SIZE Total size of a message object
1938 DEBUG_EMAIL(("Message Size - ")); 1890 DEBUG_EMAIL(("Message Size - "));
1939 memcpy(&(item->message_size), list->items[x]->data, sizeof(item->message_size)); 1891 memcpy(&(item->message_size), list->items[x]->data, sizeof(item->message_size));
1940 LE32_CPU(item->message_size); 1892 LE32_CPU(item->message_size);
1941 DEBUG_EMAIL(("%i [%#x]\n", item->message_size, item->message_size)); 1893 DEBUG_EMAIL(("%i [%#x]\n", item->message_size, item->message_size));
1942 //INC_CHECK_X();
1943 break; 1894 break;
1944 case 0x0E0A: // PR_SENTMAIL_ENTRYID 1895 case 0x0E0A: // PR_SENTMAIL_ENTRYID
1945 // folder that this message is sent to after submission 1896 // folder that this message is sent to after submission
1946 DEBUG_EMAIL(("Sentmail EntryID - ")); 1897 DEBUG_EMAIL(("Sentmail EntryID - "));
1947 MALLOC_EMAIL(item); 1898 MALLOC_EMAIL(item);
1948 LIST_COPY(item->email->sentmail_folder, (pst_entryid*)); 1899 LIST_COPY(item->email->sentmail_folder, (pst_entryid*));
1949 LE32_CPU(item->email->sentmail_folder->id); 1900 LE32_CPU(item->email->sentmail_folder->id);
1950 DEBUG_EMAIL(("[id = %#x]\n", item->email->sentmail_folder->id)); 1901 DEBUG_EMAIL(("[id = %#x]\n", item->email->sentmail_folder->id));
1951 //INC_CHECK_X();
1952 break; 1902 break;
1953 case 0x0E1F: // PR_RTF_IN_SYNC 1903 case 0x0E1F: // PR_RTF_IN_SYNC
1954 // True means that the rtf version is same as text body 1904 // True means that the rtf version is same as text body
1955 // False means rtf version is more up-to-date than text body 1905 // False means rtf version is more up-to-date than text body
1956 // if this value doesn't exist, text body is more up-to-date than rtf and 1906 // if this value doesn't exist, text body is more up-to-date than rtf and
1962 item->email->rtf_in_sync = 1; 1912 item->email->rtf_in_sync = 1;
1963 } else { 1913 } else {
1964 DEBUG_EMAIL(("False\n")); 1914 DEBUG_EMAIL(("False\n"));
1965 item->email->rtf_in_sync = 0; 1915 item->email->rtf_in_sync = 0;
1966 } 1916 }
1967 //INC_CHECK_X();
1968 break; 1917 break;
1969 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record 1918 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record
1970 DEBUG_EMAIL(("Attachment Size - ")); 1919 DEBUG_EMAIL(("Attachment Size - "));
1971 NULL_CHECK(attach); 1920 NULL_CHECK(attach);
1972 MOVE_NEXT(attach); 1921 MOVE_NEXT(attach);
1973 memcpy(&(attach->size), list->items[x]->data, sizeof(attach->size)); 1922 memcpy(&(attach->size), list->items[x]->data, sizeof(attach->size));
1974 DEBUG_EMAIL(("%i\n", attach->size)); 1923 DEBUG_EMAIL(("%i\n", attach->size));
1975 //INC_CHECK_X();
1976 break; 1924 break;
1977 case 0x0FF9: // PR_RECORD_KEY Record Header 1 1925 case 0x0FF9: // PR_RECORD_KEY Record Header 1
1978 DEBUG_EMAIL(("Record Key 1 - ")); 1926 DEBUG_EMAIL(("Record Key 1 - "));
1979 LIST_COPY(item->record_key, (char*)); 1927 LIST_COPY(item->record_key, (char*));
1980 item->record_key_size = list->items[x]->size; 1928 item->record_key_size = list->items[x]->size;
1981 DEBUG_EMAIL_HEXPRINT(item->record_key, item->record_key_size); 1929 DEBUG_EMAIL_HEXPRINT(item->record_key, item->record_key_size);
1982 DEBUG_EMAIL(("\n")); 1930 DEBUG_EMAIL(("\n"));
1983 //INC_CHECK_X();
1984 break; 1931 break;
1985 case 0x1000: // PR_BODY Plain Text body 1932 case 0x1000: // PR_BODY Plain Text body
1986 DEBUG_EMAIL(("Plain Text body - ")); 1933 DEBUG_EMAIL(("Plain Text body - "));
1987 MALLOC_EMAIL(item); 1934 MALLOC_EMAIL(item);
1988 LIST_COPY(item->email->body, (char*)); 1935 LIST_COPY(item->email->body, (char*));
1989 //DEBUG_EMAIL("%s\n", item->email->body); 1936 //DEBUG_EMAIL("%s\n", item->email->body);
1990 DEBUG_EMAIL(("NOT PRINTED\n")); 1937 DEBUG_EMAIL(("NOT PRINTED\n"));
1991 //INC_CHECK_X();
1992 break; 1938 break;
1993 case 0x1006: // PR_RTF_SYNC_BODY_CRC 1939 case 0x1006: // PR_RTF_SYNC_BODY_CRC
1994 DEBUG_EMAIL(("RTF Sync Body CRC - ")); 1940 DEBUG_EMAIL(("RTF Sync Body CRC - "));
1995 MALLOC_EMAIL(item); 1941 MALLOC_EMAIL(item);
1996 memcpy(&(item->email->rtf_body_crc), list->items[x]->data, sizeof(item->email->rtf_body_crc)); 1942 memcpy(&(item->email->rtf_body_crc), list->items[x]->data, sizeof(item->email->rtf_body_crc));
1997 LE32_CPU(item->email->rtf_body_crc); 1943 LE32_CPU(item->email->rtf_body_crc);
1998 DEBUG_EMAIL(("%#x\n", item->email->rtf_body_crc)); 1944 DEBUG_EMAIL(("%#x\n", item->email->rtf_body_crc));
1999 //INC_CHECK_X();
2000 break; 1945 break;
2001 case 0x1007: // PR_RTF_SYNC_BODY_COUNT 1946 case 0x1007: // PR_RTF_SYNC_BODY_COUNT
2002 // a count of the *significant* charcters in the rtf body. Doesn't count 1947 // a count of the *significant* charcters in the rtf body. Doesn't count
2003 // whitespace and other ignorable characters 1948 // whitespace and other ignorable characters
2004 DEBUG_EMAIL(("RTF Sync Body character count - ")); 1949 DEBUG_EMAIL(("RTF Sync Body character count - "));
2005 MALLOC_EMAIL(item); 1950 MALLOC_EMAIL(item);
2006 memcpy(&(item->email->rtf_body_char_count), list->items[x]->data, sizeof(item->email->rtf_body_char_count)); 1951 memcpy(&(item->email->rtf_body_char_count), list->items[x]->data, sizeof(item->email->rtf_body_char_count));
2007 LE32_CPU(item->email->rtf_body_char_count); 1952 LE32_CPU(item->email->rtf_body_char_count);
2008 DEBUG_EMAIL(("%i [%#x]\n", item->email->rtf_body_char_count, item->email->rtf_body_char_count)); 1953 DEBUG_EMAIL(("%i [%#x]\n", item->email->rtf_body_char_count, item->email->rtf_body_char_count));
2009 //INC_CHECK_X();
2010 break; 1954 break;
2011 case 0x1008: // PR_RTF_SYNC_BODY_TAG 1955 case 0x1008: // PR_RTF_SYNC_BODY_TAG
2012 // the first couple of lines of RTF body so that after modification, then beginning can 1956 // the first couple of lines of RTF body so that after modification, then beginning can
2013 // once again be found 1957 // once again be found
2014 DEBUG_EMAIL(("RTF Sync body tag - ")); 1958 DEBUG_EMAIL(("RTF Sync body tag - "));
2015 MALLOC_EMAIL(item); 1959 MALLOC_EMAIL(item);
2016 LIST_COPY(item->email->rtf_body_tag, (char*)); 1960 LIST_COPY(item->email->rtf_body_tag, (char*));
2017 DEBUG_EMAIL(("%s\n", item->email->rtf_body_tag)); 1961 DEBUG_EMAIL(("%s\n", item->email->rtf_body_tag));
2018 //INC_CHECK_X();
2019 break; 1962 break;
2020 case 0x1009: // PR_RTF_COMPRESSED 1963 case 0x1009: // PR_RTF_COMPRESSED
2021 // some compression algorithm has been applied to this. At present 1964 // some compression algorithm has been applied to this. At present
2022 // it is unknown 1965 // it is unknown
2023 DEBUG_EMAIL(("RTF Compressed body - ")); 1966 DEBUG_EMAIL(("RTF Compressed body - "));
2024 MALLOC_EMAIL(item); 1967 MALLOC_EMAIL(item);
2025 LIST_COPY(item->email->rtf_compressed, (char*)); 1968 LIST_COPY(item->email->rtf_compressed, (char*));
2026 DEBUG_EMAIL(("NOT PRINTED\n")); 1969 DEBUG_EMAIL(("NOT PRINTED\n"));
2027 //INC_CHECK_X();
2028 break; 1970 break;
2029 case 0x1010: // PR_RTF_SYNC_PREFIX_COUNT 1971 case 0x1010: // PR_RTF_SYNC_PREFIX_COUNT
2030 // a count of the ignored characters before the first significant character 1972 // a count of the ignored characters before the first significant character
2031 DEBUG_EMAIL(("RTF whitespace prefix count - ")); 1973 DEBUG_EMAIL(("RTF whitespace prefix count - "));
2032 MALLOC_EMAIL(item); 1974 MALLOC_EMAIL(item);
2033 memcpy(&(item->email->rtf_ws_prefix_count), list->items[x]->data, sizeof(item->email->rtf_ws_prefix_count)); 1975 memcpy(&(item->email->rtf_ws_prefix_count), list->items[x]->data, sizeof(item->email->rtf_ws_prefix_count));
2034 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_prefix_count)); 1976 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_prefix_count));
2035 //INC_CHECK_X();
2036 break; 1977 break;
2037 case 0x1011: // PR_RTF_SYNC_TRAILING_COUNT 1978 case 0x1011: // PR_RTF_SYNC_TRAILING_COUNT
2038 // a count of the ignored characters after the last significant character 1979 // a count of the ignored characters after the last significant character
2039 DEBUG_EMAIL(("RTF whitespace tailing count - ")); 1980 DEBUG_EMAIL(("RTF whitespace tailing count - "));
2040 MALLOC_EMAIL(item); 1981 MALLOC_EMAIL(item);
2041 memcpy(&(item->email->rtf_ws_trailing_count), list->items[x]->data, sizeof(item->email->rtf_ws_trailing_count)); 1982 memcpy(&(item->email->rtf_ws_trailing_count), list->items[x]->data, sizeof(item->email->rtf_ws_trailing_count));
2042 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_trailing_count)); 1983 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_trailing_count));
2043 //INC_CHECK_X();
2044 break; 1984 break;
2045 case 0x1013: // HTML body 1985 case 0x1013: // HTML body
2046 DEBUG_EMAIL(("HTML body - ")); 1986 DEBUG_EMAIL(("HTML body - "));
2047 MALLOC_EMAIL(item); 1987 MALLOC_EMAIL(item);
2048 LIST_COPY(item->email->htmlbody, (char*)); 1988 LIST_COPY(item->email->htmlbody, (char*));
2049 // DEBUG_EMAIL(("%s\n", item->email->htmlbody)); 1989 // DEBUG_EMAIL(("%s\n", item->email->htmlbody));
2050 DEBUG_EMAIL(("NOT PRINTED\n")); 1990 DEBUG_EMAIL(("NOT PRINTED\n"));
2051 //INC_CHECK_X();
2052 break; 1991 break;
2053 case 0x1035: // Message ID 1992 case 0x1035: // Message ID
2054 DEBUG_EMAIL(("Message ID - ")); 1993 DEBUG_EMAIL(("Message ID - "));
2055 MALLOC_EMAIL(item); 1994 MALLOC_EMAIL(item);
2056 LIST_COPY(item->email->messageid, (char*)); 1995 LIST_COPY(item->email->messageid, (char*));
2057 DEBUG_EMAIL(("%s\n", item->email->messageid)); 1996 DEBUG_EMAIL(("%s\n", item->email->messageid));
2058 //INC_CHECK_X();
2059 break; 1997 break;
2060 case 0x1042: // in-reply-to 1998 case 0x1042: // in-reply-to
2061 DEBUG_EMAIL(("In-Reply-To - ")); 1999 DEBUG_EMAIL(("In-Reply-To - "));
2062 MALLOC_EMAIL(item); 2000 MALLOC_EMAIL(item);
2063 LIST_COPY(item->email->in_reply_to, (char*)); 2001 LIST_COPY(item->email->in_reply_to, (char*));
2064 DEBUG_EMAIL(("%s\n", item->email->in_reply_to)); 2002 DEBUG_EMAIL(("%s\n", item->email->in_reply_to));
2065 //INC_CHECK_X();
2066 break; 2003 break;
2067 case 0x1046: // Return Path 2004 case 0x1046: // Return Path
2068 DEBUG_EMAIL(("Return Path - ")); 2005 DEBUG_EMAIL(("Return Path - "));
2069 MALLOC_EMAIL(item); 2006 MALLOC_EMAIL(item);
2070 LIST_COPY(item->email->return_path_address, (char*)); 2007 LIST_COPY(item->email->return_path_address, (char*));
2071 DEBUG_EMAIL(("%s\n", item->email->return_path_address)); 2008 DEBUG_EMAIL(("%s\n", item->email->return_path_address));
2072 //INC_CHECK_X();
2073 break; 2009 break;
2074 case 0x3001: // PR_DISPLAY_NAME File As 2010 case 0x3001: // PR_DISPLAY_NAME File As
2075 DEBUG_EMAIL(("Display Name - ")); 2011 DEBUG_EMAIL(("Display Name - "));
2076 LIST_COPY(item->file_as, (char*)); 2012 LIST_COPY(item->file_as, (char*));
2077 DEBUG_EMAIL(("%s\n", item->file_as)); 2013 DEBUG_EMAIL(("%s\n", item->file_as));
2078 //INC_CHECK_X();
2079 break; 2014 break;
2080 case 0x3002: // PR_ADDRTYPE 2015 case 0x3002: // PR_ADDRTYPE
2081 DEBUG_EMAIL(("Address Type - ")); 2016 DEBUG_EMAIL(("Address Type - "));
2082 MALLOC_CONTACT(item); 2017 MALLOC_CONTACT(item);
2083 LIST_COPY(item->contact->address1_transport, (char*)); 2018 LIST_COPY(item->contact->address1_transport, (char*));
2084 DEBUG_EMAIL(("|%s|\n", item->contact->address1_transport)); 2019 DEBUG_EMAIL(("|%s|\n", item->contact->address1_transport));
2085 //INC_CHECK_X();
2086 break; 2020 break;
2087 case 0x3003: // PR_EMAIL_ADDRESS 2021 case 0x3003: // PR_EMAIL_ADDRESS
2088 // Contact's email address 2022 // Contact's email address
2089 DEBUG_EMAIL(("Contact Address - ")); 2023 DEBUG_EMAIL(("Contact Address - "));
2090 MALLOC_CONTACT(item); 2024 MALLOC_CONTACT(item);
2091 LIST_COPY(item->contact->address1, (char*)); 2025 LIST_COPY(item->contact->address1, (char*));
2092 DEBUG_EMAIL(("|%s|\n", item->contact->address1)); 2026 DEBUG_EMAIL(("|%s|\n", item->contact->address1));
2093 //INC_CHECK_X();
2094 break; 2027 break;
2095 case 0x3004: // PR_COMMENT Comment for item - usually folders 2028 case 0x3004: // PR_COMMENT Comment for item - usually folders
2096 DEBUG_EMAIL(("Comment - ")); 2029 DEBUG_EMAIL(("Comment - "));
2097 LIST_COPY(item->comment, (char*)); 2030 LIST_COPY(item->comment, (char*));
2098 DEBUG_EMAIL(("%s\n", item->comment)); 2031 DEBUG_EMAIL(("%s\n", item->comment));
2099 //INC_CHECK_X();
2100 break; 2032 break;
2101 case 0x3007: // PR_CREATION_TIME Date 4 - Creation Date? 2033 case 0x3007: // PR_CREATION_TIME Date 4 - Creation Date?
2102 DEBUG_EMAIL(("Date 4 (Item Creation Date) - ")); 2034 DEBUG_EMAIL(("Date 4 (Item Creation Date) - "));
2103 LIST_COPY(item->create_date, (FILETIME*)); 2035 LIST_COPY(item->create_date, (FILETIME*));
2104 DEBUG_EMAIL(("%s", fileTimeToAscii(item->create_date))); 2036 DEBUG_EMAIL(("%s", fileTimeToAscii(item->create_date)));
2105 //INC_CHECK_X();
2106 break; 2037 break;
2107 case 0x3008: // PR_LAST_MODIFICATION_TIME Date 5 - Modify Date 2038 case 0x3008: // PR_LAST_MODIFICATION_TIME Date 5 - Modify Date
2108 DEBUG_EMAIL(("Date 5 (Modify Date) - ")); 2039 DEBUG_EMAIL(("Date 5 (Modify Date) - "));
2109 LIST_COPY(item->modify_date, (FILETIME*)); 2040 LIST_COPY(item->modify_date, (FILETIME*));
2110 DEBUG_EMAIL(("%s", fileTimeToAscii(item->modify_date))); 2041 DEBUG_EMAIL(("%s", fileTimeToAscii(item->modify_date)));
2111 //INC_CHECK_X();
2112 break; 2042 break;
2113 case 0x300B: // PR_SEARCH_KEY Record Header 2 2043 case 0x300B: // PR_SEARCH_KEY Record Header 2
2114 DEBUG_EMAIL(("Record Search 2 -- NOT HANDLED\n")); 2044 DEBUG_EMAIL(("Record Search 2 -- NOT HANDLED\n"));
2115 //INC_CHECK_X();
2116 break; 2045 break;
2117 case 0x35DF: // PR_VALID_FOLDER_MASK 2046 case 0x35DF: // PR_VALID_FOLDER_MASK
2118 // States which folders are valid for this message store 2047 // States which folders are valid for this message store
2119 // FOLDER_IPM_SUBTREE_VALID 0x1 2048 // FOLDER_IPM_SUBTREE_VALID 0x1
2120 // FOLDER_IPM_INBOX_VALID 0x2 2049 // FOLDER_IPM_INBOX_VALID 0x2
2127 DEBUG_EMAIL(("Valid Folder Mask - ")); 2056 DEBUG_EMAIL(("Valid Folder Mask - "));
2128 MALLOC_MESSAGESTORE(item); 2057 MALLOC_MESSAGESTORE(item);
2129 memcpy(&(item->message_store->valid_mask), list->items[x]->data, sizeof(int)); 2058 memcpy(&(item->message_store->valid_mask), list->items[x]->data, sizeof(int));
2130 LE32_CPU(item->message_store->valid_mask); 2059 LE32_CPU(item->message_store->valid_mask);
2131 DEBUG_EMAIL(("%i\n", item->message_store->valid_mask)); 2060 DEBUG_EMAIL(("%i\n", item->message_store->valid_mask));
2132 //INC_CHECK_X();
2133 break; 2061 break;
2134 case 0x35E0: // PR_IPM_SUBTREE_ENTRYID Top of Personal Folder Record 2062 case 0x35E0: // PR_IPM_SUBTREE_ENTRYID Top of Personal Folder Record
2135 DEBUG_EMAIL(("Top of Personal Folder Record - ")); 2063 DEBUG_EMAIL(("Top of Personal Folder Record - "));
2136 MALLOC_MESSAGESTORE(item); 2064 MALLOC_MESSAGESTORE(item);
2137 LIST_COPY(item->message_store->top_of_personal_folder, (pst_entryid*)); 2065 LIST_COPY(item->message_store->top_of_personal_folder, (pst_entryid*));
2138 LE32_CPU(item->message_store->top_of_personal_folder->id); 2066 LE32_CPU(item->message_store->top_of_personal_folder->id);
2139 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->top_of_personal_folder->id)); 2067 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->top_of_personal_folder->id));
2140 //INC_CHECK_X();
2141 break; 2068 break;
2142 case 0x35E3: // PR_IPM_WASTEBASKET_ENTRYID Deleted Items Folder Record 2069 case 0x35E3: // PR_IPM_WASTEBASKET_ENTRYID Deleted Items Folder Record
2143 DEBUG_EMAIL(("Deleted Items Folder record - ")); 2070 DEBUG_EMAIL(("Deleted Items Folder record - "));
2144 MALLOC_MESSAGESTORE(item); 2071 MALLOC_MESSAGESTORE(item);
2145 LIST_COPY(item->message_store->deleted_items_folder, (pst_entryid*)); 2072 LIST_COPY(item->message_store->deleted_items_folder, (pst_entryid*));
2146 LE32_CPU(item->message_store->deleted_items_folder->id); 2073 LE32_CPU(item->message_store->deleted_items_folder->id);
2147 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->deleted_items_folder->id)); 2074 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->deleted_items_folder->id));
2148 //INC_CHECK_X();
2149 break; 2075 break;
2150 case 0x35E7: // PR_FINDER_ENTRYID Search Root Record 2076 case 0x35E7: // PR_FINDER_ENTRYID Search Root Record
2151 DEBUG_EMAIL(("Search Root record - ")); 2077 DEBUG_EMAIL(("Search Root record - "));
2152 MALLOC_MESSAGESTORE(item); 2078 MALLOC_MESSAGESTORE(item);
2153 LIST_COPY(item->message_store->search_root_folder, (pst_entryid*)); 2079 LIST_COPY(item->message_store->search_root_folder, (pst_entryid*));
2154 LE32_CPU(item->message_store->search_root_folder->id); 2080 LE32_CPU(item->message_store->search_root_folder->id);
2155 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->search_root_folder->id)); 2081 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->search_root_folder->id));
2156 //INC_CHECK_X();
2157 break; 2082 break;
2158 case 0x3602: // PR_CONTENT_COUNT Number of emails stored in a folder 2083 case 0x3602: // PR_CONTENT_COUNT Number of emails stored in a folder
2159 DEBUG_EMAIL(("Folder Email Count - ")); 2084 DEBUG_EMAIL(("Folder Email Count - "));
2160 MALLOC_FOLDER(item); 2085 MALLOC_FOLDER(item);
2161 memcpy(&(item->folder->email_count), list->items[x]->data, sizeof(item->folder->email_count)); 2086 memcpy(&(item->folder->email_count), list->items[x]->data, sizeof(item->folder->email_count));
2162 LE32_CPU(item->folder->email_count); 2087 LE32_CPU(item->folder->email_count);
2163 DEBUG_EMAIL(("%i\n", item->folder->email_count)); 2088 DEBUG_EMAIL(("%i\n", item->folder->email_count));
2164 //INC_CHECK_X();
2165 break; 2089 break;
2166 case 0x3603: // PR_CONTENT_UNREAD Number of unread emails 2090 case 0x3603: // PR_CONTENT_UNREAD Number of unread emails
2167 DEBUG_EMAIL(("Unread Email Count - ")); 2091 DEBUG_EMAIL(("Unread Email Count - "));
2168 MALLOC_FOLDER(item); 2092 MALLOC_FOLDER(item);
2169 memcpy(&(item->folder->unseen_email_count), list->items[x]->data, sizeof(item->folder->unseen_email_count)); 2093 memcpy(&(item->folder->unseen_email_count), list->items[x]->data, sizeof(item->folder->unseen_email_count));
2170 LE32_CPU(item->folder->unseen_email_count); 2094 LE32_CPU(item->folder->unseen_email_count);
2171 DEBUG_EMAIL(("%i\n", item->folder->unseen_email_count)); 2095 DEBUG_EMAIL(("%i\n", item->folder->unseen_email_count));
2172 //INC_CHECK_X();
2173 break; 2096 break;
2174 case 0x360A: // PR_SUBFOLDERS Has children 2097 case 0x360A: // PR_SUBFOLDERS Has children
2175 DEBUG_EMAIL(("Has Subfolders - ")); 2098 DEBUG_EMAIL(("Has Subfolders - "));
2176 MALLOC_FOLDER(item); 2099 MALLOC_FOLDER(item);
2177 if (*((int32_t*)list->items[x]->data) != 0) { 2100 if (*((int32_t*)list->items[x]->data) != 0) {
2179 item->folder->subfolder = 1; 2102 item->folder->subfolder = 1;
2180 } else { 2103 } else {
2181 DEBUG_EMAIL(("False\n")); 2104 DEBUG_EMAIL(("False\n"));
2182 item->folder->subfolder = 0; 2105 item->folder->subfolder = 0;
2183 } 2106 }
2184 //INC_CHECK_X();
2185 break; 2107 break;
2186 case 0x3613: // PR_CONTAINER_CLASS IPF.x 2108 case 0x3613: // PR_CONTAINER_CLASS IPF.x
2187 DEBUG_EMAIL(("IPF.x - ")); 2109 DEBUG_EMAIL(("IPF.x - "));
2188 LIST_COPY(item->ascii_type, (char*)); 2110 LIST_COPY(item->ascii_type, (char*));
2189 if (strncmp("IPF.Note", item->ascii_type, 8) == 0) 2111 if (strncmp("IPF.Note", item->ascii_type, 8) == 0)
2200 item->type = PST_TYPE_TASK; 2122 item->type = PST_TYPE_TASK;
2201 else 2123 else
2202 item->type = PST_TYPE_OTHER; 2124 item->type = PST_TYPE_OTHER;
2203 2125
2204 DEBUG_EMAIL(("%s [%i]\n", item->ascii_type, item->type)); 2126 DEBUG_EMAIL(("%s [%i]\n", item->ascii_type, item->type));
2205 //INC_CHECK_X();
2206 break; 2127 break;
2207 case 0x3617: // PR_ASSOC_CONTENT_COUNT 2128 case 0x3617: // PR_ASSOC_CONTENT_COUNT
2208 // associated content are items that are attached to this folder 2129 // associated content are items that are attached to this folder
2209 // but are hidden from users 2130 // but are hidden from users
2210 DEBUG_EMAIL(("Associate Content count - ")); 2131 DEBUG_EMAIL(("Associate Content count - "));
2211 MALLOC_FOLDER(item); 2132 MALLOC_FOLDER(item);
2212 memcpy(&(item->folder->assoc_count), list->items[x]->data, sizeof(item->folder->assoc_count)); 2133 memcpy(&(item->folder->assoc_count), list->items[x]->data, sizeof(item->folder->assoc_count));
2213 LE32_CPU(item->folder->assoc_count); 2134 LE32_CPU(item->folder->assoc_count);
2214 DEBUG_EMAIL(("%i [%#x]\n", item->folder->assoc_count, item->folder->assoc_count)); 2135 DEBUG_EMAIL(("%i [%#x]\n", item->folder->assoc_count, item->folder->assoc_count));
2215 //INC_CHECK_X();
2216 break; 2136 break;
2217 case 0x3701: // PR_ATTACH_DATA_OBJ binary data of attachment 2137 case 0x3701: // PR_ATTACH_DATA_OBJ binary data of attachment
2218 DEBUG_EMAIL(("Binary Data [Size %i] - ", list->items[x]->size)); 2138 DEBUG_EMAIL(("Binary Data [Size %i] - ", list->items[x]->size));
2219 NULL_CHECK(attach); 2139 NULL_CHECK(attach);
2220 MOVE_NEXT(attach); 2140 MOVE_NEXT(attach);
2225 } else { 2145 } else {
2226 LIST_COPY(attach->data, (char*)); 2146 LIST_COPY(attach->data, (char*));
2227 attach->size = list->items[x]->size; 2147 attach->size = list->items[x]->size;
2228 DEBUG_EMAIL(("NOT PRINTED\n")); 2148 DEBUG_EMAIL(("NOT PRINTED\n"));
2229 } 2149 }
2230 //INC_CHECK_X();
2231 break; 2150 break;
2232 case 0x3704: // PR_ATTACH_FILENAME Attachment filename (8.3) 2151 case 0x3704: // PR_ATTACH_FILENAME Attachment filename (8.3)
2233 DEBUG_EMAIL(("Attachment Filename - ")); 2152 DEBUG_EMAIL(("Attachment Filename - "));
2234 NULL_CHECK(attach); 2153 NULL_CHECK(attach);
2235 MOVE_NEXT(attach); 2154 MOVE_NEXT(attach);
2236 LIST_COPY(attach->filename1, (char*)); 2155 LIST_COPY(attach->filename1, (char*));
2237 DEBUG_EMAIL(("%s\n", attach->filename1)); 2156 DEBUG_EMAIL(("%s\n", attach->filename1));
2238 //INC_CHECK_X();
2239 break; 2157 break;
2240 case 0x3705: // PR_ATTACH_METHOD 2158 case 0x3705: // PR_ATTACH_METHOD
2241 // 0 - No Attachment 2159 // 0 - No Attachment
2242 // 1 - Attach by Value 2160 // 1 - Attach by Value
2243 // 2 - Attach by reference 2161 // 2 - Attach by reference
2255 (t==1?"Attach By Value": 2173 (t==1?"Attach By Value":
2256 (t==2?"Attach By Reference": 2174 (t==2?"Attach By Reference":
2257 (t==3?"Attach by Ref. Resolve": 2175 (t==3?"Attach by Ref. Resolve":
2258 (t==4?"Attach by Ref. Only": 2176 (t==4?"Attach by Ref. Only":
2259 (t==5?"Embedded Message":"OLE")))))),t)); 2177 (t==5?"Embedded Message":"OLE")))))),t));
2260 //INC_CHECK_X();
2261 break; 2178 break;
2262 case 0x3707: // PR_ATTACH_LONG_FILENAME Attachment filename (long?) 2179 case 0x3707: // PR_ATTACH_LONG_FILENAME Attachment filename (long?)
2263 DEBUG_EMAIL(("Attachment Filename long - ")); 2180 DEBUG_EMAIL(("Attachment Filename long - "));
2264 NULL_CHECK(attach); 2181 NULL_CHECK(attach);
2265 MOVE_NEXT(attach); 2182 MOVE_NEXT(attach);
2266 LIST_COPY(attach->filename2, (char*)); 2183 LIST_COPY(attach->filename2, (char*));
2267 DEBUG_EMAIL(("%s\n", attach->filename2)); 2184 DEBUG_EMAIL(("%s\n", attach->filename2));
2268 //INC_CHECK_X();
2269 break; 2185 break;
2270 case 0x370B: // PR_RENDERING_POSITION 2186 case 0x370B: // PR_RENDERING_POSITION
2271 // position in characters that the attachment appears in the plain text body 2187 // position in characters that the attachment appears in the plain text body
2272 DEBUG_EMAIL(("Attachment Position - ")); 2188 DEBUG_EMAIL(("Attachment Position - "));
2273 NULL_CHECK(attach); 2189 NULL_CHECK(attach);
2274 MOVE_NEXT(attach); 2190 MOVE_NEXT(attach);
2275 memcpy(&(attach->position), list->items[x]->data, sizeof(attach->position)); 2191 memcpy(&(attach->position), list->items[x]->data, sizeof(attach->position));
2276 LE32_CPU(attach->position); 2192 LE32_CPU(attach->position);
2277 DEBUG_EMAIL(("%i [%#x]\n", attach->position)); 2193 DEBUG_EMAIL(("%i [%#x]\n", attach->position));
2278 //INC_CHECK_X();
2279 break; 2194 break;
2280 case 0x370E: // PR_ATTACH_MIME_TAG Mime type of encoding 2195 case 0x370E: // PR_ATTACH_MIME_TAG Mime type of encoding
2281 DEBUG_EMAIL(("Attachment mime encoding - ")); 2196 DEBUG_EMAIL(("Attachment mime encoding - "));
2282 NULL_CHECK(attach); 2197 NULL_CHECK(attach);
2283 MOVE_NEXT(attach); 2198 MOVE_NEXT(attach);
2284 LIST_COPY(attach->mimetype, (char*)); 2199 LIST_COPY(attach->mimetype, (char*));
2285 DEBUG_EMAIL(("%s\n", attach->mimetype)); 2200 DEBUG_EMAIL(("%s\n", attach->mimetype));
2286 //INC_CHECK_X();
2287 break; 2201 break;
2288 case 0x3710: // PR_ATTACH_MIME_SEQUENCE 2202 case 0x3710: // PR_ATTACH_MIME_SEQUENCE
2289 // sequence number for mime parts. Includes body 2203 // sequence number for mime parts. Includes body
2290 DEBUG_EMAIL(("Attachment Mime Sequence - ")); 2204 DEBUG_EMAIL(("Attachment Mime Sequence - "));
2291 NULL_CHECK(attach); 2205 NULL_CHECK(attach);
2292 MOVE_NEXT(attach); 2206 MOVE_NEXT(attach);
2293 memcpy(&(attach->sequence), list->items[x]->data, sizeof(attach->sequence)); 2207 memcpy(&(attach->sequence), list->items[x]->data, sizeof(attach->sequence));
2294 LE32_CPU(attach->sequence); 2208 LE32_CPU(attach->sequence);
2295 DEBUG_EMAIL(("%i\n", attach->sequence)); 2209 DEBUG_EMAIL(("%i\n", attach->sequence));
2296 //INC_CHECK_X();
2297 break; 2210 break;
2298 case 0x3A00: // PR_ACCOUNT 2211 case 0x3A00: // PR_ACCOUNT
2299 DEBUG_EMAIL(("Contact's Account name - ")); 2212 DEBUG_EMAIL(("Contact's Account name - "));
2300 MALLOC_CONTACT(item); 2213 MALLOC_CONTACT(item);
2301 LIST_COPY(item->contact->account_name, (char*)); 2214 LIST_COPY(item->contact->account_name, (char*));
2330 case 0x3A06: // PR_GIVEN_NAME Contact's first name 2243 case 0x3A06: // PR_GIVEN_NAME Contact's first name
2331 DEBUG_EMAIL(("Contacts First Name - ")); 2244 DEBUG_EMAIL(("Contacts First Name - "));
2332 MALLOC_CONTACT(item); 2245 MALLOC_CONTACT(item);
2333 LIST_COPY(item->contact->first_name, (char*)); 2246 LIST_COPY(item->contact->first_name, (char*));
2334 DEBUG_EMAIL(("%s\n", item->contact->first_name)); 2247 DEBUG_EMAIL(("%s\n", item->contact->first_name));
2335 //INC_CHECK_X();
2336 break; 2248 break;
2337 case 0x3A07: // PR_GOVERNMENT_ID_NUMBER 2249 case 0x3A07: // PR_GOVERNMENT_ID_NUMBER
2338 DEBUG_EMAIL(("Contacts Government ID Number - ")); 2250 DEBUG_EMAIL(("Contacts Government ID Number - "));
2339 MALLOC_CONTACT(item); 2251 MALLOC_CONTACT(item);
2340 LIST_COPY(item->contact->gov_id, (char*)); 2252 LIST_COPY(item->contact->gov_id, (char*));
2355 case 0x3A0A: // PR_INITIALS Contact's Initials 2267 case 0x3A0A: // PR_INITIALS Contact's Initials
2356 DEBUG_EMAIL(("Contacts Initials - ")); 2268 DEBUG_EMAIL(("Contacts Initials - "));
2357 MALLOC_CONTACT(item); 2269 MALLOC_CONTACT(item);
2358 LIST_COPY(item->contact->initials, (char*)); 2270 LIST_COPY(item->contact->initials, (char*));
2359 DEBUG_EMAIL(("%s\n", item->contact->initials)); 2271 DEBUG_EMAIL(("%s\n", item->contact->initials));
2360 //INC_CHECK_X();
2361 break; 2272 break;
2362 case 0x3A0B: // PR_KEYWORD 2273 case 0x3A0B: // PR_KEYWORD
2363 DEBUG_EMAIL(("Keyword - ")); 2274 DEBUG_EMAIL(("Keyword - "));
2364 MALLOC_CONTACT(item); 2275 MALLOC_CONTACT(item);
2365 LIST_COPY(item->contact->keyword, (char*)); 2276 LIST_COPY(item->contact->keyword, (char*));
2403 case 0x3A11: // PR_SURNAME Contact's Surname 2314 case 0x3A11: // PR_SURNAME Contact's Surname
2404 DEBUG_EMAIL(("Contacts Surname - ")); 2315 DEBUG_EMAIL(("Contacts Surname - "));
2405 MALLOC_CONTACT(item); 2316 MALLOC_CONTACT(item);
2406 LIST_COPY(item->contact->surname, (char*)); 2317 LIST_COPY(item->contact->surname, (char*));
2407 DEBUG_EMAIL(("%s\n", item->contact->surname)); 2318 DEBUG_EMAIL(("%s\n", item->contact->surname));
2408 //INC_CHECK_X();
2409 break; 2319 break;
2410 case 0x3A12: // PR_ORIGINAL_ENTRY_ID 2320 case 0x3A12: // PR_ORIGINAL_ENTRY_ID
2411 DEBUG_EMAIL(("Original Entry ID - NOT PROCESSED\n")); 2321 DEBUG_EMAIL(("Original Entry ID - NOT PROCESSED\n"));
2412 break; 2322 break;
2413 case 0x3A13: // PR_ORIGINAL_DISPLAY_NAME 2323 case 0x3A13: // PR_ORIGINAL_DISPLAY_NAME
2793 item->record_key = (char*) xmalloc(16+1); 2703 item->record_key = (char*) xmalloc(16+1);
2794 memcpy(item->record_key, &(list->items[x]->data[1]), 16); //skip first byte 2704 memcpy(item->record_key, &(list->items[x]->data[1]), 16); //skip first byte
2795 item->record_key[16]='\0'; 2705 item->record_key[16]='\0';
2796 item->record_key_size=16; 2706 item->record_key_size=16;
2797 DEBUG_EMAIL_HEXPRINT((char*)item->record_key, 16); 2707 DEBUG_EMAIL_HEXPRINT((char*)item->record_key, 16);
2798 //INC_CHECK_X();
2799 break; 2708 break;
2800 case 0x67F2: // ID2 value of the attachments proper record 2709 case 0x67F2: // ID2 value of the attachments proper record
2801 DEBUG_EMAIL(("Attachment ID2 value - ")); 2710 DEBUG_EMAIL(("Attachment ID2 value - "));
2802 if (attach){ 2711 if (attach){
2803 MOVE_NEXT(attach); 2712 MOVE_NEXT(attach);
2805 LE32_CPU(attach->id2_val); 2714 LE32_CPU(attach->id2_val);
2806 DEBUG_EMAIL(("%#x\n", attach->id2_val)); 2715 DEBUG_EMAIL(("%#x\n", attach->id2_val));
2807 } else { 2716 } else {
2808 DEBUG_EMAIL(("NOT AN ATTACHMENT: %#x\n", list->items[x]->id)); 2717 DEBUG_EMAIL(("NOT AN ATTACHMENT: %#x\n", list->items[x]->id));
2809 } 2718 }
2810 //INC_CHECK_X();
2811 break; 2719 break;
2812 case 0x67FF: // Extra Property Identifier (Password CheckSum) 2720 case 0x67FF: // Extra Property Identifier (Password CheckSum)
2813 DEBUG_EMAIL(("Password checksum [0x67FF] - ")); 2721 DEBUG_EMAIL(("Password checksum [0x67FF] - "));
2814 MALLOC_MESSAGESTORE(item); 2722 MALLOC_MESSAGESTORE(item);
2815 memcpy(&(item->message_store->pwd_chksum), list->items[x]->data, 2723 memcpy(&(item->message_store->pwd_chksum), list->items[x]->data,
2816 sizeof(item->message_store->pwd_chksum)); 2724 sizeof(item->message_store->pwd_chksum));
2817 DEBUG_EMAIL(("%#x\n", item->message_store->pwd_chksum)); 2725 DEBUG_EMAIL(("%#x\n", item->message_store->pwd_chksum));
2818 //INC_CHECK_X();
2819 break; 2726 break;
2820 case 0x6F02: // Secure HTML Body 2727 case 0x6F02: // Secure HTML Body
2821 DEBUG_EMAIL(("Secure HTML Body - ")); 2728 DEBUG_EMAIL(("Secure HTML Body - "));
2822 MALLOC_EMAIL(item); 2729 MALLOC_EMAIL(item);
2823 LIST_COPY(item->email->encrypted_htmlbody, (char*)); 2730 LIST_COPY(item->email->encrypted_htmlbody, (char*));
2824 item->email->encrypted_htmlbody_size = list->items[x]->size; 2731 item->email->encrypted_htmlbody_size = list->items[x]->size;
2825 DEBUG_EMAIL(("Not Printed\n")); 2732 DEBUG_EMAIL(("Not Printed\n"));
2826 //INC_CHECK_X();
2827 break; 2733 break;
2828 case 0x6F04: // Secure Text Body 2734 case 0x6F04: // Secure Text Body
2829 DEBUG_EMAIL(("Secure Text Body - ")); 2735 DEBUG_EMAIL(("Secure Text Body - "));
2830 MALLOC_EMAIL(item); 2736 MALLOC_EMAIL(item);
2831 LIST_COPY(item->email->encrypted_body, (char*)); 2737 LIST_COPY(item->email->encrypted_body, (char*));
2832 item->email->encrypted_body_size = list->items[x]->size; 2738 item->email->encrypted_body_size = list->items[x]->size;
2833 DEBUG_EMAIL(("Not Printed\n")); 2739 DEBUG_EMAIL(("Not Printed\n"));
2834 //INC_CHECK_X();
2835 break; 2740 break;
2836 case 0x7C07: // top of folders ENTRYID 2741 case 0x7C07: // top of folders ENTRYID
2837 DEBUG_EMAIL(("Top of folders RecID [0x7c07] - ")); 2742 DEBUG_EMAIL(("Top of folders RecID [0x7c07] - "));
2838 MALLOC_MESSAGESTORE(item); 2743 MALLOC_MESSAGESTORE(item);
2839 item->message_store->top_of_folder = (pst_entryid*) xmalloc(sizeof(pst_entryid)); 2744 item->message_store->top_of_folder = (pst_entryid*) xmalloc(sizeof(pst_entryid));
2840 memcpy(item->message_store->top_of_folder, list->items[x]->data, sizeof(pst_entryid)); 2745 memcpy(item->message_store->top_of_folder, list->items[x]->data, sizeof(pst_entryid));
2841 LE32_CPU(item->message_store->top_of_folder->u1); 2746 LE32_CPU(item->message_store->top_of_folder->u1);
2842 LE32_CPU(item->message_store->top_of_folder->id); 2747 LE32_CPU(item->message_store->top_of_folder->id);
2843 DEBUG_EMAIL_HEXPRINT((char*)item->message_store->top_of_folder->entryid, 16); 2748 DEBUG_EMAIL_HEXPRINT((char*)item->message_store->top_of_folder->entryid, 16);
2844 //INC_CHECK_X();
2845 break; 2749 break;
2846 case 0x8005: // Contact's Fullname 2750 case 0x8005: // Contact's Fullname
2847 DEBUG_EMAIL(("Contact Fullname - ")); 2751 DEBUG_EMAIL(("Contact Fullname - "));
2848 MALLOC_CONTACT(item); 2752 MALLOC_CONTACT(item);
2849 LIST_COPY(item->contact->fullname, (char*)); 2753 LIST_COPY(item->contact->fullname, (char*));
3139 } 3043 }
3140 if (list->items[x]->data) { 3044 if (list->items[x]->data) {
3141 free(list->items[x]->data); 3045 free(list->items[x]->data);
3142 list->items[x]->data = NULL; 3046 list->items[x]->data = NULL;
3143 } 3047 }
3144 //INC_CHECK_X();
3145 } 3048 }
3146 x++; 3049 x++;
3147 } 3050 }
3148 x = 0; 3051 x = 0;
3149 list = list->next; 3052 list = list->next;