Mercurial > libpst
annotate src/libpst.h @ 151:cda7c812ec01
track character set individually for each mapi element
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 08 Mar 2009 14:35:26 -0700 |
parents | 06aa84023b48 |
children | edebaf0e87d2 |
rev | line source |
---|---|
16 | 1 /*** |
2 * libpst.h | |
3 * Part of LibPST project | |
4 * Written by David Smith | |
46 | 5 * dave.s@earthcorp.com |
16 | 6 */ |
7 // LibPST - Library for Accessing Outlook .pst files | |
8 // Dave Smith - davesmith@users.sourceforge.net | |
9 | |
10 #ifndef LIBPST_H | |
11 #define LIBPST_H | |
12 | |
132
5e4d6faada34
fix from Fridrich Strba for parallel make
Carl Byington <carl@five-ten-sg.com>
parents:
130
diff
changeset
|
13 #include "common.h" |
130
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
14 |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
15 |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
16 // switch to maximal packing for all structures in the libpst interface |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
17 // this is reverted at the end of this file |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
18 #ifdef _MSC_VER |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
19 #pragma pack(push, 1) |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
20 #endif |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
21 #if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC) |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
22 #pragma pack(1) |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
23 #endif |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
24 |
16 | 25 |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
26 #define PST_TYPE_NOTE 1 |
16 | 27 #define PST_TYPE_APPOINTMENT 8 |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
28 #define PST_TYPE_CONTACT 9 |
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
29 #define PST_TYPE_JOURNAL 10 |
16 | 30 #define PST_TYPE_STICKYNOTE 11 |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
31 #define PST_TYPE_TASK 12 |
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
32 #define PST_TYPE_OTHER 13 |
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
33 #define PST_TYPE_REPORT 14 |
16 | 34 |
35 // defines whether decryption is done on this bit of data | |
36 #define PST_NO_ENC 0 | |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
37 #define PST_ENC 1 |
16 | 38 |
39 // defines types of possible encryption | |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
40 #define PST_NO_ENCRYPT 0 |
16 | 41 #define PST_COMP_ENCRYPT 1 |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
42 #define PST_ENCRYPT 2 |
16 | 43 |
44 // defines different types of mappings | |
46 | 45 #define PST_MAP_ATTRIB (uint32_t)1 |
46 #define PST_MAP_HEADER (uint32_t)2 | |
16 | 47 |
48 // define my custom email attributes. | |
49 #define PST_ATTRIB_HEADER -1 | |
50 | |
51 // defines types of free/busy values for appointment->showas | |
52 #define PST_FREEBUSY_FREE 0 | |
53 #define PST_FREEBUSY_TENTATIVE 1 | |
54 #define PST_FREEBUSY_BUSY 2 | |
55 #define PST_FREEBUSY_OUT_OF_OFFICE 3 | |
56 | |
57 // defines labels for appointment->label | |
46 | 58 #define PST_APP_LABEL_NONE 0 // None |
16 | 59 #define PST_APP_LABEL_IMPORTANT 1 // Important |
46 | 60 #define PST_APP_LABEL_BUSINESS 2 // Business |
61 #define PST_APP_LABEL_PERSONAL 3 // Personal | |
62 #define PST_APP_LABEL_VACATION 4 // Vacation | |
16 | 63 #define PST_APP_LABEL_MUST_ATTEND 5 // Must Attend |
64 #define PST_APP_LABEL_TRAVEL_REQ 6 // Travel Required | |
65 #define PST_APP_LABEL_NEEDS_PREP 7 // Needs Preparation | |
46 | 66 #define PST_APP_LABEL_BIRTHDAY 8 // Birthday |
16 | 67 #define PST_APP_LABEL_ANNIVERSARY 9 // Anniversary |
68 #define PST_APP_LABEL_PHONE_CALL 10// Phone Call | |
69 | |
50 | 70 // define type of reccuring event |
71 #define PST_APP_RECUR_NONE 0 | |
72 #define PST_APP_RECUR_DAILY 1 | |
73 #define PST_APP_RECUR_WEEKLY 2 | |
74 #define PST_APP_RECUR_MONTHLY 3 | |
75 #define PST_APP_RECUR_YEARLY 4 | |
76 | |
49 | 77 |
46 | 78 typedef struct pst_misc_6_struct { |
49 | 79 int32_t i1; |
80 int32_t i2; | |
81 int32_t i3; | |
82 int32_t i4; | |
83 int32_t i5; | |
84 int32_t i6; | |
16 | 85 } pst_misc_6; |
86 | |
49 | 87 |
46 | 88 typedef struct pst_entryid_struct { |
49 | 89 int32_t u1; |
90 char entryid[16]; | |
91 uint32_t id; | |
16 | 92 } pst_entryid; |
93 | |
49 | 94 |
46 | 95 typedef struct pst_desc_struct32 { |
49 | 96 uint32_t d_id; |
97 uint32_t desc_id; | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
98 uint32_t tree_id; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
99 uint32_t parent_d_id; |
43 | 100 } pst_desc32; |
16 | 101 |
49 | 102 |
46 | 103 typedef struct pst_desc_structn { |
49 | 104 uint64_t d_id; |
105 uint64_t desc_id; | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
106 uint64_t tree_id; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
107 uint32_t parent_d_id; // not 64 bit ?? |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
108 uint32_t u1; // padding |
43 | 109 } pst_descn; |
110 | |
49 | 111 |
46 | 112 typedef struct pst_index_struct32 { |
49 | 113 uint32_t id; |
114 uint32_t offset; | |
115 uint16_t size; | |
116 int16_t u1; | |
43 | 117 } pst_index32; |
118 | |
49 | 119 |
46 | 120 typedef struct pst_index_struct { |
49 | 121 uint64_t id; |
122 uint64_t offset; | |
123 uint16_t size; | |
124 int16_t u0; | |
125 int32_t u1; | |
16 | 126 } pst_index; |
127 | |
49 | 128 |
46 | 129 typedef struct pst_index_tree32 { |
49 | 130 uint32_t id; |
131 uint32_t offset; | |
132 uint32_t size; | |
133 int32_t u1; | |
134 struct pst_index_tree * next; | |
43 | 135 } pst_index_ll32; |
136 | |
49 | 137 |
46 | 138 typedef struct pst_index_tree { |
49 | 139 uint64_t id; |
140 uint64_t offset; | |
141 uint64_t size; | |
142 int64_t u1; | |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
143 struct pst_index_tree *next; |
16 | 144 } pst_index_ll; |
145 | |
49 | 146 |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
147 typedef struct pst_id2_tree { |
49 | 148 uint64_t id2; |
149 pst_index_ll *id; | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
150 struct pst_id2_tree *child; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
151 struct pst_id2_tree *next; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
152 } pst_id2_ll; |
16 | 153 |
49 | 154 |
46 | 155 typedef struct pst_desc_tree { |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
156 uint64_t d_id; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
157 uint64_t parent_d_id; |
143
fdc58ad2c758
fix embedded rfc822 messages with attachments
Carl Byington <carl@five-ten-sg.com>
parents:
142
diff
changeset
|
158 pst_index_ll *desc; |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
159 pst_index_ll *assoc_tree; |
143
fdc58ad2c758
fix embedded rfc822 messages with attachments
Carl Byington <carl@five-ten-sg.com>
parents:
142
diff
changeset
|
160 int32_t no_child; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
161 struct pst_desc_tree *prev; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
162 struct pst_desc_tree *next; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
163 struct pst_desc_tree *parent; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
164 struct pst_desc_tree *child; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
165 struct pst_desc_tree *child_tail; |
16 | 166 } pst_desc_ll; |
167 | |
49 | 168 |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
169 typedef struct pst_string { |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
170 int is_utf8; // 1 = true, 0 = false |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
171 char *str; // either utf8 or some sbcs |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
172 } pst_string; |
16 | 173 |
49 | 174 |
46 | 175 typedef struct pst_item_email { |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
176 FILETIME *arrival_date; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
177 int autoforward; // 1 = true, 0 = not set, -1 = false |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
178 pst_string cc_address; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
179 pst_string bcc_address; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
180 int32_t conv_index; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
181 int conversion_prohibited; // 1 = true, 0 = false |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
182 int delete_after_submit; // 1 = true, 0 = false |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
183 int delivery_report; // 1 = true, 0 = false |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
184 char *encrypted_body; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
185 size_t encrypted_body_size; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
186 char *encrypted_htmlbody; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
187 size_t encrypted_htmlbody_size; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
188 int32_t flag; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
189 pst_string header; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
190 pst_string htmlbody; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
191 int32_t importance; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
192 pst_string in_reply_to; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
193 int message_cc_me; // 1 = true, 0 = false |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
194 int message_recip_me; // 1 = true, 0 = false |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
195 int message_to_me; // 1 = true, 0 = false |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
196 pst_string messageid; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
197 int32_t orig_sensitivity; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
198 pst_string original_bcc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
199 pst_string original_cc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
200 pst_string original_to; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
201 pst_string outlook_recipient; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
202 pst_string outlook_recipient_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
203 pst_string outlook_recipient2; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
204 pst_string outlook_sender; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
205 pst_string outlook_sender_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
206 pst_string outlook_sender2; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
207 int32_t priority; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
208 pst_string processed_subject; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
209 int read_receipt; // 1 = true, 0 = false |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
210 pst_string recip_access; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
211 pst_string recip_address; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
212 pst_string recip2_access; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
213 pst_string recip2_address; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
214 int reply_requested; // 1 = true, 0 = false |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
215 pst_string reply_to; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
216 pst_string return_path_address; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
217 int32_t rtf_body_char_count; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
218 int32_t rtf_body_crc; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
219 pst_string rtf_body_tag; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
220 char *rtf_compressed; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
221 uint32_t rtf_compressed_size; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
222 int rtf_in_sync; // 1 = true, 0 = doesn't exist, -1 = false |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
223 int32_t rtf_ws_prefix_count; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
224 int32_t rtf_ws_trailing_count; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
225 pst_string sender_access; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
226 pst_string sender_address; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
227 pst_string sender2_access; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
228 pst_string sender2_address; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
229 int32_t sensitivity; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
230 FILETIME *sent_date; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
231 pst_entryid *sentmail_folder; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
232 pst_string sentto_address; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
233 // delivery report fields |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
234 pst_string report_text; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
235 FILETIME *report_time; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
236 int32_t ndr_reason_code; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
237 int32_t ndr_diag_code; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
238 pst_string supplementary_info; |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
239 int32_t ndr_status_code; |
16 | 240 } pst_item_email; |
241 | |
49 | 242 |
46 | 243 typedef struct pst_item_folder { |
49 | 244 int32_t email_count; |
245 int32_t unseen_email_count; | |
246 int32_t assoc_count; | |
247 int subfolder; // 1 = true, 0 = false | |
16 | 248 } pst_item_folder; |
249 | |
49 | 250 |
46 | 251 typedef struct pst_item_message_store { |
51 | 252 pst_entryid *top_of_personal_folder; // 0x35e0 |
253 pst_entryid *default_outbox_folder; // 0x35e2 | |
254 pst_entryid *deleted_items_folder; // 0x35e3 | |
255 pst_entryid *sent_items_folder; // 0x35e4 | |
256 pst_entryid *user_views_folder; // 0x35e5 | |
257 pst_entryid *common_view_folder; // 0x35e6 | |
258 pst_entryid *search_root_folder; // 0x35e7 | |
259 pst_entryid *top_of_folder; // 0x7c07 | |
260 int32_t valid_mask; // 0x35df // what folders the message store contains | |
261 int32_t pwd_chksum; // 0x76ff | |
16 | 262 } pst_item_message_store; |
263 | |
49 | 264 |
46 | 265 typedef struct pst_item_contact { |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
266 pst_string access_method; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
267 pst_string account_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
268 pst_string address1; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
269 pst_string address1a; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
270 pst_string address1_desc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
271 pst_string address1_transport; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
272 pst_string address2; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
273 pst_string address2a; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
274 pst_string address2_desc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
275 pst_string address2_transport; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
276 pst_string address3; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
277 pst_string address3a; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
278 pst_string address3_desc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
279 pst_string address3_transport; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
280 pst_string assistant_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
281 pst_string assistant_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
282 pst_string billing_information; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
283 FILETIME *birthday; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
284 pst_string business_address; // 0x801b |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
285 pst_string business_city; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
286 pst_string business_country; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
287 pst_string business_fax; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
288 pst_string business_homepage; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
289 pst_string business_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
290 pst_string business_phone2; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
291 pst_string business_po_box; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
292 pst_string business_postal_code; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
293 pst_string business_state; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
294 pst_string business_street; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
295 pst_string callback_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
296 pst_string car_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
297 pst_string company_main_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
298 pst_string company_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
299 pst_string computer_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
300 pst_string customer_id; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
301 pst_string def_postal_address; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
302 pst_string department; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
303 pst_string display_name_prefix; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
304 pst_string first_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
305 pst_string followup; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
306 pst_string free_busy_address; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
307 pst_string ftp_site; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
308 pst_string fullname; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
309 int16_t gender; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
310 pst_string gov_id; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
311 pst_string hobbies; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
312 pst_string home_address; // 0x801a |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
313 pst_string home_city; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
314 pst_string home_country; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
315 pst_string home_fax; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
316 pst_string home_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
317 pst_string home_phone2; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
318 pst_string home_po_box; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
319 pst_string home_postal_code; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
320 pst_string home_state; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
321 pst_string home_street; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
322 pst_string initials; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
323 pst_string isdn_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
324 pst_string job_title; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
325 pst_string keyword; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
326 pst_string language; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
327 pst_string location; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
328 int mail_permission; // 1 = true, 0 = false |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
329 pst_string manager_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
330 pst_string middle_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
331 pst_string mileage; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
332 pst_string mobile_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
333 pst_string nickname; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
334 pst_string office_loc; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
335 pst_string common_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
336 pst_string org_id; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
337 pst_string other_address; // 0x801c |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
338 pst_string other_city; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
339 pst_string other_country; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
340 pst_string other_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
341 pst_string other_po_box; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
342 pst_string other_postal_code; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
343 pst_string other_state; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
344 pst_string other_street; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
345 pst_string pager_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
346 pst_string personal_homepage; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
347 pst_string pref_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
348 pst_string primary_fax; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
349 pst_string primary_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
350 pst_string profession; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
351 pst_string radio_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
352 int rich_text; // 1 = true, 0 = false |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
353 pst_string spouse_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
354 pst_string suffix; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
355 pst_string surname; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
356 pst_string telex; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
357 pst_string transmittable_display_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
358 pst_string ttytdd_phone; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
359 FILETIME *wedding_anniversary; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
360 pst_string work_address_street; // 0x8045 |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
361 pst_string work_address_city; // 0x8046 |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
362 pst_string work_address_state; // 0x8047 |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
363 pst_string work_address_postalcode; // 0x8048 |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
364 pst_string work_address_country; // 0x8049 |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
365 pst_string work_address_postofficebox; // 0x804a |
16 | 366 } pst_item_contact; |
367 | |
49 | 368 |
46 | 369 typedef struct pst_item_attach { |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
370 pst_string filename1; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
371 pst_string filename2; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
372 pst_string mimetype; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
373 char *data; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
374 size_t size; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
375 uint64_t id2_val; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
376 uint64_t id_val; // calculated from id2_val during creation of record |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
377 pst_id2_ll *id2_head; // deep copy from child |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
378 int32_t method; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
379 int32_t position; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
380 int32_t sequence; |
49 | 381 struct pst_item_attach *next; |
16 | 382 } pst_item_attach; |
383 | |
49 | 384 |
46 | 385 typedef struct pst_item_extra_field { |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
386 char *field_name; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
387 char *value; |
49 | 388 struct pst_item_extra_field *next; |
16 | 389 } pst_item_extra_field; |
390 | |
49 | 391 |
46 | 392 typedef struct pst_item_journal { |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
393 FILETIME *end; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
394 FILETIME *start; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
395 pst_string type; |
16 | 396 } pst_item_journal; |
397 | |
49 | 398 |
46 | 399 typedef struct pst_item_appointment { |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
400 FILETIME *end; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
401 pst_string location; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
402 int alarm; // 1 = true, 0 = false |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
403 FILETIME *reminder; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
404 int32_t alarm_minutes; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
405 pst_string alarm_filename; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
406 FILETIME *start; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
407 pst_string timezonestring; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
408 int32_t showas; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
409 int32_t label; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
410 int all_day; // 1 = true, 0 = false |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
411 pst_string recurrence; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
412 int32_t recurrence_type; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
413 FILETIME *recurrence_start; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
414 FILETIME *recurrence_end; |
16 | 415 } pst_item_appointment; |
416 | |
49 | 417 |
46 | 418 typedef struct pst_item { |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
419 struct pst_item_email *email; // data referring to email |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
420 struct pst_item_folder *folder; // data referring to folder |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
421 struct pst_item_contact *contact; // data referring to contact |
49 | 422 struct pst_item_attach *attach; // linked list of attachments |
423 struct pst_item_message_store *message_store; // data referring to the message store | |
424 struct pst_item_extra_field *extra_fields; // linked list of extra headers and such | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
425 struct pst_item_journal *journal; // data referring to a journal entry |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
426 struct pst_item_appointment *appointment; // data referring to a calendar entry |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
427 int type; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
428 char *ascii_type; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
429 pst_string file_as; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
430 pst_string comment; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
431 pst_string body_charset; // null if not specified |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
432 pst_string body; // email, journal |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
433 pst_string subject; // email, journal |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
434 int32_t internet_cpid; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
435 int32_t message_codepage; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
436 int32_t message_size; |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
437 pst_string outlook_version; |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
438 char *record_key; // probably 16 bytes long. |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
439 size_t record_key_size; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
440 int response_requested; // 1 = true, 0 = false |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
441 FILETIME *create_date; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
442 FILETIME *modify_date; |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
443 int private_member; // 1 = true, 0 = false |
16 | 444 } pst_item; |
445 | |
49 | 446 |
46 | 447 typedef struct pst_x_attrib_ll { |
49 | 448 uint32_t type; |
449 uint32_t mytype; | |
450 uint32_t map; | |
451 void *data; | |
452 struct pst_x_attrib_ll *next; | |
16 | 453 } pst_x_attrib_ll; |
454 | |
49 | 455 |
52 | 456 typedef struct pst_block_recorder { |
457 struct pst_block_recorder *next; | |
125
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
458 int64_t offset; |
52 | 459 size_t size; |
460 int readcount; | |
461 } pst_block_recorder; | |
462 | |
463 | |
46 | 464 typedef struct pst_file { |
49 | 465 pst_index_ll *i_head, *i_tail; |
52 | 466 pst_desc_ll *d_head, *d_tail; |
49 | 467 pst_x_attrib_ll *x_head; |
52 | 468 pst_block_recorder *block_head; |
46 | 469 |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
470 int do_read64; // 0 is 32-bit pst file, pre Outlook 2003; |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
471 // 1 is 64-bit pst file, Outlook 2003 and later |
49 | 472 uint64_t index1; |
473 uint64_t index1_back; | |
474 uint64_t index2; | |
475 uint64_t index2_back; | |
142
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
476 FILE * fp; // file pointer to opened PST file |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
477 uint64_t size; // pst file size |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
478 unsigned char encryption; // pst encryption setting |
2189a6b8134e
improve character set handling - don't try to convert utf-8 to single byte for fields that were not originally unicode.
Carl Byington <carl@five-ten-sg.com>
parents:
132
diff
changeset
|
479 unsigned char ind_type; // pst index type |
16 | 480 } pst_file; |
481 | |
49 | 482 |
46 | 483 typedef struct pst_block_offset { |
49 | 484 int16_t from; |
485 int16_t to; | |
16 | 486 } pst_block_offset; |
487 | |
49 | 488 |
46 | 489 typedef struct pst_block_offset_pointer { |
52 | 490 char *from; |
491 char *to; | |
492 int needfree; | |
35 | 493 } pst_block_offset_pointer; |
494 | |
49 | 495 |
496 typedef struct pst_num_item { | |
52 | 497 uint32_t id; // not an id1 or id2, this is actually some sort of type code |
498 char *data; | |
499 uint32_t type; | |
500 size_t size; | |
501 char *extra; | |
49 | 502 } pst_num_item; |
503 | |
16 | 504 |
46 | 505 typedef struct pst_num_array { |
49 | 506 int32_t count_item; |
507 int32_t orig_count; | |
508 int32_t count_array; | |
509 struct pst_num_item ** items; | |
510 struct pst_num_array *next; | |
16 | 511 } pst_num_array; |
512 | |
49 | 513 |
514 typedef struct pst_holder { | |
94
997cf1373f9e
fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents:
90
diff
changeset
|
515 char **buf; |
997cf1373f9e
fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents:
90
diff
changeset
|
516 FILE *fp; |
997cf1373f9e
fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents:
90
diff
changeset
|
517 int base64; |
49 | 518 } pst_holder; |
519 | |
520 | |
521 typedef struct pst_subblock { | |
52 | 522 char *buf; |
523 size_t read_size; | |
524 size_t i_offset; | |
49 | 525 } pst_subblock; |
526 | |
527 | |
528 typedef struct pst_subblocks { | |
529 size_t subblock_count; | |
530 pst_subblock *subs; | |
531 } pst_subblocks; | |
532 | |
16 | 533 |
534 // prototypes | |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
52
diff
changeset
|
535 int pst_open(pst_file *pf, char *name); |
46 | 536 int pst_close(pst_file *pf); |
537 pst_desc_ll * pst_getTopOfFolders(pst_file *pf, pst_item *root); | |
52 | 538 size_t pst_attach_to_mem(pst_file *pf, pst_item_attach *attach, char **b); |
46 | 539 size_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp); |
540 size_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp); | |
541 int pst_load_index (pst_file *pf); | |
542 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d); | |
543 int pst_load_extended_attributes(pst_file *pf); | |
16 | 544 |
125
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
545 int pst_build_id_ptr(pst_file *pf, int64_t offset, int32_t depth, uint64_t linku1, uint64_t start_val, uint64_t end_val); |
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
546 int pst_build_desc_ptr(pst_file *pf, int64_t offset, int32_t depth, uint64_t linku1, uint64_t start_val, uint64_t end_val); |
46 | 547 pst_item* pst_getItem(pst_file *pf, pst_desc_ll *d_ptr); |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
548 pst_item* pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr, pst_id2_ll *m_head); |
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
549 pst_num_array* pst_parse_block(pst_file *pf, uint64_t block_id, pst_id2_ll *i2_head, pst_num_array *na_head); |
46 | 550 int pst_process(pst_num_array *list, pst_item *item, pst_item_attach *attach); |
551 void pst_free_list(pst_num_array *list); | |
552 void pst_freeItem(pst_item *item); | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
553 void pst_free_id2(pst_id2_ll * head); |
46 | 554 void pst_free_id (pst_index_ll *head); |
555 void pst_free_desc (pst_desc_ll *head); | |
556 void pst_free_xattrib(pst_x_attrib_ll *x); | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
557 int pst_getBlockOffsetPointer(pst_file *pf, pst_id2_ll *i2_head, pst_subblocks *subblocks, uint32_t offset, pst_block_offset_pointer *p); |
52 | 558 int pst_getBlockOffset(char *buf, size_t read_size, uint32_t i_offset, uint32_t offset, pst_block_offset *p); |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
559 pst_id2_ll* pst_build_id2(pst_file *pf, pst_index_ll* list); |
46 | 560 pst_index_ll* pst_getID(pst_file* pf, uint64_t id); |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
561 pst_id2_ll* pst_getID2(pst_id2_ll * ptr, uint64_t id); |
46 | 562 pst_desc_ll* pst_getDptr(pst_file *pf, uint64_t id); |
125
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
563 size_t pst_read_block_size(pst_file *pf, int64_t offset, size_t size, char **buf); |
79
56fa05fd5271
Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
564 int pst_decrypt(uint64_t id, char *buf, size_t size, unsigned char type); |
46 | 565 uint64_t pst_getIntAt(pst_file *pf, char *buf); |
125
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
566 uint64_t pst_getIntAtPos(pst_file *pf, int64_t pos); |
23a36ac0514d
recover dropped pragma pack line, use int64_t rather than off_t to avoid forcing users of the shared library to enable large file support.
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
567 size_t pst_getAtPos(pst_file *pf, int64_t pos, void* buf, size_t size); |
52 | 568 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t id, char **b); |
569 size_t pst_ff_getIDblock(pst_file *pf, uint64_t id, char** b); | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
570 size_t pst_ff_getID2block(pst_file *pf, uint64_t id2, pst_id2_ll *id2_head, char** buf); |
49 | 571 size_t pst_ff_getID2data(pst_file *pf, pst_index_ll *ptr, pst_holder *h); |
572 size_t pst_ff_compile_ID(pst_file *pf, uint64_t id, pst_holder *h, size_t size); | |
16 | 573 |
46 | 574 int pst_strincmp(char *a, char *b, size_t x); |
575 int pst_stricmp(char *a, char *b); | |
576 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream); | |
47 | 577 char * pst_wide_to_single(char *wt, size_t size); |
43 | 578 |
46 | 579 char * pst_rfc2426_escape(char *str); |
580 int pst_chr_count(char *str, char x); | |
581 char * pst_rfc2425_datetime_format(FILETIME *ft); | |
582 char * pst_rfc2445_datetime_format(FILETIME *ft); | |
43 | 583 |
51 | 584 void pst_printDptr(pst_file *pf, pst_desc_ll *ptr); |
585 void pst_printIDptr(pst_file* pf); | |
150
06aa84023b48
rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents:
143
diff
changeset
|
586 void pst_printID2ptr(pst_id2_ll *ptr); |
16 | 587 |
151
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
588 const char* pst_codepage(int cp); |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
589 const char* pst_default_charset(pst_item *item); |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
590 void pst_convert_utf8_null(pst_item *item, pst_string *str); |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
591 void pst_convert_utf8(pst_item *item, pst_string *str); |
cda7c812ec01
track character set individually for each mapi element
Carl Byington <carl@five-ten-sg.com>
parents:
150
diff
changeset
|
592 |
130
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
593 |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
594 // switch from maximal packing back to default packing |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
595 // undo the packing from the beginning of this file |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
596 #ifdef _MSC_VER |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
597 #pragma pack(pop) |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
598 #endif |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
599 #if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC) |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
600 #pragma pack() |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
601 #endif |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
602 |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
603 |
e35fd42bac05
more cleanup of include files
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
604 |
16 | 605 #endif // defined LIBPST_H |