comparison src/libpst.h @ 79:56fa05fd5271

Patch from Robert Simpson for encryption type 2. Fix the order of testing item types to avoid claiming there are multiple message stores.
author Carl Byington <carl@five-ten-sg.com>
date Fri, 13 Jun 2008 20:47:01 -0700
parents 987aa872294e
children 3ec5ad97e926
comparison
equal deleted inserted replaced
78:535075b4d261 79:56fa05fd5271
55 #else 55 #else
56 # error "Byte order not supported by this library" 56 # error "Byte order not supported by this library"
57 #endif // BYTE_ORDER 57 #endif // BYTE_ORDER
58 58
59 59
60 #define PST_TYPE_NOTE 1 60 #define PST_TYPE_NOTE 1
61 #define PST_TYPE_APPOINTMENT 8 61 #define PST_TYPE_APPOINTMENT 8
62 #define PST_TYPE_CONTACT 9 62 #define PST_TYPE_CONTACT 9
63 #define PST_TYPE_JOURNAL 10 63 #define PST_TYPE_JOURNAL 10
64 #define PST_TYPE_STICKYNOTE 11 64 #define PST_TYPE_STICKYNOTE 11
65 #define PST_TYPE_TASK 12 65 #define PST_TYPE_TASK 12
66 #define PST_TYPE_OTHER 13 66 #define PST_TYPE_OTHER 13
67 #define PST_TYPE_REPORT 14 67 #define PST_TYPE_REPORT 14
68 68
69 // defines whether decryption is done on this bit of data 69 // defines whether decryption is done on this bit of data
70 #define PST_NO_ENC 0 70 #define PST_NO_ENC 0
71 #define PST_ENC 1 71 #define PST_ENC 1
72 72
73 // defines types of possible encryption 73 // defines types of possible encryption
74 #define PST_NO_ENCRYPT 0 74 #define PST_NO_ENCRYPT 0
75 #define PST_COMP_ENCRYPT 1 75 #define PST_COMP_ENCRYPT 1
76 #define PST_ENCRYPT 2 76 #define PST_ENCRYPT 2
77 77
78 // defines different types of mappings 78 // defines different types of mappings
79 #define PST_MAP_ATTRIB (uint32_t)1 79 #define PST_MAP_ATTRIB (uint32_t)1
80 #define PST_MAP_HEADER (uint32_t)2 80 #define PST_MAP_HEADER (uint32_t)2
81 81
585 pst_index2_ll* pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr); 585 pst_index2_ll* pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
586 pst_index_ll* pst_getID(pst_file* pf, uint64_t id); 586 pst_index_ll* pst_getID(pst_file* pf, uint64_t id);
587 pst_index_ll* pst_getID2(pst_index2_ll * ptr, uint64_t id); 587 pst_index_ll* pst_getID2(pst_index2_ll * ptr, uint64_t id);
588 pst_desc_ll* pst_getDptr(pst_file *pf, uint64_t id); 588 pst_desc_ll* pst_getDptr(pst_file *pf, uint64_t id);
589 size_t pst_read_block_size(pst_file *pf, off_t offset, size_t size, char **buf); 589 size_t pst_read_block_size(pst_file *pf, off_t offset, size_t size, char **buf);
590 int pst_decrypt(char *buf, size_t size, unsigned char type); 590 int pst_decrypt(uint64_t id, char *buf, size_t size, unsigned char type);
591 uint64_t pst_getIntAt(pst_file *pf, char *buf); 591 uint64_t pst_getIntAt(pst_file *pf, char *buf);
592 uint64_t pst_getIntAtPos(pst_file *pf, off_t pos); 592 uint64_t pst_getIntAtPos(pst_file *pf, off_t pos);
593 size_t pst_getAtPos(pst_file *pf, off_t pos, void* buf, size_t size); 593 size_t pst_getAtPos(pst_file *pf, off_t pos, void* buf, size_t size);
594 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t id, char **b); 594 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t id, char **b);
595 size_t pst_ff_getIDblock(pst_file *pf, uint64_t id, char** b); 595 size_t pst_ff_getIDblock(pst_file *pf, uint64_t id, char** b);