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