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
|
50
|
114 // define type of reccuring event
|
|
115 #define PST_APP_RECUR_NONE 0
|
|
116 #define PST_APP_RECUR_DAILY 1
|
|
117 #define PST_APP_RECUR_WEEKLY 2
|
|
118 #define PST_APP_RECUR_MONTHLY 3
|
|
119 #define PST_APP_RECUR_YEARLY 4
|
|
120
|
49
|
121
|
46
|
122 typedef struct pst_misc_6_struct {
|
49
|
123 int32_t i1;
|
|
124 int32_t i2;
|
|
125 int32_t i3;
|
|
126 int32_t i4;
|
|
127 int32_t i5;
|
|
128 int32_t i6;
|
16
|
129 } pst_misc_6;
|
|
130
|
49
|
131
|
46
|
132 typedef struct pst_entryid_struct {
|
49
|
133 int32_t u1;
|
|
134 char entryid[16];
|
|
135 uint32_t id;
|
16
|
136 } pst_entryid;
|
|
137
|
49
|
138
|
46
|
139 typedef struct pst_desc_struct32 {
|
49
|
140 uint32_t d_id;
|
|
141 uint32_t desc_id;
|
|
142 uint32_t list_id;
|
|
143 uint32_t parent_id;
|
43
|
144 } pst_desc32;
|
16
|
145
|
49
|
146
|
46
|
147 typedef struct pst_desc_structn {
|
49
|
148 uint64_t d_id;
|
|
149 uint64_t desc_id;
|
|
150 uint64_t list_id;
|
|
151 uint32_t parent_id; // not 64 bit ??
|
|
152 uint32_t u1; // padding
|
43
|
153 } pst_descn;
|
|
154
|
49
|
155
|
46
|
156 typedef struct pst_index_struct32 {
|
49
|
157 uint32_t id;
|
|
158 uint32_t offset;
|
|
159 uint16_t size;
|
|
160 int16_t u1;
|
43
|
161 } pst_index32;
|
|
162
|
49
|
163
|
46
|
164 typedef struct pst_index_struct {
|
49
|
165 uint64_t id;
|
|
166 uint64_t offset;
|
|
167 uint16_t size;
|
|
168 int16_t u0;
|
|
169 int32_t u1;
|
16
|
170 } pst_index;
|
|
171
|
49
|
172
|
46
|
173 typedef struct pst_index_tree32 {
|
49
|
174 uint32_t id;
|
|
175 uint32_t offset;
|
|
176 uint32_t size;
|
|
177 int32_t u1;
|
|
178 struct pst_index_tree * next;
|
43
|
179 } pst_index_ll32;
|
|
180
|
49
|
181
|
46
|
182 typedef struct pst_index_tree {
|
49
|
183 uint64_t id;
|
|
184 uint64_t offset;
|
|
185 uint64_t size;
|
|
186 int64_t u1;
|
|
187 struct pst_index_tree * next;
|
16
|
188 } pst_index_ll;
|
|
189
|
49
|
190
|
46
|
191 typedef struct pst_index2_tree {
|
49
|
192 uint64_t id2;
|
|
193 pst_index_ll *id;
|
|
194 struct pst_index2_tree * next;
|
16
|
195 } pst_index2_ll;
|
|
196
|
49
|
197
|
46
|
198 typedef struct pst_desc_tree {
|
49
|
199 uint64_t id;
|
|
200 pst_index_ll * list_index;
|
|
201 pst_index_ll * desc;
|
|
202 int32_t no_child;
|
|
203 struct pst_desc_tree * prev;
|
|
204 struct pst_desc_tree * next;
|
|
205 struct pst_desc_tree * parent;
|
|
206 struct pst_desc_tree * child;
|
|
207 struct pst_desc_tree * child_tail;
|
16
|
208 } pst_desc_ll;
|
|
209
|
49
|
210
|
46
|
211 typedef struct pst_item_email_subject {
|
49
|
212 int off1;
|
|
213 int off2;
|
|
214 char *subj;
|
16
|
215 } pst_item_email_subject;
|
|
216
|
49
|
217
|
46
|
218 typedef struct pst_item_email {
|
49
|
219 FILETIME *arrival_date;
|
|
220 int autoforward; // 1 = true, 0 = not set, -1 = false
|
|
221 char *body;
|
|
222 char *cc_address;
|
|
223 char *common_name;
|
|
224 int32_t conv_index;
|
|
225 int conversion_prohib; // 1 = true, 0 = false
|
|
226 int delete_after_submit; // 1 = true, 0 = false
|
|
227 int delivery_report; // 1 = true, 0 = false
|
|
228 char *encrypted_body;
|
50
|
229 size_t encrypted_body_size;
|
49
|
230 char *encrypted_htmlbody;
|
50
|
231 size_t encrypted_htmlbody_size;
|
49
|
232 int32_t flag;
|
|
233 char *header;
|
|
234 char *htmlbody;
|
|
235 int32_t importance;
|
|
236 char *in_reply_to;
|
|
237 int message_cc_me; // 1 = true, 0 = false
|
|
238 int message_recip_me; // 1 = true, 0 = false
|
|
239 int message_to_me; // 1 = true, 0 = false
|
|
240 char *messageid;
|
|
241 int32_t orig_sensitivity;
|
|
242 char *outlook_recipient;
|
|
243 char *outlook_recipient2;
|
|
244 char *outlook_sender;
|
|
245 char *outlook_sender_name;
|
|
246 char *outlook_sender2;
|
|
247 int32_t priority;
|
|
248 char *proc_subject;
|
|
249 int read_receipt; // 1 = true, 0 = false
|
|
250 char *recip_access;
|
|
251 char *recip_address;
|
|
252 char *recip2_access;
|
|
253 char *recip2_address;
|
|
254 int reply_requested; // 1 = true, 0 = false
|
|
255 char *reply_to;
|
|
256 char *return_path_address;
|
|
257 int32_t rtf_body_char_count;
|
|
258 int32_t rtf_body_crc;
|
|
259 char *rtf_body_tag;
|
|
260 char *rtf_compressed;
|
|
261 uint32_t rtf_compressed_size;
|
|
262 int rtf_in_sync; // 1 = true, 0 = doesn't exist, -1 = false
|
|
263 int32_t rtf_ws_prefix_count;
|
|
264 int32_t rtf_ws_trailing_count;
|
|
265 char *sender_access;
|
|
266 char *sender_address;
|
|
267 char *sender2_access;
|
|
268 char *sender2_address;
|
|
269 int32_t sensitivity;
|
|
270 FILETIME *sent_date;
|
|
271 pst_entryid *sentmail_folder;
|
|
272 char *sentto_address;
|
|
273 pst_item_email_subject *subject;
|
16
|
274 } pst_item_email;
|
|
275
|
49
|
276
|
46
|
277 typedef struct pst_item_folder {
|
49
|
278 int32_t email_count;
|
|
279 int32_t unseen_email_count;
|
|
280 int32_t assoc_count;
|
|
281 int subfolder; // 1 = true, 0 = false
|
16
|
282 } pst_item_folder;
|
|
283
|
49
|
284
|
46
|
285 typedef struct pst_item_message_store {
|
51
|
286 pst_entryid *top_of_personal_folder; // 0x35e0
|
|
287 pst_entryid *default_outbox_folder; // 0x35e2
|
|
288 pst_entryid *deleted_items_folder; // 0x35e3
|
|
289 pst_entryid *sent_items_folder; // 0x35e4
|
|
290 pst_entryid *user_views_folder; // 0x35e5
|
|
291 pst_entryid *common_view_folder; // 0x35e6
|
|
292 pst_entryid *search_root_folder; // 0x35e7
|
|
293 pst_entryid *top_of_folder; // 0x7c07
|
|
294 int32_t valid_mask; // 0x35df // what folders the message store contains
|
|
295 int32_t pwd_chksum; // 0x76ff
|
16
|
296 } pst_item_message_store;
|
|
297
|
49
|
298
|
46
|
299 typedef struct pst_item_contact {
|
49
|
300 char *access_method;
|
|
301 char *account_name;
|
|
302 char *address1;
|
|
303 char *address1a;
|
|
304 char *address1_desc;
|
|
305 char *address1_transport;
|
|
306 char *address2;
|
|
307 char *address2a;
|
|
308 char *address2_desc;
|
|
309 char *address2_transport;
|
|
310 char *address3;
|
|
311 char *address3a;
|
|
312 char *address3_desc;
|
|
313 char *address3_transport;
|
|
314 char *assistant_name;
|
|
315 char *assistant_phone;
|
|
316 char *billing_information;
|
|
317 FILETIME *birthday;
|
51
|
318 char *business_address; // 0x801b
|
49
|
319 char *business_city;
|
|
320 char *business_country;
|
|
321 char *business_fax;
|
|
322 char *business_homepage;
|
|
323 char *business_phone;
|
|
324 char *business_phone2;
|
|
325 char *business_po_box;
|
|
326 char *business_postal_code;
|
|
327 char *business_state;
|
|
328 char *business_street;
|
|
329 char *callback_phone;
|
|
330 char *car_phone;
|
|
331 char *company_main_phone;
|
|
332 char *company_name;
|
|
333 char *computer_name;
|
|
334 char *customer_id;
|
|
335 char *def_postal_address;
|
|
336 char *department;
|
|
337 char *display_name_prefix;
|
|
338 char *first_name;
|
|
339 char *followup;
|
|
340 char *free_busy_address;
|
|
341 char *ftp_site;
|
|
342 char *fullname;
|
51
|
343 int16_t gender;
|
49
|
344 char *gov_id;
|
|
345 char *hobbies;
|
51
|
346 char *home_address; // 0x801a
|
49
|
347 char *home_city;
|
|
348 char *home_country;
|
|
349 char *home_fax;
|
|
350 char *home_phone;
|
|
351 char *home_phone2;
|
|
352 char *home_po_box;
|
|
353 char *home_postal_code;
|
|
354 char *home_state;
|
|
355 char *home_street;
|
|
356 char *initials;
|
|
357 char *isdn_phone;
|
|
358 char *job_title;
|
|
359 char *keyword;
|
|
360 char *language;
|
|
361 char *location;
|
51
|
362 int mail_permission; // 1 = true, 0 = false
|
49
|
363 char *manager_name;
|
|
364 char *middle_name;
|
|
365 char *mileage;
|
|
366 char *mobile_phone;
|
|
367 char *nickname;
|
|
368 char *office_loc;
|
|
369 char *org_id;
|
51
|
370 char *other_address; // 0x801c
|
49
|
371 char *other_city;
|
|
372 char *other_country;
|
|
373 char *other_phone;
|
|
374 char *other_po_box;
|
|
375 char *other_postal_code;
|
|
376 char *other_state;
|
|
377 char *other_street;
|
|
378 char *pager_phone;
|
|
379 char *personal_homepage;
|
|
380 char *pref_name;
|
|
381 char *primary_fax;
|
|
382 char *primary_phone;
|
|
383 char *profession;
|
|
384 char *radio_phone;
|
51
|
385 int rich_text; // 1 = true, 0 = false
|
49
|
386 char *spouse_name;
|
|
387 char *suffix;
|
|
388 char *surname;
|
|
389 char *telex;
|
|
390 char *transmittable_display_name;
|
|
391 char *ttytdd_phone;
|
|
392 FILETIME *wedding_anniversary;
|
51
|
393 char *work_address_street; // 0x8045
|
|
394 char *work_address_city; // 0x8046
|
|
395 char *work_address_state; // 0x8047
|
|
396 char *work_address_postalcode; // 0x8048
|
|
397 char *work_address_country; // 0x8049
|
|
398 char *work_address_postofficebox; // 0x804a
|
16
|
399 } pst_item_contact;
|
|
400
|
49
|
401
|
46
|
402 typedef struct pst_item_attach {
|
49
|
403 char *filename1;
|
|
404 char *filename2;
|
|
405 char *mimetype;
|
|
406 char *data;
|
|
407 size_t size;
|
|
408 uint64_t id2_val;
|
|
409 uint64_t id_val; // calculated from id2_val during creation of record
|
|
410 int32_t method;
|
|
411 int32_t position;
|
|
412 int32_t sequence;
|
|
413 struct pst_item_attach *next;
|
16
|
414 } pst_item_attach;
|
|
415
|
49
|
416
|
46
|
417 typedef struct pst_item_extra_field {
|
49
|
418 char *field_name;
|
|
419 char *value;
|
|
420 struct pst_item_extra_field *next;
|
16
|
421 } pst_item_extra_field;
|
|
422
|
49
|
423
|
46
|
424 typedef struct pst_item_journal {
|
49
|
425 FILETIME *end;
|
|
426 FILETIME *start;
|
|
427 char *type;
|
16
|
428 } pst_item_journal;
|
|
429
|
49
|
430
|
46
|
431 typedef struct pst_item_appointment {
|
49
|
432 FILETIME *end;
|
50
|
433 char *location;
|
|
434 int alarm; // 1 = true, 0 = false
|
49
|
435 FILETIME *reminder;
|
50
|
436 int32_t alarm_minutes;
|
|
437 char *alarm_filename;
|
49
|
438 FILETIME *start;
|
50
|
439 char *timezonestring;
|
|
440 int32_t showas;
|
|
441 int32_t label;
|
|
442 int all_day; // 1 = true, 0 = false
|
|
443 char *recurrence;
|
|
444 int32_t recurrence_type;
|
|
445 FILETIME *recurrence_start;
|
|
446 FILETIME *recurrence_end;
|
16
|
447 } pst_item_appointment;
|
|
448
|
49
|
449
|
46
|
450 typedef struct pst_item {
|
49
|
451 struct pst_item_email *email; // data reffering to email
|
|
452 struct pst_item_folder *folder; // data reffering to folder
|
|
453 struct pst_item_contact *contact; // data reffering to contact
|
|
454 struct pst_item_attach *attach; // linked list of attachments
|
|
455 struct pst_item_message_store *message_store; // data referring to the message store
|
|
456 struct pst_item_extra_field *extra_fields; // linked list of extra headers and such
|
|
457 struct pst_item_journal *journal; // data reffering to a journal entry
|
|
458 struct pst_item_appointment *appointment; // data reffering to a calendar entry
|
|
459 int type;
|
|
460 char *ascii_type;
|
|
461 char *file_as;
|
|
462 char *comment;
|
|
463 int32_t message_size;
|
|
464 char *outlook_version;
|
|
465 char *record_key; // probably 16 bytes long.
|
|
466 size_t record_key_size;
|
|
467 int response_requested; // 1 = true, 0 = false
|
|
468 FILETIME *create_date;
|
|
469 FILETIME *modify_date;
|
|
470 int private_member; // 1 = true, 0 = false
|
16
|
471 } pst_item;
|
|
472
|
49
|
473
|
46
|
474 typedef struct pst_x_attrib_ll {
|
49
|
475 uint32_t type;
|
|
476 uint32_t mytype;
|
|
477 uint32_t map;
|
|
478 void *data;
|
|
479 struct pst_x_attrib_ll *next;
|
16
|
480 } pst_x_attrib_ll;
|
|
481
|
49
|
482
|
52
|
483 typedef struct pst_block_recorder {
|
|
484 struct pst_block_recorder *next;
|
|
485 off_t offset;
|
|
486 size_t size;
|
|
487 int readcount;
|
|
488 } pst_block_recorder;
|
|
489
|
|
490
|
46
|
491 typedef struct pst_file {
|
49
|
492 pst_index_ll *i_head, *i_tail;
|
52
|
493 pst_desc_ll *d_head, *d_tail;
|
49
|
494 pst_x_attrib_ll *x_head;
|
52
|
495 pst_block_recorder *block_head;
|
46
|
496
|
49
|
497 //set this to 0 to read 32-bit pst files (pre Outlook 2003)
|
|
498 //set this to 1 to read 64-bit pst files (Outlook 2003 and later)
|
|
499 int do_read64;
|
46
|
500
|
49
|
501 uint64_t index1;
|
|
502 uint64_t index1_back;
|
|
503 uint64_t index2;
|
|
504 uint64_t index2_back;
|
|
505 FILE * fp; // file pointer to opened PST file
|
|
506 uint64_t size; // pst file size
|
|
507 unsigned char encryption; // pst encryption setting
|
|
508 unsigned char ind_type; // pst index type
|
16
|
509 } pst_file;
|
|
510
|
49
|
511
|
46
|
512 typedef struct pst_block_offset {
|
49
|
513 int16_t from;
|
|
514 int16_t to;
|
16
|
515 } pst_block_offset;
|
|
516
|
49
|
517
|
46
|
518 typedef struct pst_block_offset_pointer {
|
52
|
519 char *from;
|
|
520 char *to;
|
|
521 int needfree;
|
35
|
522 } pst_block_offset_pointer;
|
|
523
|
49
|
524
|
|
525 typedef struct pst_num_item {
|
52
|
526 uint32_t id; // not an id1 or id2, this is actually some sort of type code
|
|
527 char *data;
|
|
528 uint32_t type;
|
|
529 size_t size;
|
|
530 char *extra;
|
49
|
531 } pst_num_item;
|
|
532
|
16
|
533
|
46
|
534 typedef struct pst_num_array {
|
49
|
535 int32_t count_item;
|
|
536 int32_t orig_count;
|
|
537 int32_t count_array;
|
|
538 struct pst_num_item ** items;
|
|
539 struct pst_num_array *next;
|
16
|
540 } pst_num_array;
|
|
541
|
49
|
542
|
|
543 typedef struct pst_holder {
|
52
|
544 char **buf;
|
49
|
545 FILE * fp;
|
|
546 int base64;
|
|
547 char base64_extra_chars[3];
|
|
548 uint32_t base64_extra;
|
|
549 } pst_holder;
|
|
550
|
|
551
|
|
552 typedef struct pst_subblock {
|
52
|
553 char *buf;
|
|
554 size_t read_size;
|
|
555 size_t i_offset;
|
49
|
556 } pst_subblock;
|
|
557
|
|
558
|
|
559 typedef struct pst_subblocks {
|
|
560 size_t subblock_count;
|
|
561 pst_subblock *subs;
|
|
562 } pst_subblocks;
|
|
563
|
16
|
564
|
|
565 // prototypes
|
46
|
566 int pst_open(pst_file *pf, char *name, char *mode);
|
|
567 int pst_close(pst_file *pf);
|
|
568 pst_desc_ll * pst_getTopOfFolders(pst_file *pf, pst_item *root);
|
52
|
569 size_t pst_attach_to_mem(pst_file *pf, pst_item_attach *attach, char **b);
|
46
|
570 size_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp);
|
|
571 size_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp);
|
|
572 int pst_load_index (pst_file *pf);
|
|
573 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
|
|
574 int pst_load_extended_attributes(pst_file *pf);
|
16
|
575
|
46
|
576 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
|
577 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
|
578 pst_item* pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
|
|
579 pst_item* pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
|
48
|
580 pst_num_array* pst_parse_block(pst_file *pf, uint64_t block_id, pst_index2_ll *i2_head, pst_num_array *na_head);
|
46
|
581 int pst_process(pst_num_array *list, pst_item *item, pst_item_attach *attach);
|
|
582 void pst_free_list(pst_num_array *list);
|
|
583 void pst_freeItem(pst_item *item);
|
|
584 void pst_free_id2(pst_index2_ll * head);
|
|
585 void pst_free_id (pst_index_ll *head);
|
|
586 void pst_free_desc (pst_desc_ll *head);
|
|
587 void pst_free_xattrib(pst_x_attrib_ll *x);
|
49
|
588 int pst_getBlockOffsetPointer(pst_file *pf, pst_index2_ll *i2_head, pst_subblocks *subblocks, uint32_t offset, pst_block_offset_pointer *p);
|
52
|
589 int pst_getBlockOffset(char *buf, size_t read_size, uint32_t i_offset, uint32_t offset, pst_block_offset *p);
|
46
|
590 pst_index2_ll* pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
|
|
591 pst_index_ll* pst_getID(pst_file* pf, uint64_t id);
|
|
592 pst_index_ll* pst_getID2(pst_index2_ll * ptr, uint64_t id);
|
|
593 pst_desc_ll* pst_getDptr(pst_file *pf, uint64_t id);
|
51
|
594 size_t pst_read_block_size(pst_file *pf, off_t offset, size_t size, char **buf);
|
46
|
595 int pst_decrypt(unsigned char *buf, size_t size, unsigned char type);
|
|
596 uint64_t pst_getIntAt(pst_file *pf, char *buf);
|
|
597 uint64_t pst_getIntAtPos(pst_file *pf, off_t pos);
|
52
|
598 size_t pst_getAtPos(pst_file *pf, off_t pos, void* buf, size_t size);
|
|
599 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t id, char **b);
|
|
600 size_t pst_ff_getIDblock(pst_file *pf, uint64_t id, char** b);
|
|
601 size_t pst_ff_getID2block(pst_file *pf, uint64_t id2, pst_index2_ll *id2_head, char** buf);
|
49
|
602 size_t pst_ff_getID2data(pst_file *pf, pst_index_ll *ptr, pst_holder *h);
|
|
603 size_t pst_ff_compile_ID(pst_file *pf, uint64_t id, pst_holder *h, size_t size);
|
16
|
604
|
46
|
605 int pst_strincmp(char *a, char *b, size_t x);
|
|
606 int pst_stricmp(char *a, char *b);
|
|
607 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream);
|
47
|
608 char * pst_wide_to_single(char *wt, size_t size);
|
43
|
609
|
46
|
610 char * pst_rfc2426_escape(char *str);
|
|
611 int pst_chr_count(char *str, char x);
|
|
612 char * pst_rfc2425_datetime_format(FILETIME *ft);
|
|
613 char * pst_rfc2445_datetime_format(FILETIME *ft);
|
43
|
614
|
51
|
615 void pst_printDptr(pst_file *pf, pst_desc_ll *ptr);
|
|
616 void pst_printIDptr(pst_file* pf);
|
|
617 void pst_printID2ptr(pst_index2_ll *ptr);
|
16
|
618
|
|
619 #endif // defined LIBPST_H
|