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