Mercurial > libpst
comparison src/libpst.c @ 152:edebaf0e87d2
more code cleanup
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 10 Mar 2009 13:09:20 -0700 |
parents | cda7c812ec01 |
children | 0b1766da9be8 |
comparison
equal
deleted
inserted
replaced
151:cda7c812ec01 | 152:edebaf0e87d2 |
---|---|
1750 #define LIST_COPY_APPT_BOOL(label, targ) { \ | 1750 #define LIST_COPY_APPT_BOOL(label, targ) { \ |
1751 MALLOC_APPOINTMENT(item); \ | 1751 MALLOC_APPOINTMENT(item); \ |
1752 LIST_COPY_BOOL(label, targ) \ | 1752 LIST_COPY_BOOL(label, targ) \ |
1753 } | 1753 } |
1754 | 1754 |
1755 #define LIST_COPY_INT16_N(label, targ) { \ | |
1756 memcpy(&(targ), list->items[x]->data, sizeof(targ)); \ | |
1757 LE16_CPU(targ); \ | |
1758 } | |
1759 | |
1760 #define LIST_COPY_INT16(label, targ) { \ | |
1761 LIST_COPY_INT16_N(label, targ); \ | |
1762 DEBUG_EMAIL((label" - %i %#x\n", (int)targ, (int)targ)); \ | |
1763 } | |
1764 | |
1765 #define LIST_COPY_INT32_N(label, targ) { \ | |
1766 memcpy(&(targ), list->items[x]->data, sizeof(targ)); \ | |
1767 LE32_CPU(targ); \ | |
1768 } | |
1769 | |
1770 #define LIST_COPY_INT32(label, targ) { \ | |
1771 LIST_COPY_INT32_N(label, targ); \ | |
1772 DEBUG_EMAIL((label" - %i %#x\n", (int)targ, (int)targ)); \ | |
1773 } | |
1774 | |
1775 #define LIST_COPY_EMAIL_INT32(label, targ) { \ | |
1776 MALLOC_EMAIL(item); \ | |
1777 LIST_COPY_INT32(label, targ); \ | |
1778 } | |
1779 | |
1780 #define LIST_COPY_APPT_INT32(label, targ) { \ | |
1781 MALLOC_APPOINTMENT(item); \ | |
1782 LIST_COPY_INT32(label, targ); \ | |
1783 } | |
1784 | |
1785 #define LIST_COPY_FOLDER_INT32(label, targ) { \ | |
1786 MALLOC_FOLDER(item); \ | |
1787 LIST_COPY_INT32(label, targ); \ | |
1788 } | |
1789 | |
1790 #define LIST_COPY_STORE_INT32(label, targ) { \ | |
1791 MALLOC_MESSAGESTORE(item); \ | |
1792 LIST_COPY_INT32(label, targ); \ | |
1793 } | |
1794 | |
1795 #define LIST_COPY_ENUM(label, targ, delta, count, ...) { \ | |
1796 char *tlabels[] = {__VA_ARGS__}; \ | |
1797 LIST_COPY_INT32_N(label, targ); \ | |
1798 targ += delta; \ | |
1799 DEBUG_EMAIL((label" - %s [%i]\n", \ | |
1800 (((int)targ < 0) || ((int)targ >= count)) \ | |
1801 ? "**invalid" \ | |
1802 : tlabels[(int)targ], (int)targ)); \ | |
1803 } | |
1804 | |
1805 #define LIST_COPY_EMAIL_ENUM(label, targ, delta, count, ...) { \ | |
1806 MALLOC_EMAIL(item); \ | |
1807 LIST_COPY_ENUM(label, targ, delta, count, __VA_ARGS__); \ | |
1808 } | |
1809 | |
1810 #define LIST_COPY_APPT_ENUM(label, targ, delta, count, ...) { \ | |
1811 MALLOC_APPOINTMENT(item); \ | |
1812 LIST_COPY_ENUM(label, targ, delta, count, __VA_ARGS__); \ | |
1813 } | |
1814 | |
1815 #define LIST_COPY_ENUM16(label, targ, delta, count, ...) { \ | |
1816 char *tlabels[] = {__VA_ARGS__}; \ | |
1817 LIST_COPY_INT16_N(label, targ); \ | |
1818 targ += delta; \ | |
1819 DEBUG_EMAIL((label" - %s [%i]\n", \ | |
1820 (((int)targ < 0) || ((int)targ >= count)) \ | |
1821 ? "**invalid" \ | |
1822 : tlabels[(int)targ], (int)targ)); \ | |
1823 } | |
1824 | |
1825 #define LIST_COPY_CONTACT_ENUM16(label, targ, delta, count, ...) { \ | |
1826 MALLOC_CONTACT(item); \ | |
1827 LIST_COPY_ENUM16(label, targ, delta, count, __VA_ARGS__); \ | |
1828 } | |
1829 | |
1830 #define LIST_COPY_ENTRYID(label, targ) { \ | |
1831 MALLOC_MESSAGESTORE(item); \ | |
1832 LIST_COPY(targ, (pst_entryid*)); \ | |
1833 LE32_CPU(targ->u1); \ | |
1834 LE32_CPU(targ->id); \ | |
1835 DEBUG_EMAIL((label" u1=%#x, id=%#x\n", targ->u1, targ->id));\ | |
1836 } | |
1837 | |
1838 #define LIST_COPY_EMAIL_ENTRYID(label, targ) { \ | |
1839 MALLOC_EMAIL(item); \ | |
1840 LIST_COPY_ENTRYID(label, targ); \ | |
1841 } | |
1842 | |
1843 #define LIST_COPY_STORE_ENTRYID(label, targ) { \ | |
1844 MALLOC_MESSAGESTORE(item); \ | |
1845 LIST_COPY_ENTRYID(label, targ); \ | |
1846 } | |
1847 | |
1848 | |
1755 // malloc space and copy the current item's data null terminated | 1849 // malloc space and copy the current item's data null terminated |
1756 // including the utf8 flag | 1850 // including the utf8 flag |
1757 #define LIST_COPY_STR(label, targ) { \ | 1851 #define LIST_COPY_STR(label, targ) { \ |
1758 LIST_COPY(targ.str, (char*)); \ | 1852 LIST_COPY(targ.str, (char*)); \ |
1759 targ.is_utf8 = (list->items[x]->type == 0x1f) ? 1 : 0; \ | 1853 targ.is_utf8 = (list->items[x]->type == 0x1f) ? 1 : 0; \ |
1773 #define LIST_COPY_APPT_STR(label, targ) { \ | 1867 #define LIST_COPY_APPT_STR(label, targ) { \ |
1774 MALLOC_APPOINTMENT(item); \ | 1868 MALLOC_APPOINTMENT(item); \ |
1775 LIST_COPY_STR(label, targ); \ | 1869 LIST_COPY_STR(label, targ); \ |
1776 } | 1870 } |
1777 | 1871 |
1872 #define LIST_COPY_JOURNAL_STR(label, targ) { \ | |
1873 MALLOC_JOURNAL(item); \ | |
1874 LIST_COPY_STR(label, targ); \ | |
1875 } | |
1876 | |
1778 // malloc space and copy the item filetime | 1877 // malloc space and copy the item filetime |
1779 #define LIST_COPY_TIME(targ) { \ | 1878 #define LIST_COPY_TIME(label, targ) { \ |
1780 targ = (FILETIME*) realloc(targ, sizeof(FILETIME)); \ | 1879 targ = (FILETIME*) realloc(targ, sizeof(FILETIME)); \ |
1781 memcpy(targ, list->items[x]->data, list->items[x]->size); \ | 1880 memcpy(targ, list->items[x]->data, list->items[x]->size); \ |
1782 LE32_CPU(targ->dwLowDateTime); \ | 1881 LE32_CPU(targ->dwLowDateTime); \ |
1783 LE32_CPU(targ->dwHighDateTime); \ | 1882 LE32_CPU(targ->dwHighDateTime); \ |
1883 DEBUG_EMAIL((label" - %s", fileTimeToAscii(targ))); \ | |
1884 } | |
1885 | |
1886 #define LIST_COPY_EMAIL_TIME(label, targ) { \ | |
1887 MALLOC_EMAIL(item); \ | |
1888 LIST_COPY_TIME(label, targ); \ | |
1889 } | |
1890 | |
1891 #define LIST_COPY_CONTACT_TIME(label, targ) { \ | |
1892 MALLOC_CONTACT(item); \ | |
1893 LIST_COPY_TIME(label, targ); \ | |
1894 } | |
1895 | |
1896 #define LIST_COPY_APPT_TIME(label, targ) { \ | |
1897 MALLOC_APPOINTMENT(item); \ | |
1898 LIST_COPY_TIME(label, targ); \ | |
1899 } | |
1900 | |
1901 #define LIST_COPY_JOURNAL_TIME(label, targ) { \ | |
1902 MALLOC_JOURNAL(item); \ | |
1903 LIST_COPY_TIME(label, targ); \ | |
1784 } | 1904 } |
1785 | 1905 |
1786 // malloc space and copy the current item's data and size | 1906 // malloc space and copy the current item's data and size |
1787 #define LIST_COPY_SIZE(targ, type, mysize) { \ | 1907 #define LIST_COPY_SIZE(targ, type, mysize) { \ |
1788 mysize = list->items[x]->size; \ | 1908 mysize = list->items[x]->size; \ |
1792 } \ | 1912 } \ |
1793 else { \ | 1913 else { \ |
1794 SAFE_FREE(targ); \ | 1914 SAFE_FREE(targ); \ |
1795 targ = NULL; \ | 1915 targ = NULL; \ |
1796 } \ | 1916 } \ |
1917 } | |
1918 | |
1919 #define LIST_COPY_EMAIL_SIZE(label, targ, mysize) { \ | |
1920 MALLOC_EMAIL(item); \ | |
1921 LIST_COPY_SIZE(targ, (char*), mysize); \ | |
1922 DEBUG_EMAIL((label"\n")); \ | |
1797 } | 1923 } |
1798 | 1924 |
1799 #define NULL_CHECK(x) { if (!x) { DEBUG_EMAIL(("NULL_CHECK: Null Found\n")); break;} } | 1925 #define NULL_CHECK(x) { if (!x) { DEBUG_EMAIL(("NULL_CHECK: Null Found\n")); break;} } |
1800 | 1926 |
1801 | 1927 |
1867 if (!item->email->autoforward) item->email->autoforward = -1; | 1993 if (!item->email->autoforward) item->email->autoforward = -1; |
1868 break; | 1994 break; |
1869 case 0x0003: // Extended Attributes table | 1995 case 0x0003: // Extended Attributes table |
1870 DEBUG_EMAIL(("Extended Attributes Table - NOT PROCESSED\n")); | 1996 DEBUG_EMAIL(("Extended Attributes Table - NOT PROCESSED\n")); |
1871 break; | 1997 break; |
1872 case 0x0017: // PR_IMPORTANCE | 1998 case 0x0017: // PR_IMPORTANCE - How important the sender deems it to be |
1873 // How important the sender deems it to be | 1999 LIST_COPY_EMAIL_ENUM("Importance Level", item->email->importance, 0, 3, "Low", "Normal", "High"); |
1874 // 0 - Low | |
1875 // 1 - Normal | |
1876 // 2 - High | |
1877 MALLOC_EMAIL(item); | |
1878 memcpy(&(item->email->importance), list->items[x]->data, sizeof(item->email->importance)); | |
1879 LE32_CPU(item->email->importance); | |
1880 t = item->email->importance; | |
1881 DEBUG_EMAIL(("Importance Level - %s [%i]\n", ((int)t==0?"Low" : | |
1882 ((int)t==1?"Normal" : | |
1883 "High")), t)); | |
1884 break; | 2000 break; |
1885 case 0x001A: // PR_MESSAGE_CLASS Ascii type of messages - NOT FOLDERS | 2001 case 0x001A: // PR_MESSAGE_CLASS Ascii type of messages - NOT FOLDERS |
1886 // must be case insensitive | 2002 // must be case insensitive |
1887 LIST_COPY(item->ascii_type, (char*)); | 2003 LIST_COPY(item->ascii_type, (char*)); |
1888 if (pst_strincmp("IPM.Note", item->ascii_type, 8) == 0) | 2004 if (pst_strincmp("IPM.Note", item->ascii_type, 8) == 0) |
1915 case 0x0026: // PR_PRIORITY | 2031 case 0x0026: // PR_PRIORITY |
1916 // Priority of a message | 2032 // Priority of a message |
1917 // -1 NonUrgent | 2033 // -1 NonUrgent |
1918 // 0 Normal | 2034 // 0 Normal |
1919 // 1 Urgent | 2035 // 1 Urgent |
1920 MALLOC_EMAIL(item); | 2036 LIST_COPY_EMAIL_ENUM("Priority", item->email->priority, 1, 3, "NonUrgent", "Normal", "Urgent"); |
1921 memcpy(&(item->email->priority), list->items[x]->data, sizeof(item->email->priority)); | |
1922 LE32_CPU(item->email->priority); | |
1923 t = item->email->priority; | |
1924 DEBUG_EMAIL(("Priority - %s [%i]\n", (t<0?"NonUrgent":(t==0?"Normal":"Urgent")), t)); | |
1925 break; | 2037 break; |
1926 case 0x0029: // PR_READ_RECEIPT_REQUESTED | 2038 case 0x0029: // PR_READ_RECEIPT_REQUESTED |
1927 LIST_COPY_EMAIL_BOOL("Read Receipt", item->email->read_receipt); | 2039 LIST_COPY_EMAIL_BOOL("Read Receipt", item->email->read_receipt); |
1928 break; | 2040 break; |
1929 case 0x002B: // PR_RECIPIENT_REASSIGNMENT_PROHIBITED | 2041 case 0x002B: // PR_RECIPIENT_REASSIGNMENT_PROHIBITED |
1930 LIST_COPY_BOOL("Reassignment Prohibited (Private)", item->private_member); | 2042 LIST_COPY_BOOL("Reassignment Prohibited (Private)", item->private_member); |
1931 break; | 2043 break; |
1932 case 0x002E: // PR_ORIGINAL_SENSITIVITY | 2044 case 0x002E: // PR_ORIGINAL_SENSITIVITY - the sensitivity of the message before being replied to or forwarded |
1933 // the sensitivity of the message before being replied to or forwarded | 2045 LIST_COPY_EMAIL_ENUM("Original Sensitivity", item->email->orig_sensitivity, 0, 4, "None", "Personal", "Private", "Company Confidential"); |
1934 // 0 - None | |
1935 // 1 - Personal | |
1936 // 2 - Private | |
1937 // 3 - Company Confidential | |
1938 MALLOC_EMAIL(item); | |
1939 memcpy(&(item->email->orig_sensitivity), list->items[x]->data, sizeof(item->email->orig_sensitivity)); | |
1940 LE32_CPU(item->email->orig_sensitivity); | |
1941 t = item->email->orig_sensitivity; | |
1942 DEBUG_EMAIL(("Original Sensitivity - %s [%i]\n", ((int)t==0?"None" : | |
1943 ((int)t==1?"Personal" : | |
1944 ((int)t==2?"Private" : | |
1945 "Company Confidential"))), t)); | |
1946 break; | 2046 break; |
1947 case 0x0032: // PR_REPORT_TIME | 2047 case 0x0032: // PR_REPORT_TIME |
1948 MALLOC_EMAIL(item); | 2048 LIST_COPY_EMAIL_TIME("Report time", item->email->report_time); |
1949 LIST_COPY_TIME(item->email->report_time); | 2049 break; |
1950 DEBUG_EMAIL(("Report time - %s\n", fileTimeToAscii(item->email->report_time))); | 2050 case 0x0036: // PR_SENSITIVITY - sender's opinion of the sensitivity of an email |
1951 break; | 2051 LIST_COPY_EMAIL_ENUM("Sensitivity", item->email->sensitivity, 0, 4, "None", "Personal", "Private", "Company Confidential"); |
1952 case 0x0036: // PR_SENSITIVITY | |
1953 // sender's opinion of the sensitivity of an email | |
1954 // 0 - None | |
1955 // 1 - Personal | |
1956 // 2 - Private | |
1957 // 3 - Company Confidential | |
1958 MALLOC_EMAIL(item); | |
1959 memcpy(&(item->email->sensitivity), list->items[x]->data, sizeof(item->email->sensitivity)); | |
1960 LE32_CPU(item->email->sensitivity); | |
1961 t = item->email->sensitivity; | |
1962 DEBUG_EMAIL(("Sensitivity - %s [%i]\n", ((int)t==0?"None" : | |
1963 ((int)t==1?"Personal" : | |
1964 ((int)t==2?"Private" : | |
1965 "Company Confidential"))), t)); | |
1966 break; | 2052 break; |
1967 case 0x0037: // PR_SUBJECT raw subject | 2053 case 0x0037: // PR_SUBJECT raw subject |
1968 { | 2054 { |
1969 int off = 0; | 2055 int off = 0; |
1970 if ((list->items[x]->size > 2) && (((uint8_t)list->items[x]->data[0]) < 0x20)) { | 2056 if ((list->items[x]->size > 2) && (((uint8_t)list->items[x]->data[0]) < 0x20)) { |
1976 list->items[x]->size += off; | 2062 list->items[x]->size += off; |
1977 list->items[x]->data -= off; | 2063 list->items[x]->data -= off; |
1978 } | 2064 } |
1979 break; | 2065 break; |
1980 case 0x0039: // PR_CLIENT_SUBMIT_TIME Date Email Sent/Created | 2066 case 0x0039: // PR_CLIENT_SUBMIT_TIME Date Email Sent/Created |
1981 MALLOC_EMAIL(item); | 2067 LIST_COPY_EMAIL_TIME("Date sent", item->email->sent_date); |
1982 LIST_COPY_TIME(item->email->sent_date); | |
1983 DEBUG_EMAIL(("Date sent - %s\n", fileTimeToAscii(item->email->sent_date))); | |
1984 break; | 2068 break; |
1985 case 0x003B: // PR_SENT_REPRESENTING_SEARCH_KEY Sender address 1 | 2069 case 0x003B: // PR_SENT_REPRESENTING_SEARCH_KEY Sender address 1 |
1986 LIST_COPY_EMAIL_STR("Sent on behalf of address 1", item->email->outlook_sender); | 2070 LIST_COPY_EMAIL_STR("Sent on behalf of address 1", item->email->outlook_sender); |
1987 break; | 2071 break; |
1988 case 0x003F: // PR_RECEIVED_BY_ENTRYID Structure containing Recipient | 2072 case 0x003F: // PR_RECEIVED_BY_ENTRYID Structure containing Recipient |
2038 break; | 2122 break; |
2039 case 0x0070: // PR_CONVERSATION_TOPIC Processed Subject | 2123 case 0x0070: // PR_CONVERSATION_TOPIC Processed Subject |
2040 LIST_COPY_EMAIL_STR("Processed Subject (Conversation Topic)", item->email->processed_subject); | 2124 LIST_COPY_EMAIL_STR("Processed Subject (Conversation Topic)", item->email->processed_subject); |
2041 break; | 2125 break; |
2042 case 0x0071: // PR_CONVERSATION_INDEX | 2126 case 0x0071: // PR_CONVERSATION_INDEX |
2043 DEBUG_EMAIL(("Conversation Index - ")); | 2127 LIST_COPY_EMAIL_INT32("Conversation Index", item->email->conversation_index); |
2044 MALLOC_EMAIL(item); | |
2045 memcpy(&(item->email->conv_index), list->items[x]->data, sizeof(item->email->conv_index)); | |
2046 DEBUG_EMAIL(("%i\n", item->email->conv_index)); | |
2047 break; | 2128 break; |
2048 case 0x0072: // PR_ORIGINAL_DISPLAY_BCC | 2129 case 0x0072: // PR_ORIGINAL_DISPLAY_BCC |
2049 LIST_COPY_EMAIL_STR("Original display bcc", item->email->original_bcc); | 2130 LIST_COPY_EMAIL_STR("Original display bcc", item->email->original_bcc); |
2050 break; | 2131 break; |
2051 case 0x0073: // PR_ORIGINAL_DISPLAY_CC | 2132 case 0x0073: // PR_ORIGINAL_DISPLAY_CC |
2068 break; | 2149 break; |
2069 case 0x007D: // PR_TRANSPORT_MESSAGE_HEADERS Internet Header | 2150 case 0x007D: // PR_TRANSPORT_MESSAGE_HEADERS Internet Header |
2070 LIST_COPY_EMAIL_STR("Internet Header", item->email->header); | 2151 LIST_COPY_EMAIL_STR("Internet Header", item->email->header); |
2071 break; | 2152 break; |
2072 case 0x0C04: // PR_NDR_REASON_CODE | 2153 case 0x0C04: // PR_NDR_REASON_CODE |
2073 MALLOC_EMAIL(item); | 2154 LIST_COPY_EMAIL_INT32("NDR reason code", item->email->ndr_reason_code); |
2074 memcpy(&(item->email->ndr_reason_code), list->items[x]->data, sizeof(item->email->ndr_reason_code)); | |
2075 LE32_CPU(item->email->ndr_reason_code); | |
2076 t = item->email->ndr_reason_code; | |
2077 DEBUG_EMAIL(("NDR reason code - [%i]\n", (int)t)); | |
2078 break; | 2155 break; |
2079 case 0x0C05: // PR_NDR_DIAG_CODE | 2156 case 0x0C05: // PR_NDR_DIAG_CODE |
2080 MALLOC_EMAIL(item); | 2157 LIST_COPY_EMAIL_INT32("NDR diag code", item->email->ndr_diag_code); |
2081 memcpy(&(item->email->ndr_diag_code), list->items[x]->data, sizeof(item->email->ndr_diag_code)); | |
2082 LE32_CPU(item->email->ndr_diag_code); | |
2083 t = item->email->ndr_diag_code; | |
2084 DEBUG_EMAIL(("NDR diag code - [%i]\n", (int)t)); | |
2085 break; | 2158 break; |
2086 case 0x0C06: // PR_NON_RECEIPT_NOTIFICATION_REQUESTED | 2159 case 0x0C06: // PR_NON_RECEIPT_NOTIFICATION_REQUESTED |
2087 DEBUG_EMAIL(("Non-Receipt Notification Requested - (ignored) - ")); | 2160 DEBUG_EMAIL(("Non-Receipt Notification Requested - (ignored) - ")); |
2088 break; | 2161 break; |
2089 case 0x0C17: // PR_REPLY_REQUESTED | 2162 case 0x0C17: // PR_REPLY_REQUESTED |
2106 break; | 2179 break; |
2107 case 0x0C1F: // PR_SENDER_EMAIL_ADDRESS Sender Address 2 | 2180 case 0x0C1F: // PR_SENDER_EMAIL_ADDRESS Sender Address 2 |
2108 LIST_COPY_EMAIL_STR("Sender Address", item->email->sender2_address); | 2181 LIST_COPY_EMAIL_STR("Sender Address", item->email->sender2_address); |
2109 break; | 2182 break; |
2110 case 0x0C20: // PR_NDR_STATUS_CODE | 2183 case 0x0C20: // PR_NDR_STATUS_CODE |
2111 MALLOC_EMAIL(item); | 2184 LIST_COPY_EMAIL_INT32("NDR status code", item->email->ndr_status_code); |
2112 memcpy(&(item->email->ndr_status_code), list->items[x]->data, sizeof(item->email->ndr_status_code)); | |
2113 LE32_CPU(item->email->ndr_status_code); | |
2114 t = item->email->ndr_status_code; | |
2115 DEBUG_EMAIL(("NDR status code - [%i]\n", (int)t)); | |
2116 break; | 2185 break; |
2117 case 0x0E01: // PR_DELETE_AFTER_SUBMIT | 2186 case 0x0E01: // PR_DELETE_AFTER_SUBMIT |
2118 LIST_COPY_EMAIL_BOOL("Delete after submit", item->email->delete_after_submit); | 2187 LIST_COPY_EMAIL_BOOL("Delete after submit", item->email->delete_after_submit); |
2119 break; | 2188 break; |
2120 case 0x0E02: // PR_DISPLAY_BCC BCC Addresses | 2189 case 0x0E02: // PR_DISPLAY_BCC BCC Addresses |
2125 break; | 2194 break; |
2126 case 0x0E04: // PR_DISPLAY_TO Address Sent-To | 2195 case 0x0E04: // PR_DISPLAY_TO Address Sent-To |
2127 LIST_COPY_EMAIL_STR("Display Sent-To Address", item->email->sentto_address); | 2196 LIST_COPY_EMAIL_STR("Display Sent-To Address", item->email->sentto_address); |
2128 break; | 2197 break; |
2129 case 0x0E06: // PR_MESSAGE_DELIVERY_TIME Date 3 - Email Arrival Date | 2198 case 0x0E06: // PR_MESSAGE_DELIVERY_TIME Date 3 - Email Arrival Date |
2130 DEBUG_EMAIL(("Date 3 (Delivery Time) - ")); | 2199 LIST_COPY_EMAIL_TIME("Date 3 (Delivery Time)", item->email->arrival_date); |
2131 MALLOC_EMAIL(item); | |
2132 LIST_COPY_TIME(item->email->arrival_date); | |
2133 DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->arrival_date))); | |
2134 break; | 2200 break; |
2135 case 0x0E07: // PR_MESSAGE_FLAGS Email Flag | 2201 case 0x0E07: // PR_MESSAGE_FLAGS Email Flag |
2136 // 0x01 - Read | 2202 // 0x01 - Read |
2137 // 0x02 - Unmodified | 2203 // 0x02 - Unmodified |
2138 // 0x04 - Submit | 2204 // 0x04 - Submit |
2141 // 0x20 - From Me | 2207 // 0x20 - From Me |
2142 // 0x40 - Associated | 2208 // 0x40 - Associated |
2143 // 0x80 - Resend | 2209 // 0x80 - Resend |
2144 // 0x100 - RN Pending | 2210 // 0x100 - RN Pending |
2145 // 0x200 - NRN Pending | 2211 // 0x200 - NRN Pending |
2146 DEBUG_EMAIL(("Message Flags - ")); | 2212 LIST_COPY_EMAIL_INT32("Message Flags", item->email->flag); |
2147 MALLOC_EMAIL(item); | |
2148 memcpy(&(item->email->flag), list->items[x]->data, sizeof(item->email->flag)); | |
2149 LE32_CPU(item->email->flag); | |
2150 DEBUG_EMAIL(("%i\n", item->email->flag)); | |
2151 break; | 2213 break; |
2152 case 0x0E08: // PR_MESSAGE_SIZE Total size of a message object | 2214 case 0x0E08: // PR_MESSAGE_SIZE Total size of a message object |
2153 DEBUG_EMAIL(("Message Size - ")); | 2215 LIST_COPY_EMAIL_INT32("Message Size", item->message_size); |
2154 memcpy(&(item->message_size), list->items[x]->data, sizeof(item->message_size)); | |
2155 LE32_CPU(item->message_size); | |
2156 DEBUG_EMAIL(("%i [%#x]\n", item->message_size, item->message_size)); | |
2157 break; | 2216 break; |
2158 case 0x0E0A: // PR_SENTMAIL_ENTRYID | 2217 case 0x0E0A: // PR_SENTMAIL_ENTRYID |
2159 // folder that this message is sent to after submission | 2218 // folder that this message is sent to after submission |
2160 DEBUG_EMAIL(("Sentmail EntryID - ")); | 2219 LIST_COPY_EMAIL_ENTRYID("Sentmail EntryID", item->email->sentmail_folder); |
2161 MALLOC_EMAIL(item); | |
2162 LIST_COPY(item->email->sentmail_folder, (pst_entryid*)); | |
2163 LE32_CPU(item->email->sentmail_folder->id); | |
2164 DEBUG_EMAIL(("[id = %#x]\n", item->email->sentmail_folder->id)); | |
2165 break; | 2220 break; |
2166 case 0x0E1F: // PR_RTF_IN_SYNC | 2221 case 0x0E1F: // PR_RTF_IN_SYNC |
2167 // True means that the rtf version is same as text body | 2222 // True means that the rtf version is same as text body |
2168 // False means rtf version is more up-to-date than text body | 2223 // False means rtf version is more up-to-date than text body |
2169 // if this value doesn't exist, text body is more up-to-date than rtf and | 2224 // if this value doesn't exist, text body is more up-to-date than rtf and |
2171 LIST_COPY_EMAIL_BOOL("Compressed RTF in Sync", item->email->rtf_in_sync); | 2226 LIST_COPY_EMAIL_BOOL("Compressed RTF in Sync", item->email->rtf_in_sync); |
2172 break; | 2227 break; |
2173 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record | 2228 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record |
2174 DEBUG_EMAIL(("Attachment Size - ")); | 2229 DEBUG_EMAIL(("Attachment Size - ")); |
2175 NULL_CHECK(attach); | 2230 NULL_CHECK(attach); |
2176 t = (*(int32_t*)list->items[x]->data); | 2231 LIST_COPY_INT32("Attachment Size", t); |
2177 LE32_CPU(t); | |
2178 attach->size = (size_t)t; | 2232 attach->size = (size_t)t; |
2179 DEBUG_EMAIL(("%i\n", attach->size)); | |
2180 break; | 2233 break; |
2181 case 0x0FF9: // PR_RECORD_KEY Record Header 1 | 2234 case 0x0FF9: // PR_RECORD_KEY Record Header 1 |
2182 DEBUG_EMAIL(("Record Key 1 - ")); | 2235 DEBUG_EMAIL(("Record Key 1 - ")); |
2183 LIST_COPY(item->record_key, (char*)); | 2236 LIST_COPY(item->record_key, (char*)); |
2184 item->record_key_size = list->items[x]->size; | 2237 item->record_key_size = list->items[x]->size; |
2190 break; | 2243 break; |
2191 case 0x1001: // PR_REPORT_TEXT | 2244 case 0x1001: // PR_REPORT_TEXT |
2192 LIST_COPY_EMAIL_STR("Report Text", item->email->report_text); | 2245 LIST_COPY_EMAIL_STR("Report Text", item->email->report_text); |
2193 break; | 2246 break; |
2194 case 0x1006: // PR_RTF_SYNC_BODY_CRC | 2247 case 0x1006: // PR_RTF_SYNC_BODY_CRC |
2195 DEBUG_EMAIL(("RTF Sync Body CRC - ")); | 2248 LIST_COPY_EMAIL_INT32("RTF Sync Body CRC", item->email->rtf_body_crc); |
2196 MALLOC_EMAIL(item); | |
2197 memcpy(&(item->email->rtf_body_crc), list->items[x]->data, sizeof(item->email->rtf_body_crc)); | |
2198 LE32_CPU(item->email->rtf_body_crc); | |
2199 DEBUG_EMAIL(("%#x\n", item->email->rtf_body_crc)); | |
2200 break; | 2249 break; |
2201 case 0x1007: // PR_RTF_SYNC_BODY_COUNT | 2250 case 0x1007: // PR_RTF_SYNC_BODY_COUNT |
2202 // a count of the *significant* charcters in the rtf body. Doesn't count | 2251 // a count of the *significant* charcters in the rtf body. Doesn't count |
2203 // whitespace and other ignorable characters | 2252 // whitespace and other ignorable characters |
2204 DEBUG_EMAIL(("RTF Sync Body character count - ")); | 2253 LIST_COPY_EMAIL_INT32("RTF Sync Body character count", item->email->rtf_body_char_count); |
2205 MALLOC_EMAIL(item); | |
2206 memcpy(&(item->email->rtf_body_char_count), list->items[x]->data, sizeof(item->email->rtf_body_char_count)); | |
2207 LE32_CPU(item->email->rtf_body_char_count); | |
2208 DEBUG_EMAIL(("%i [%#x]\n", item->email->rtf_body_char_count, item->email->rtf_body_char_count)); | |
2209 break; | 2254 break; |
2210 case 0x1008: // PR_RTF_SYNC_BODY_TAG | 2255 case 0x1008: // PR_RTF_SYNC_BODY_TAG |
2211 // the first couple of lines of RTF body so that after modification, then beginning can | 2256 // the first couple of lines of RTF body so that after modification, then beginning can |
2212 // once again be found | 2257 // once again be found |
2213 LIST_COPY_EMAIL_STR("RTF Sync body tag", item->email->rtf_body_tag); | 2258 LIST_COPY_EMAIL_STR("RTF Sync body tag", item->email->rtf_body_tag); |
2214 break; | 2259 break; |
2215 case 0x1009: // PR_RTF_COMPRESSED | 2260 case 0x1009: // PR_RTF_COMPRESSED - rtf data is lzw compressed |
2216 // rtf data is lzw compressed | 2261 LIST_COPY_EMAIL_SIZE("RTF Compressed body", item->email->rtf_compressed, item->email->rtf_compressed_size); |
2217 DEBUG_EMAIL(("RTF Compressed body - ")); | |
2218 MALLOC_EMAIL(item); | |
2219 LIST_COPY_SIZE(item->email->rtf_compressed, (char*), item->email->rtf_compressed_size); | |
2220 //DEBUG_EMAIL_HEXPRINT((char*)item->email->rtf_compressed, item->email->rtf_compressed_size); | |
2221 break; | 2262 break; |
2222 case 0x1010: // PR_RTF_SYNC_PREFIX_COUNT | 2263 case 0x1010: // PR_RTF_SYNC_PREFIX_COUNT |
2223 // a count of the ignored characters before the first significant character | 2264 // a count of the ignored characters before the first significant character |
2224 DEBUG_EMAIL(("RTF whitespace prefix count - ")); | 2265 LIST_COPY_EMAIL_INT32("RTF whitespace prefix count", item->email->rtf_ws_prefix_count); |
2225 MALLOC_EMAIL(item); | |
2226 memcpy(&(item->email->rtf_ws_prefix_count), list->items[x]->data, sizeof(item->email->rtf_ws_prefix_count)); | |
2227 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_prefix_count)); | |
2228 break; | 2266 break; |
2229 case 0x1011: // PR_RTF_SYNC_TRAILING_COUNT | 2267 case 0x1011: // PR_RTF_SYNC_TRAILING_COUNT |
2230 // a count of the ignored characters after the last significant character | 2268 // a count of the ignored characters after the last significant character |
2231 DEBUG_EMAIL(("RTF whitespace tailing count - ")); | 2269 LIST_COPY_EMAIL_INT32("RTF whitespace tailing count", item->email->rtf_ws_trailing_count); |
2232 MALLOC_EMAIL(item); | |
2233 memcpy(&(item->email->rtf_ws_trailing_count), list->items[x]->data, sizeof(item->email->rtf_ws_trailing_count)); | |
2234 DEBUG_EMAIL(("%i\n", item->email->rtf_ws_trailing_count)); | |
2235 break; | 2270 break; |
2236 case 0x1013: // HTML body | 2271 case 0x1013: // HTML body |
2237 LIST_COPY_EMAIL_STR("HTML body", item->email->htmlbody); | 2272 LIST_COPY_EMAIL_STR("HTML body", item->email->htmlbody); |
2238 break; | 2273 break; |
2239 case 0x1035: // Message ID | 2274 case 0x1035: // Message ID |
2256 break; | 2291 break; |
2257 case 0x3004: // PR_COMMENT Comment for item - usually folders | 2292 case 0x3004: // PR_COMMENT Comment for item - usually folders |
2258 LIST_COPY_STR("Comment", item->comment); | 2293 LIST_COPY_STR("Comment", item->comment); |
2259 break; | 2294 break; |
2260 case 0x3007: // PR_CREATION_TIME Date 4 - Creation Date? | 2295 case 0x3007: // PR_CREATION_TIME Date 4 - Creation Date? |
2261 DEBUG_EMAIL(("Date 4 (Item Creation Date) - ")); | 2296 LIST_COPY_EMAIL_TIME("Date 4 (Item Creation Date)", item->create_date); |
2262 LIST_COPY_TIME(item->create_date); | |
2263 DEBUG_EMAIL(("%s", fileTimeToAscii(item->create_date))); | |
2264 break; | 2297 break; |
2265 case 0x3008: // PR_LAST_MODIFICATION_TIME Date 5 - Modify Date | 2298 case 0x3008: // PR_LAST_MODIFICATION_TIME Date 5 - Modify Date |
2266 DEBUG_EMAIL(("Date 5 (Modify Date) - ")); | 2299 LIST_COPY_EMAIL_TIME("Date 5 (Modify Date)", item->modify_date); |
2267 LIST_COPY_TIME(item->modify_date); | |
2268 DEBUG_EMAIL(("%s", fileTimeToAscii(item->modify_date))); | |
2269 break; | 2300 break; |
2270 case 0x300B: // PR_SEARCH_KEY Record Header 2 | 2301 case 0x300B: // PR_SEARCH_KEY Record Header 2 |
2271 DEBUG_EMAIL(("Record Search 2 -- NOT HANDLED\n")); | 2302 DEBUG_EMAIL(("Record Search 2 -- NOT HANDLED\n")); |
2272 break; | 2303 break; |
2273 case 0x35DF: // PR_VALID_FOLDER_MASK | 2304 case 0x35DF: // PR_VALID_FOLDER_MASK |
2274 // States which folders are valid for this message store | 2305 // States which folders are valid for this message store |
2275 // FOLDER_IPM_SUBTREE_VALID 0x1 | 2306 // FOLDER_IPM_SUBTREE_VALID 0x1 |
2276 // FOLDER_IPM_INBOX_VALID 0x2 | 2307 // FOLDER_IPM_INBOX_VALID 0x2 |
2277 // FOLDER_IPM_OUTBOX_VALID 0x4 | 2308 // FOLDER_IPM_OUTBOX_VALID 0x4 |
2278 // FOLDER_IPM_WASTEBOX_VALID 0x8 | 2309 // FOLDER_IPM_WASTEBOX_VALID 0x8 |
2279 // FOLDER_IPM_SENTMAIL_VALID 0x10 | 2310 // FOLDER_IPM_SENTMAIL_VALID 0x10 |
2280 // FOLDER_VIEWS_VALID 0x20 | 2311 // FOLDER_VIEWS_VALID 0x20 |
2281 // FOLDER_COMMON_VIEWS_VALID 0x40 | 2312 // FOLDER_COMMON_VIEWS_VALID 0x40 |
2282 // FOLDER_FINDER_VALID 0x80 | 2313 // FOLDER_FINDER_VALID 0x80 |
2283 DEBUG_EMAIL(("Valid Folder Mask - ")); | 2314 LIST_COPY_STORE_INT32("Valid Folder Mask", item->message_store->valid_mask); |
2284 MALLOC_MESSAGESTORE(item); | |
2285 memcpy(&(item->message_store->valid_mask), list->items[x]->data, sizeof(item->message_store->valid_mask)); | |
2286 LE32_CPU(item->message_store->valid_mask); | |
2287 DEBUG_EMAIL(("%i\n", item->message_store->valid_mask)); | |
2288 break; | 2315 break; |
2289 case 0x35E0: // PR_IPM_SUBTREE_ENTRYID Top of Personal Folder Record | 2316 case 0x35E0: // PR_IPM_SUBTREE_ENTRYID Top of Personal Folder Record |
2290 DEBUG_EMAIL(("Top of Personal Folder Record - ")); | 2317 LIST_COPY_STORE_ENTRYID("Top of Personal Folder Record", item->message_store->top_of_personal_folder); |
2291 MALLOC_MESSAGESTORE(item); | |
2292 LIST_COPY(item->message_store->top_of_personal_folder, (pst_entryid*)); | |
2293 LE32_CPU(item->message_store->top_of_personal_folder->id); | |
2294 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->top_of_personal_folder->id)); | |
2295 break; | 2318 break; |
2296 case 0x35E2: // PR_IPM_OUTBOX_ENTRYID | 2319 case 0x35E2: // PR_IPM_OUTBOX_ENTRYID |
2297 DEBUG_EMAIL(("Default Outbox Folder record - ")); | 2320 LIST_COPY_STORE_ENTRYID("Default Outbox Folder record", item->message_store->default_outbox_folder); |
2298 MALLOC_MESSAGESTORE(item); | |
2299 LIST_COPY(item->message_store->default_outbox_folder, (pst_entryid*)); | |
2300 LE32_CPU(item->message_store->default_outbox_folder->id); | |
2301 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->default_outbox_folder->id)); | |
2302 break; | 2321 break; |
2303 case 0x35E3: // PR_IPM_WASTEBASKET_ENTRYID | 2322 case 0x35E3: // PR_IPM_WASTEBASKET_ENTRYID |
2304 DEBUG_EMAIL(("Deleted Items Folder record - ")); | 2323 LIST_COPY_STORE_ENTRYID("Deleted Items Folder record", item->message_store->deleted_items_folder); |
2305 MALLOC_MESSAGESTORE(item); | |
2306 LIST_COPY(item->message_store->deleted_items_folder, (pst_entryid*)); | |
2307 LE32_CPU(item->message_store->deleted_items_folder->id); | |
2308 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->deleted_items_folder->id)); | |
2309 break; | 2324 break; |
2310 case 0x35E4: // PR_IPM_SENTMAIL_ENTRYID | 2325 case 0x35E4: // PR_IPM_SENTMAIL_ENTRYID |
2311 DEBUG_EMAIL(("Sent Items Folder record - ")); | 2326 LIST_COPY_STORE_ENTRYID("Sent Items Folder record", item->message_store->sent_items_folder); |
2312 MALLOC_MESSAGESTORE(item); | |
2313 LIST_COPY(item->message_store->sent_items_folder, (pst_entryid*)); | |
2314 LE32_CPU(item->message_store->sent_items_folder->id); | |
2315 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->sent_items_folder->id)); | |
2316 break; | 2327 break; |
2317 case 0x35E5: // PR_VIEWS_ENTRYID | 2328 case 0x35E5: // PR_VIEWS_ENTRYID |
2318 DEBUG_EMAIL(("User Views Folder record - ")); | 2329 LIST_COPY_STORE_ENTRYID("User Views Folder record", item->message_store->user_views_folder); |
2319 MALLOC_MESSAGESTORE(item); | |
2320 LIST_COPY(item->message_store->user_views_folder, (pst_entryid*)); | |
2321 LE32_CPU(item->message_store->user_views_folder->id); | |
2322 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->user_views_folder->id)); | |
2323 break; | 2330 break; |
2324 case 0x35E6: // PR_COMMON_VIEWS_ENTRYID | 2331 case 0x35E6: // PR_COMMON_VIEWS_ENTRYID |
2325 DEBUG_EMAIL(("Common View Folder record - ")); | 2332 LIST_COPY_STORE_ENTRYID("Common View Folder record", item->message_store->common_view_folder); |
2326 MALLOC_MESSAGESTORE(item); | |
2327 LIST_COPY(item->message_store->common_view_folder, (pst_entryid*)); | |
2328 LE32_CPU(item->message_store->common_view_folder->id); | |
2329 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->common_view_folder->id)); | |
2330 break; | 2333 break; |
2331 case 0x35E7: // PR_FINDER_ENTRYID | 2334 case 0x35E7: // PR_FINDER_ENTRYID |
2332 DEBUG_EMAIL(("Search Root Folder record - ")); | 2335 LIST_COPY_STORE_ENTRYID("Search Root Folder record", item->message_store->search_root_folder); |
2333 MALLOC_MESSAGESTORE(item); | |
2334 LIST_COPY(item->message_store->search_root_folder, (pst_entryid*)); | |
2335 LE32_CPU(item->message_store->search_root_folder->id); | |
2336 DEBUG_EMAIL(("[id = %#x]\n", item->message_store->search_root_folder->id)); | |
2337 break; | 2336 break; |
2338 case 0x3602: // PR_CONTENT_COUNT Number of emails stored in a folder | 2337 case 0x3602: // PR_CONTENT_COUNT Number of emails stored in a folder |
2339 DEBUG_EMAIL(("Folder Email Count - ")); | 2338 LIST_COPY_FOLDER_INT32("Folder Email Count", item->folder->email_count); |
2340 MALLOC_FOLDER(item); | |
2341 memcpy(&(item->folder->email_count), list->items[x]->data, sizeof(item->folder->email_count)); | |
2342 LE32_CPU(item->folder->email_count); | |
2343 DEBUG_EMAIL(("%i\n", item->folder->email_count)); | |
2344 break; | 2339 break; |
2345 case 0x3603: // PR_CONTENT_UNREAD Number of unread emails | 2340 case 0x3603: // PR_CONTENT_UNREAD Number of unread emails |
2346 DEBUG_EMAIL(("Unread Email Count - ")); | 2341 LIST_COPY_FOLDER_INT32("Unread Email Count", item->folder->unseen_email_count); |
2347 MALLOC_FOLDER(item); | |
2348 memcpy(&(item->folder->unseen_email_count), list->items[x]->data, sizeof(item->folder->unseen_email_count)); | |
2349 LE32_CPU(item->folder->unseen_email_count); | |
2350 DEBUG_EMAIL(("%i\n", item->folder->unseen_email_count)); | |
2351 break; | 2342 break; |
2352 case 0x360A: // PR_SUBFOLDERS Has children | 2343 case 0x360A: // PR_SUBFOLDERS Has children |
2353 MALLOC_FOLDER(item); | 2344 MALLOC_FOLDER(item); |
2354 LIST_COPY_BOOL("Has Subfolders", item->folder->subfolder); | 2345 LIST_COPY_BOOL("Has Subfolders", item->folder->subfolder); |
2355 break; | 2346 break; |
2374 DEBUG_EMAIL(("%s [%i]\n", item->ascii_type, item->type)); | 2365 DEBUG_EMAIL(("%s [%i]\n", item->ascii_type, item->type)); |
2375 break; | 2366 break; |
2376 case 0x3617: // PR_ASSOC_CONTENT_COUNT | 2367 case 0x3617: // PR_ASSOC_CONTENT_COUNT |
2377 // associated content are items that are attached to this folder | 2368 // associated content are items that are attached to this folder |
2378 // but are hidden from users | 2369 // but are hidden from users |
2379 DEBUG_EMAIL(("Associate Content count - ")); | 2370 LIST_COPY_FOLDER_INT32("Associate Content count", item->folder->assoc_count); |
2380 MALLOC_FOLDER(item); | |
2381 memcpy(&(item->folder->assoc_count), list->items[x]->data, sizeof(item->folder->assoc_count)); | |
2382 LE32_CPU(item->folder->assoc_count); | |
2383 DEBUG_EMAIL(("%i [%#x]\n", item->folder->assoc_count, item->folder->assoc_count)); | |
2384 break; | 2371 break; |
2385 case 0x3701: // PR_ATTACH_DATA_OBJ binary data of attachment | 2372 case 0x3701: // PR_ATTACH_DATA_OBJ binary data of attachment |
2386 DEBUG_EMAIL(("Binary Data [Size %i] - ", list->items[x]->size)); | 2373 DEBUG_EMAIL(("Binary Data [Size %i] - ", list->items[x]->size)); |
2387 NULL_CHECK(attach); | 2374 NULL_CHECK(attach); |
2388 if (!list->items[x]->data) { //special case | 2375 if (!list->items[x]->data) { //special case |
2398 case 0x3704: // PR_ATTACH_FILENAME Attachment filename (8.3) | 2385 case 0x3704: // PR_ATTACH_FILENAME Attachment filename (8.3) |
2399 NULL_CHECK(attach); | 2386 NULL_CHECK(attach); |
2400 LIST_COPY_STR("Attachment Filename", attach->filename1); | 2387 LIST_COPY_STR("Attachment Filename", attach->filename1); |
2401 break; | 2388 break; |
2402 case 0x3705: // PR_ATTACH_METHOD | 2389 case 0x3705: // PR_ATTACH_METHOD |
2403 // 0 - No Attachment | |
2404 // 1 - Attach by Value | |
2405 // 2 - Attach by reference | |
2406 // 3 - Attach by ref resolve | |
2407 // 4 - Attach by ref only | |
2408 // 5 - Embedded Message | |
2409 // 6 - OLE | |
2410 DEBUG_EMAIL(("Attachment method - ")); | |
2411 NULL_CHECK(attach); | 2390 NULL_CHECK(attach); |
2412 memcpy(&(attach->method), list->items[x]->data, sizeof(attach->method)); | 2391 LIST_COPY_ENUM("Attachment method", attach->method, 0, 7, |
2413 LE32_CPU(attach->method); | 2392 "No Attachment", |
2414 t = attach->method; | 2393 "Attach By Value", |
2415 DEBUG_EMAIL(("%s [%i]\n", (t==0?"No Attachment": | 2394 "Attach By Reference", |
2416 (t==1?"Attach By Value": | 2395 "Attach by Reference Resolve", |
2417 (t==2?"Attach By Reference": | 2396 "Attach by Reference Only", |
2418 (t==3?"Attach by Ref. Resolve": | 2397 "Embedded Message", |
2419 (t==4?"Attach by Ref. Only": | 2398 "OLE"); |
2420 (t==5?"Embedded Message":"OLE")))))),t)); | |
2421 break; | 2399 break; |
2422 case 0x3707: // PR_ATTACH_LONG_FILENAME Attachment filename (long?) | 2400 case 0x3707: // PR_ATTACH_LONG_FILENAME Attachment filename (long?) |
2423 NULL_CHECK(attach); | 2401 NULL_CHECK(attach); |
2424 LIST_COPY_STR("Attachment Filename long", attach->filename2); | 2402 LIST_COPY_STR("Attachment Filename long", attach->filename2); |
2425 break; | 2403 break; |
2426 case 0x370B: // PR_RENDERING_POSITION | 2404 case 0x370B: // PR_RENDERING_POSITION |
2427 // position in characters that the attachment appears in the plain text body | 2405 // position in characters that the attachment appears in the plain text body |
2428 DEBUG_EMAIL(("Attachment Position - ")); | |
2429 NULL_CHECK(attach); | 2406 NULL_CHECK(attach); |
2430 memcpy(&(attach->position), list->items[x]->data, sizeof(attach->position)); | 2407 LIST_COPY_INT32("Attachment Position", attach->position); |
2431 LE32_CPU(attach->position); | |
2432 DEBUG_EMAIL(("%i [%#x]\n", attach->position)); | |
2433 break; | 2408 break; |
2434 case 0x370E: // PR_ATTACH_MIME_TAG Mime type of encoding | 2409 case 0x370E: // PR_ATTACH_MIME_TAG Mime type of encoding |
2435 NULL_CHECK(attach); | 2410 NULL_CHECK(attach); |
2436 LIST_COPY_STR("Attachment mime encoding", attach->mimetype); | 2411 LIST_COPY_STR("Attachment mime encoding", attach->mimetype); |
2437 break; | 2412 break; |
2438 case 0x3710: // PR_ATTACH_MIME_SEQUENCE | 2413 case 0x3710: // PR_ATTACH_MIME_SEQUENCE |
2439 // sequence number for mime parts. Includes body | 2414 // sequence number for mime parts. Includes body |
2440 DEBUG_EMAIL(("Attachment Mime Sequence - ")); | |
2441 NULL_CHECK(attach); | 2415 NULL_CHECK(attach); |
2442 memcpy(&(attach->sequence), list->items[x]->data, sizeof(attach->sequence)); | 2416 LIST_COPY_INT32("Attachment Mime Sequence", attach->sequence); |
2443 LE32_CPU(attach->sequence); | |
2444 DEBUG_EMAIL(("%i\n", attach->sequence)); | |
2445 break; | 2417 break; |
2446 case 0x3A00: // PR_ACCOUNT | 2418 case 0x3A00: // PR_ACCOUNT |
2447 LIST_COPY_CONTACT_STR("Contact's Account name", item->contact->account_name); | 2419 LIST_COPY_CONTACT_STR("Contact's Account name", item->contact->account_name); |
2448 break; | 2420 break; |
2449 case 0x3A01: // PR_ALTERNATE_RECIPIENT | 2421 case 0x3A01: // PR_ALTERNATE_RECIPIENT |
2589 break; | 2561 break; |
2590 case 0x3A40: // PR_SEND_RICH_INFO | 2562 case 0x3A40: // PR_SEND_RICH_INFO |
2591 LIST_COPY_CONTACT_BOOL("Can receive Rich Text", item->contact->rich_text); | 2563 LIST_COPY_CONTACT_BOOL("Can receive Rich Text", item->contact->rich_text); |
2592 break; | 2564 break; |
2593 case 0x3A41: // PR_WEDDING_ANNIVERSARY | 2565 case 0x3A41: // PR_WEDDING_ANNIVERSARY |
2594 DEBUG_EMAIL(("Wedding Anniversary - ")); | 2566 LIST_COPY_CONTACT_TIME("Wedding Anniversary", item->contact->wedding_anniversary); |
2595 MALLOC_CONTACT(item); | |
2596 LIST_COPY_TIME(item->contact->wedding_anniversary); | |
2597 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->contact->wedding_anniversary))); | |
2598 break; | 2567 break; |
2599 case 0x3A42: // PR_BIRTHDAY | 2568 case 0x3A42: // PR_BIRTHDAY |
2600 DEBUG_EMAIL(("Birthday - ")); | 2569 LIST_COPY_CONTACT_TIME("Birthday", item->contact->birthday); |
2601 MALLOC_CONTACT(item); | |
2602 LIST_COPY_TIME(item->contact->birthday); | |
2603 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->contact->birthday))); | |
2604 break; | 2570 break; |
2605 case 0x3A43: // PR_HOBBIES | 2571 case 0x3A43: // PR_HOBBIES |
2606 LIST_COPY_CONTACT_STR("Hobbies", item->contact->hobbies); | 2572 LIST_COPY_CONTACT_STR("Hobbies", item->contact->hobbies); |
2607 break; | 2573 break; |
2608 case 0x3A44: // PR_MIDDLE_NAME | 2574 case 0x3A44: // PR_MIDDLE_NAME |
2631 break; | 2597 break; |
2632 case 0x3A4C: // PR_FTP_SITE | 2598 case 0x3A4C: // PR_FTP_SITE |
2633 LIST_COPY_CONTACT_STR("Ftp Site", item->contact->ftp_site); | 2599 LIST_COPY_CONTACT_STR("Ftp Site", item->contact->ftp_site); |
2634 break; | 2600 break; |
2635 case 0x3A4D: // PR_GENDER | 2601 case 0x3A4D: // PR_GENDER |
2636 DEBUG_EMAIL(("Gender - ")); | 2602 LIST_COPY_CONTACT_ENUM16("Gender", item->contact->gender, 0, 3, "Unspecified", "Female", "Male"); |
2637 MALLOC_CONTACT(item); | |
2638 memcpy(&item->contact->gender, list->items[x]->data, sizeof(item->contact->gender)); | |
2639 LE16_CPU(item->contact->gender); | |
2640 switch(item->contact->gender) { | |
2641 case 0: | |
2642 DEBUG_EMAIL(("Unspecified\n")); | |
2643 break; | |
2644 case 1: | |
2645 DEBUG_EMAIL(("Female\n")); | |
2646 break; | |
2647 case 2: | |
2648 DEBUG_EMAIL(("Male\n")); | |
2649 break; | |
2650 default: | |
2651 DEBUG_EMAIL(("Error processing\n")); | |
2652 } | |
2653 break; | 2603 break; |
2654 case 0x3A4E: // PR_MANAGER_NAME | 2604 case 0x3A4E: // PR_MANAGER_NAME |
2655 LIST_COPY_CONTACT_STR("Manager's Name", item->contact->manager_name); | 2605 LIST_COPY_CONTACT_STR("Manager's Name", item->contact->manager_name); |
2656 break; | 2606 break; |
2657 case 0x3A4F: // PR_NICKNAME | 2607 case 0x3A4F: // PR_NICKNAME |
2704 break; | 2654 break; |
2705 case 0x3A64: // PR_OTHER_ADDRESS_POST_OFFICE_BOX | 2655 case 0x3A64: // PR_OTHER_ADDRESS_POST_OFFICE_BOX |
2706 LIST_COPY_CONTACT_STR("Other Address Post Office box", item->contact->other_po_box); | 2656 LIST_COPY_CONTACT_STR("Other Address Post Office box", item->contact->other_po_box); |
2707 break; | 2657 break; |
2708 case 0x3FDE: // PR_INTERNET_CPID | 2658 case 0x3FDE: // PR_INTERNET_CPID |
2709 memcpy(&(item->internet_cpid), list->items[x]->data, sizeof(item->internet_cpid)); | 2659 LIST_COPY_INT32("Internet code page", item->internet_cpid); |
2710 LE32_CPU(item->internet_cpid); | |
2711 t = item->internet_cpid; | |
2712 DEBUG_EMAIL(("Internet code page %i\n", (int)t)); | |
2713 break; | 2660 break; |
2714 case 0x3FFD: // PR_MESSAGE_CODEPAGE | 2661 case 0x3FFD: // PR_MESSAGE_CODEPAGE |
2715 memcpy(&(item->message_codepage), list->items[x]->data, sizeof(item->message_codepage)); | 2662 LIST_COPY_INT32("Message code page", item->message_codepage); |
2716 LE32_CPU(item->message_codepage); | |
2717 t = item->message_codepage; | |
2718 DEBUG_EMAIL(("Message code page %i\n", (int)t)); | |
2719 break; | 2663 break; |
2720 case 0x65E3: // Entry ID? | 2664 case 0x65E3: // Entry ID? |
2721 DEBUG_EMAIL(("Entry ID - ")); | 2665 DEBUG_EMAIL(("Entry ID - ")); |
2722 item->record_key = (char*) xmalloc(16+1); | 2666 item->record_key = (char*) xmalloc(16+1); |
2723 memcpy(item->record_key, &(list->items[x]->data[1]), 16); //skip first byte | 2667 memcpy(item->record_key, &(list->items[x]->data[1]), 16); //skip first byte |
2736 } else { | 2680 } else { |
2737 DEBUG_EMAIL(("NOT AN ATTACHMENT: %#x\n", list->items[x]->id)); | 2681 DEBUG_EMAIL(("NOT AN ATTACHMENT: %#x\n", list->items[x]->id)); |
2738 } | 2682 } |
2739 break; | 2683 break; |
2740 case 0x67FF: // Extra Property Identifier (Password CheckSum) | 2684 case 0x67FF: // Extra Property Identifier (Password CheckSum) |
2741 DEBUG_EMAIL(("Password checksum [0x67FF] - ")); | 2685 LIST_COPY_STORE_INT32("Password checksum", item->message_store->pwd_chksum); |
2742 MALLOC_MESSAGESTORE(item); | |
2743 memcpy(&(item->message_store->pwd_chksum), list->items[x]->data, sizeof(item->message_store->pwd_chksum)); | |
2744 DEBUG_EMAIL(("%#x\n", item->message_store->pwd_chksum)); | |
2745 break; | 2686 break; |
2746 case 0x6F02: // Secure HTML Body | 2687 case 0x6F02: // Secure HTML Body |
2747 DEBUG_EMAIL(("Secure HTML Body - ")); | 2688 LIST_COPY_EMAIL_SIZE("Secure HTML Body", item->email->encrypted_htmlbody, item->email->encrypted_htmlbody_size); |
2748 MALLOC_EMAIL(item); | |
2749 LIST_COPY(item->email->encrypted_htmlbody, (char*)); | |
2750 item->email->encrypted_htmlbody_size = list->items[x]->size; | |
2751 DEBUG_EMAIL(("Not Printed\n")); | |
2752 break; | 2689 break; |
2753 case 0x6F04: // Secure Text Body | 2690 case 0x6F04: // Secure Text Body |
2754 DEBUG_EMAIL(("Secure Text Body - ")); | 2691 LIST_COPY_EMAIL_SIZE("Secure Text Body", item->email->encrypted_body, item->email->encrypted_body_size); |
2755 MALLOC_EMAIL(item); | |
2756 LIST_COPY(item->email->encrypted_body, (char*)); | |
2757 item->email->encrypted_body_size = list->items[x]->size; | |
2758 DEBUG_EMAIL(("Not Printed\n")); | |
2759 break; | 2692 break; |
2760 case 0x7C07: // top of folders ENTRYID | 2693 case 0x7C07: // top of folders ENTRYID |
2761 DEBUG_EMAIL(("Top of folders RecID [0x7c07] - ")); | 2694 LIST_COPY_ENTRYID("Top of folders RecID", item->message_store->top_of_folder); |
2762 MALLOC_MESSAGESTORE(item); | |
2763 item->message_store->top_of_folder = (pst_entryid*) xmalloc(sizeof(pst_entryid)); | |
2764 memcpy(item->message_store->top_of_folder, list->items[x]->data, sizeof(pst_entryid)); | |
2765 LE32_CPU(item->message_store->top_of_folder->u1); | |
2766 LE32_CPU(item->message_store->top_of_folder->id); | |
2767 DEBUG_EMAIL(("u1 %#x id %#x\n", item->message_store->top_of_folder->u1, item->message_store->top_of_folder->id)); | |
2768 DEBUG_EMAIL_HEXPRINT((char*)item->message_store->top_of_folder->entryid, 16); | |
2769 break; | 2695 break; |
2770 case 0x8005: // Contact's Fullname | 2696 case 0x8005: // Contact's Fullname |
2771 LIST_COPY_CONTACT_STR("Contact Fullname", item->contact->fullname); | 2697 LIST_COPY_CONTACT_STR("Contact Fullname", item->contact->fullname); |
2772 break; | 2698 break; |
2773 case 0x801A: // Full Home Address | 2699 case 0x801A: // Full Home Address |
2835 break; | 2761 break; |
2836 case 0x80D8: // Internet Free/Busy | 2762 case 0x80D8: // Internet Free/Busy |
2837 LIST_COPY_CONTACT_STR("Internet Free/Busy", item->contact->free_busy_address); | 2763 LIST_COPY_CONTACT_STR("Internet Free/Busy", item->contact->free_busy_address); |
2838 break; | 2764 break; |
2839 case 0x8205: // Show on Free/Busy as | 2765 case 0x8205: // Show on Free/Busy as |
2840 // 0: Free | 2766 LIST_COPY_APPT_ENUM("Appointment shows as", item->appointment->showas, 0, 4, "Free", "Tentative", "Busy", "Out Of Office"); |
2841 // 1: Tentative | |
2842 // 2: Busy | |
2843 // 3: Out Of Office | |
2844 DEBUG_EMAIL(("Appointment shows as - ")); | |
2845 MALLOC_APPOINTMENT(item); | |
2846 memcpy(&(item->appointment->showas), list->items[x]->data, sizeof(item->appointment->showas)); | |
2847 LE32_CPU(item->appointment->showas); | |
2848 switch (item->appointment->showas) { | |
2849 case PST_FREEBUSY_FREE: | |
2850 DEBUG_EMAIL(("Free\n")); break; | |
2851 case PST_FREEBUSY_TENTATIVE: | |
2852 DEBUG_EMAIL(("Tentative\n")); break; | |
2853 case PST_FREEBUSY_BUSY: | |
2854 DEBUG_EMAIL(("Busy\n")); break; | |
2855 case PST_FREEBUSY_OUT_OF_OFFICE: | |
2856 DEBUG_EMAIL(("Out Of Office\n")); break; | |
2857 default: | |
2858 DEBUG_EMAIL(("Unknown Value: %d\n", item->appointment->showas)); break; | |
2859 } | |
2860 break; | 2767 break; |
2861 case 0x8208: // Location of an appointment | 2768 case 0x8208: // Location of an appointment |
2862 LIST_COPY_APPT_STR("Appointment Location", item->appointment->location); | 2769 LIST_COPY_APPT_STR("Appointment Location", item->appointment->location); |
2863 break; | 2770 break; |
2864 case 0x820d: // Appointment start | 2771 case 0x820d: // Appointment start |
2865 DEBUG_EMAIL(("Appointment Date Start - ")); | 2772 LIST_COPY_APPT_TIME("Appointment Date Start", item->appointment->start); |
2866 MALLOC_APPOINTMENT(item); | |
2867 LIST_COPY_TIME(item->appointment->start); | |
2868 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->start))); | |
2869 break; | 2773 break; |
2870 case 0x820e: // Appointment end | 2774 case 0x820e: // Appointment end |
2871 DEBUG_EMAIL(("Appointment Date End - ")); | 2775 LIST_COPY_APPT_TIME("Appointment Date End", item->appointment->end); |
2872 MALLOC_APPOINTMENT(item); | |
2873 LIST_COPY_TIME(item->appointment->end); | |
2874 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->end))); | |
2875 break; | 2776 break; |
2876 case 0x8214: // Label for an appointment | 2777 case 0x8214: // Label for an appointment |
2877 DEBUG_EMAIL(("Label for appointment - ")); | 2778 LIST_COPY_APPT_ENUM("Label for appointment", item->appointment->label, 0, 11, |
2878 MALLOC_APPOINTMENT(item); | 2779 "None", |
2879 memcpy(&(item->appointment->label), list->items[x]->data, sizeof(item->appointment->label)); | 2780 "Important", |
2880 LE32_CPU(item->appointment->label); | 2781 "Business", |
2881 switch (item->appointment->label) { | 2782 "Personal", |
2882 case PST_APP_LABEL_NONE: | 2783 "Vacation", |
2883 DEBUG_EMAIL(("None\n")); break; | 2784 "Must Attend", |
2884 case PST_APP_LABEL_IMPORTANT: | 2785 "Travel Required", |
2885 DEBUG_EMAIL(("Important\n")); break; | 2786 "Needs Preparation", |
2886 case PST_APP_LABEL_BUSINESS: | 2787 "Birthday", |
2887 DEBUG_EMAIL(("Business\n")); break; | 2788 "Anniversary", |
2888 case PST_APP_LABEL_PERSONAL: | 2789 "Phone Call"); |
2889 DEBUG_EMAIL(("Personal\n")); break; | |
2890 case PST_APP_LABEL_VACATION: | |
2891 DEBUG_EMAIL(("Vacation\n")); break; | |
2892 case PST_APP_LABEL_MUST_ATTEND: | |
2893 DEBUG_EMAIL(("Must Attend\n")); break; | |
2894 case PST_APP_LABEL_TRAVEL_REQ: | |
2895 DEBUG_EMAIL(("Travel Required\n")); break; | |
2896 case PST_APP_LABEL_NEEDS_PREP: | |
2897 DEBUG_EMAIL(("Needs Preparation\n")); break; | |
2898 case PST_APP_LABEL_BIRTHDAY: | |
2899 DEBUG_EMAIL(("Birthday\n")); break; | |
2900 case PST_APP_LABEL_ANNIVERSARY: | |
2901 DEBUG_EMAIL(("Anniversary\n")); break; | |
2902 case PST_APP_LABEL_PHONE_CALL: | |
2903 DEBUG_EMAIL(("Phone Call\n")); break; | |
2904 } | |
2905 break; | 2790 break; |
2906 case 0x8215: // All day appointment flag | 2791 case 0x8215: // All day appointment flag |
2907 LIST_COPY_APPT_BOOL("All day flag", item->appointment->all_day); | 2792 LIST_COPY_APPT_BOOL("All day flag", item->appointment->all_day); |
2908 break; | 2793 break; |
2909 case 0x8231: // Recurrence type | 2794 case 0x8231: // Recurrence type |
2910 // 1: Daily | 2795 LIST_COPY_APPT_ENUM("Appointment reccurs", item->appointment->recurrence_type, 0, 5, |
2911 // 2: Weekly | 2796 "None", |
2912 // 3: Monthly | 2797 "Daily", |
2913 // 4: Yearly | 2798 "Weekly", |
2914 DEBUG_EMAIL(("Appointment reccurs - ")); | 2799 "Monthly", |
2915 MALLOC_APPOINTMENT(item); | 2800 "Yearly"); |
2916 memcpy(&(item->appointment->recurrence_type), list->items[x]->data, sizeof(item->appointment->recurrence_type)); | |
2917 LE32_CPU(item->appointment->recurrence_type); | |
2918 switch (item->appointment->recurrence_type) { | |
2919 case PST_APP_RECUR_DAILY: | |
2920 DEBUG_EMAIL(("Daily\n")); break; | |
2921 case PST_APP_RECUR_WEEKLY: | |
2922 DEBUG_EMAIL(("Weekly\n")); break; | |
2923 case PST_APP_RECUR_MONTHLY: | |
2924 DEBUG_EMAIL(("Monthly\n")); break; | |
2925 case PST_APP_RECUR_YEARLY: | |
2926 DEBUG_EMAIL(("Yearly\n")); break; | |
2927 default: | |
2928 DEBUG_EMAIL(("Unknown Value: %d\n", item->appointment->recurrence_type)); break; | |
2929 } | |
2930 break; | 2801 break; |
2931 case 0x8232: // Recurrence description | 2802 case 0x8232: // Recurrence description |
2932 LIST_COPY_APPT_STR("Appointment recurrence description", item->appointment->recurrence); | 2803 LIST_COPY_APPT_STR("Appointment recurrence description", item->appointment->recurrence); |
2933 break; | 2804 break; |
2934 case 0x8234: // TimeZone as String | 2805 case 0x8234: // TimeZone as String |
2935 LIST_COPY_APPT_STR("TimeZone of times", item->appointment->timezonestring); | 2806 LIST_COPY_APPT_STR("TimeZone of times", item->appointment->timezonestring); |
2936 break; | 2807 break; |
2937 case 0x8235: // Recurrence start date | 2808 case 0x8235: // Recurrence start date |
2938 DEBUG_EMAIL(("Recurrence Start Date - ")); | 2809 LIST_COPY_APPT_TIME("Recurrence Start Date", item->appointment->recurrence_start); |
2939 MALLOC_APPOINTMENT(item); | |
2940 LIST_COPY_TIME(item->appointment->recurrence_start); | |
2941 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->recurrence_start))); | |
2942 break; | 2810 break; |
2943 case 0x8236: // Recurrence end date | 2811 case 0x8236: // Recurrence end date |
2944 DEBUG_EMAIL(("Recurrence End Date - ")); | 2812 LIST_COPY_APPT_TIME("Recurrence End Date", item->appointment->recurrence_end); |
2945 MALLOC_APPOINTMENT(item); | |
2946 LIST_COPY_TIME(item->appointment->recurrence_end); | |
2947 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->recurrence_end))); | |
2948 break; | 2813 break; |
2949 case 0x8501: // Reminder minutes before appointment start | 2814 case 0x8501: // Reminder minutes before appointment start |
2950 DEBUG_EMAIL(("Alarm minutes - ")); | 2815 LIST_COPY_APPT_INT32("Alarm minutes", item->appointment->alarm_minutes); |
2951 MALLOC_APPOINTMENT(item); | |
2952 memcpy(&(item->appointment->alarm_minutes), list->items[x]->data, sizeof(item->appointment->alarm_minutes)); | |
2953 LE32_CPU(item->appointment->alarm_minutes); | |
2954 DEBUG_EMAIL(("%i\n", item->appointment->alarm_minutes)); | |
2955 break; | 2816 break; |
2956 case 0x8503: // Reminder alarm | 2817 case 0x8503: // Reminder alarm |
2957 LIST_COPY_APPT_BOOL("Reminder alarm", item->appointment->alarm); | 2818 LIST_COPY_APPT_BOOL("Reminder alarm", item->appointment->alarm); |
2958 break; | 2819 break; |
2959 case 0x8516: // Common start | 2820 case 0x8516: // Common start |
2960 DEBUG_EMAIL(("Common Start Date - ")); | 2821 DEBUG_EMAIL(("Common Start Date - %s\n", fileTimeToAscii((FILETIME*)list->items[x]->data))); |
2961 DEBUG_EMAIL(("%s\n", fileTimeToAscii((FILETIME*)list->items[x]->data))); | |
2962 break; | 2822 break; |
2963 case 0x8517: // Common end | 2823 case 0x8517: // Common end |
2964 DEBUG_EMAIL(("Common End Date - ")); | 2824 DEBUG_EMAIL(("Common End Date - %s\n", fileTimeToAscii((FILETIME*)list->items[x]->data))); |
2965 DEBUG_EMAIL(("%s\n", fileTimeToAscii((FILETIME*)list->items[x]->data))); | |
2966 break; | 2825 break; |
2967 case 0x851f: // Play reminder sound filename | 2826 case 0x851f: // Play reminder sound filename |
2968 LIST_COPY_APPT_STR("Appointment reminder sound filename", item->appointment->alarm_filename); | 2827 LIST_COPY_APPT_STR("Appointment reminder sound filename", item->appointment->alarm_filename); |
2969 break; | 2828 break; |
2970 case 0x8530: // Followup | 2829 case 0x8530: // Followup |
2978 break; | 2837 break; |
2979 case 0x8554: // Outlook Version | 2838 case 0x8554: // Outlook Version |
2980 LIST_COPY_STR("Outlook Version", item->outlook_version); | 2839 LIST_COPY_STR("Outlook Version", item->outlook_version); |
2981 break; | 2840 break; |
2982 case 0x8560: // Appointment Reminder Time | 2841 case 0x8560: // Appointment Reminder Time |
2983 DEBUG_EMAIL(("Appointment Reminder Time - ")); | 2842 LIST_COPY_APPT_TIME("Appointment Reminder Time", item->appointment->reminder); |
2984 MALLOC_APPOINTMENT(item); | |
2985 LIST_COPY_TIME(item->appointment->reminder); | |
2986 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->appointment->reminder))); | |
2987 break; | 2843 break; |
2988 case 0x8700: // Journal Type | 2844 case 0x8700: // Journal Type |
2989 MALLOC_JOURNAL(item); | 2845 LIST_COPY_JOURNAL_STR("Journal Entry Type", item->journal->type); |
2990 LIST_COPY_STR("Journal Entry Type", item->journal->type); | |
2991 break; | 2846 break; |
2992 case 0x8706: // Journal Start date/time | 2847 case 0x8706: // Journal Start date/time |
2993 DEBUG_EMAIL(("Start Timestamp - ")); | 2848 LIST_COPY_JOURNAL_TIME("Start Timestamp", item->journal->start); |
2994 MALLOC_JOURNAL(item); | |
2995 LIST_COPY_TIME(item->journal->start); | |
2996 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->journal->start))); | |
2997 break; | 2849 break; |
2998 case 0x8708: // Journal End date/time | 2850 case 0x8708: // Journal End date/time |
2999 DEBUG_EMAIL(("End Timestamp - ")); | 2851 LIST_COPY_JOURNAL_TIME("End Timestamp", item->journal->end); |
3000 MALLOC_JOURNAL(item); | 2852 break; |
3001 LIST_COPY_TIME(item->journal->end); | 2853 case 0x8712: // Journal Type Description |
3002 DEBUG_EMAIL(("%s\n", fileTimeToAscii(item->journal->end))); | 2854 LIST_COPY_JOURNAL_STR("Journal description", item->journal->description); |
3003 break; | |
3004 case 0x8712: // Title? | |
3005 MALLOC_JOURNAL(item); | |
3006 LIST_COPY_STR("Journal Entry Type", item->journal->type); | |
3007 break; | 2855 break; |
3008 default: | 2856 default: |
3009 if (list->items[x]->type == (uint32_t)0x0002) { | 2857 if (list->items[x]->type == (uint32_t)0x0002) { |
3010 DEBUG_EMAIL(("Unknown type %#x 16bit int = %hi\n", list->items[x]->id, | 2858 DEBUG_EMAIL(("Unknown type %#x 16bit int = %hi\n", list->items[x]->id, |
3011 *(int16_t*)list->items[x]->data)); | 2859 *(int16_t*)list->items[x]->data)); |
4322 if (str->is_utf8) return; | 4170 if (str->is_utf8) return; |
4323 if (!str->str) { | 4171 if (!str->str) { |
4324 str->str = strdup(""); | 4172 str->str = strdup(""); |
4325 return; | 4173 return; |
4326 } | 4174 } |
4327 DEBUG_ENT("pst_convert_utf8"); | |
4328 const char *charset = pst_default_charset(item); | 4175 const char *charset = pst_default_charset(item); |
4329 if (!strcasecmp("utf-8", charset)) return; // already utf8 | 4176 if (!strcasecmp("utf-8", charset)) return; // already utf8 |
4177 DEBUG_ENT("pst_convert_utf8"); | |
4330 vbuf *newer = vballoc(2); | 4178 vbuf *newer = vballoc(2); |
4331 size_t rc = vb_8bit2utf8(newer, str->str, strlen(str->str) + 1, charset); | 4179 size_t rc = vb_8bit2utf8(newer, str->str, strlen(str->str) + 1, charset); |
4332 if (rc == (size_t)-1) { | 4180 if (rc == (size_t)-1) { |
4333 free(newer->b); | 4181 free(newer->b); |
4334 DEBUG_EMAIL(("Failed to convert %s to utf-8 - %s\n", charset, str->str)); | 4182 DEBUG_EMAIL(("Failed to convert %s to utf-8 - %s\n", charset, str->str)); |