comparison libpst.h @ 8:2b58cf15aaf7

pst is case sensitive, ldap is not
author carl
date Thu, 23 Dec 2004 15:49:19 -0800
parents 6b1b602514db
children a818f3c2e589
comparison
equal deleted inserted replaced
7:3e3d8b576630 8:2b58cf15aaf7
27 # define INT32_MAX INT_MAX 27 # define INT32_MAX INT_MAX
28 #endif 28 #endif
29 29
30 // According to Jan Wolter, sys/param.h is the most portable source of endian 30 // According to Jan Wolter, sys/param.h is the most portable source of endian
31 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html 31 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
32 #include <sys/param.h> 32 #ifdef _MSC_VER
33 #define BYTE_ORDER LITTLE_ENDIAN
34 #else
35 #include <sys/param.h>
36 #endif // defined _MSC_VER
33 37
34 #if BYTE_ORDER == BIG_ENDIAN 38 #if BYTE_ORDER == BIG_ENDIAN
35 # define LE64_CPU(x) \ 39 # define LE64_CPU(x) \
36 x = ((((x) & 0xff00000000000000) >> 56) | \ 40 x = ((((x) & 0xff00000000000000) >> 56) | \
37 (((x) & 0x00ff000000000000) >> 40) | \ 41 (((x) & 0x00ff000000000000) >> 40) | \
65 #define int16_t short int 69 #define int16_t short int
66 #define u_int16_t unsigned short int 70 #define u_int16_t unsigned short int
67 #endif // _MSC_VER 71 #endif // _MSC_VER
68 72
69 73
70 #define PST_VERSION "0.5" 74 #define PST_VERSION "0.5.1"
71 75
72 #define PST_TYPE_NOTE 1 76 #define PST_TYPE_NOTE 1
73 #define PST_TYPE_APPOINTMENT 8 77 #define PST_TYPE_APPOINTMENT 8
74 #define PST_TYPE_CONTACT 9 78 #define PST_TYPE_CONTACT 9
75 #define PST_TYPE_JOURNAL 10 79 #define PST_TYPE_JOURNAL 10
235 int32_t email_count; 239 int32_t email_count;
236 int32_t unseen_email_count; 240 int32_t unseen_email_count;
237 int32_t assoc_count; 241 int32_t assoc_count;
238 char subfolder; 242 char subfolder;
239 } pst_item_folder; 243 } pst_item_folder;
240 244
241 typedef struct _pst_item_message_store { 245 typedef struct _pst_item_message_store {
242 pst_entryid *deleted_items_folder; 246 pst_entryid *deleted_items_folder;
243 pst_entryid *search_root_folder; 247 pst_entryid *search_root_folder;
244 pst_entryid *top_of_personal_folder; 248 pst_entryid *top_of_personal_folder;
245 pst_entryid *top_of_folder; 249 pst_entryid *top_of_folder;
246 int32_t valid_mask; // what folders the message store contains 250 int32_t valid_mask; // what folders the message store contains
247 int32_t pwd_chksum; 251 int32_t pwd_chksum;
248 } pst_item_message_store; 252 } pst_item_message_store;
249 253
250 typedef struct _pst_item_contact { 254 typedef struct _pst_item_contact {
251 char *access_method; 255 char *access_method;
252 char *account_name; 256 char *account_name;
253 char *address1; 257 char *address1;
254 char *address1_desc; 258 char *address1_desc;
395 char *record_key; // probably 16 bytes long. 399 char *record_key; // probably 16 bytes long.
396 size_t record_key_size; 400 size_t record_key_size;
397 int32_t response_requested; 401 int32_t response_requested;
398 FILETIME *create_date; 402 FILETIME *create_date;
399 FILETIME *modify_date; 403 FILETIME *modify_date;
400 int32_t private; 404 int32_t private_member;
401 } pst_item; 405 } pst_item;
402 406
403 typedef struct _pst_x_attrib_ll { 407 typedef struct _pst_x_attrib_ll {
404 int32_t type; 408 int32_t type;
405 int32_t mytype; 409 int32_t mytype;
465 int32_t pst_load_index (pst_file *pf); 469 int32_t pst_load_index (pst_file *pf);
466 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d); 470 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
467 int32_t pst_load_extended_attributes(pst_file *pf); 471 int32_t pst_load_extended_attributes(pst_file *pf);
468 472
469 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t start_val, int32_t end_val); 473 int32_t _pst_build_id_ptr(pst_file *pf, int32_t offset, int32_t depth, int32_t start_val, int32_t end_val);
470 int32_t _pst_build_desc_ptr (pst_file *pf, int32_t offset, int32_t depth, int32_t *high_id, 474 int32_t _pst_build_desc_ptr (pst_file *pf, int32_t offset, int32_t depth, int32_t *high_id,
471 int32_t start_id, int32_t end_val); 475 int32_t start_id, int32_t end_val);
472 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr); 476 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
473 void * _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr); 477 void * _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
474 pst_num_array * _pst_parse_block(pst_file *pf, u_int32_t block_id, pst_index2_ll *i2_head); 478 pst_num_array * _pst_parse_block(pst_file *pf, u_int32_t block_id, pst_index2_ll *i2_head);
475 int32_t _pst_process(pst_num_array *list, pst_item *item); 479 int32_t _pst_process(pst_num_array *list, pst_item *item);
497 501
498 int32_t pst_strincmp(char *a, char *b, int32_t x); 502 int32_t pst_strincmp(char *a, char *b, int32_t x);
499 int32_t pst_stricmp(char *a, char *b); 503 int32_t pst_stricmp(char *a, char *b);
500 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream); 504 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream);
501 char * _pst_wide_to_single(char *wt, int32_t size); 505 char * _pst_wide_to_single(char *wt, int32_t size);
502 // DEBUG functions 506 // DEBUG functions
503 int32_t _pst_printDptr(pst_file *pf); 507 int32_t _pst_printDptr(pst_file *pf);
504 int32_t _pst_printIDptr(pst_file* pf); 508 int32_t _pst_printIDptr(pst_file* pf);
505 int32_t _pst_printID2ptr(pst_index2_ll *ptr); 509 int32_t _pst_printID2ptr(pst_index2_ll *ptr);
506 void * xmalloc(size_t size); 510 void * xmalloc(size_t size);
507 #endif 511
512 #endif // defined LIBPST_H