'LibPst'
|
Go to the source code of this file.
Data Structures | |
struct | pst_block_offset |
struct | pst_block_offset_pointer |
struct | pst_holder |
struct | pst_subblock |
struct | pst_subblocks |
struct | pst_mapi_element |
struct | pst_mapi_object |
struct | pst_desc32 |
struct | pst_index32 |
struct | pst_table_ptr_struct32 |
struct | pst_desc |
struct | pst_index64 |
struct | pst_index |
struct | pst_table_ptr_struct |
struct | pst_block_header |
struct | pst_id2_assoc32 |
struct | pst_id2_assoc |
struct | pst_table3_rec32 |
struct | pst_table3_rec |
struct | pst_block_hdr |
struct | pst_x_attrib |
Macros | |
#define | ASSERT(x) { if(!(x)) raise( SIGSEGV ); } |
#define | INDEX_TYPE32 0x0E |
#define | INDEX_TYPE32A 0x0F |
#define | INDEX_TYPE64 0x17 |
#define | INDEX_TYPE64A 0x15 |
#define | INDEX_TYPE4K 0x24 |
#define | INDEX_TYPE_OFFSET (int64_t)0x0A |
#define | FILE_SIZE_POINTER32 (int64_t)0xA8 |
#define | INDEX_POINTER32 (int64_t)0xC4 |
#define | INDEX_BACK32 (int64_t)0xC0 |
#define | SECOND_POINTER32 (int64_t)0xBC |
#define | SECOND_BACK32 (int64_t)0xB8 |
#define | ENC_TYPE32 (int64_t)0x1CD |
#define | FILE_SIZE_POINTER64 (int64_t)0xB8 |
#define | INDEX_POINTER64 (int64_t)0xF0 |
#define | INDEX_BACK64 (int64_t)0xE8 |
#define | SECOND_POINTER64 (int64_t)0xE0 |
#define | SECOND_BACK64 (int64_t)0xD8 |
#define | ENC_TYPE64 (int64_t)0x201 |
#define | FILE_SIZE_POINTER ((pf->do_read64) ? FILE_SIZE_POINTER64 : FILE_SIZE_POINTER32) |
#define | INDEX_POINTER ((pf->do_read64) ? INDEX_POINTER64 : INDEX_POINTER32) |
#define | INDEX_BACK ((pf->do_read64) ? INDEX_BACK64 : INDEX_BACK32) |
#define | SECOND_POINTER ((pf->do_read64) ? SECOND_POINTER64 : SECOND_POINTER32) |
#define | SECOND_BACK ((pf->do_read64) ? SECOND_BACK64 : SECOND_BACK32) |
#define | ENC_TYPE ((pf->do_read64) ? ENC_TYPE64 : ENC_TYPE32) |
#define | PST_SIGNATURE 0x4E444221 |
#define | ITEM_COUNT_OFFSET32 0x1f0 |
#define | MAX_COUNT_OFFSET32 0x1f1 |
#define | ENTRY_SIZE_OFFSET32 0x1f2 |
#define | LEVEL_INDICATOR_OFFSET32 0x1f3 |
#define | BACKLINK_OFFSET32 0x1f8 |
#define | ITEM_COUNT_OFFSET64 0x1e8 |
#define | MAX_COUNT_OFFSET64 0x1e9 |
#define | ENTRY_SIZE_OFFSET64 0x1ea |
#define | LEVEL_INDICATOR_OFFSET64 0x1eb |
#define | BACKLINK_OFFSET64 0x1f8 |
#define | ITEM_COUNT_OFFSET4K 0xfd8 |
#define | MAX_COUNT_OFFSET4K 0xfda |
#define | ENTRY_SIZE_OFFSET4K 0xfdc |
#define | LEVEL_INDICATOR_OFFSET4K 0xfdd |
#define | BACKLINK_OFFSET4K 0xff0 |
#define | BLOCK_SIZE (size_t)((pf->do_read64 == 2) ? 4096 : 512) |
#define | DESC_BLOCK_SIZE (size_t)((pf->do_read64 == 2) ? 4096 : 512) |
#define | ITEM_COUNT_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? ITEM_COUNT_OFFSET4K : ITEM_COUNT_OFFSET64) : ITEM_COUNT_OFFSET32) |
#define | LEVEL_INDICATOR_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? LEVEL_INDICATOR_OFFSET4K : LEVEL_INDICATOR_OFFSET64) : LEVEL_INDICATOR_OFFSET32) |
#define | BACKLINK_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? BACKLINK_OFFSET4K : BACKLINK_OFFSET64) : BACKLINK_OFFSET32) |
#define | ENTRY_SIZE_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? ENTRY_SIZE_OFFSET4K : ENTRY_SIZE_OFFSET64) : ENTRY_SIZE_OFFSET32) |
#define | MAX_COUNT_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? MAX_COUNT_OFFSET4K : MAX_COUNT_OFFSET64) : MAX_COUNT_OFFSET32) |
#define | read_twobyte(BUF, OFF) (int32_t) ((((unsigned)BUF[OFF + 1] & 0xFF)) << 8) | ((unsigned)BUF[OFF] & 0xFF); |
#define | SAFE_FREE(x) {if (x) free(x);} |
#define | SAFE_FREE_STR(x) SAFE_FREE(x.str) |
#define | SAFE_FREE_BIN(x) SAFE_FREE(x.data) |
#define | MALLOC_EMAIL(x) { if (!x->email) { x->email = (pst_item_email*) pst_malloc(sizeof(pst_item_email)); memset(x->email, 0, sizeof(pst_item_email) );} } |
#define | MALLOC_FOLDER(x) { if (!x->folder) { x->folder = (pst_item_folder*) pst_malloc(sizeof(pst_item_folder)); memset(x->folder, 0, sizeof(pst_item_folder) );} } |
#define | MALLOC_CONTACT(x) { if (!x->contact) { x->contact = (pst_item_contact*) pst_malloc(sizeof(pst_item_contact)); memset(x->contact, 0, sizeof(pst_item_contact) );} } |
#define | MALLOC_MESSAGESTORE(x) { if (!x->message_store) { x->message_store = (pst_item_message_store*) pst_malloc(sizeof(pst_item_message_store)); memset(x->message_store, 0, sizeof(pst_item_message_store));} } |
#define | MALLOC_JOURNAL(x) { if (!x->journal) { x->journal = (pst_item_journal*) pst_malloc(sizeof(pst_item_journal)); memset(x->journal, 0, sizeof(pst_item_journal) );} } |
#define | MALLOC_APPOINTMENT(x) { if (!x->appointment) { x->appointment = (pst_item_appointment*) pst_malloc(sizeof(pst_item_appointment)); memset(x->appointment, 0, sizeof(pst_item_appointment) );} } |
#define | LIST_COPY(targ, type) |
#define | LIST_COPY_CSTR(targ) |
#define | LIST_COPY_BOOL(label, targ) |
#define | LIST_COPY_EMAIL_BOOL(label, targ) |
#define | LIST_COPY_CONTACT_BOOL(label, targ) |
#define | LIST_COPY_APPT_BOOL(label, targ) |
#define | LIST_COPY_INT16_N(targ) |
#define | LIST_COPY_INT16(label, targ) |
#define | LIST_COPY_INT32_N(targ) |
#define | LIST_COPY_INT32(label, targ) |
#define | LIST_COPY_EMAIL_INT32(label, targ) |
#define | LIST_COPY_APPT_INT32(label, targ) |
#define | LIST_COPY_FOLDER_INT32(label, targ) |
#define | LIST_COPY_STORE_INT32(label, targ) |
#define | LIST_COPY_ENUM(label, targ, delta, count, ...) |
#define | LIST_COPY_EMAIL_ENUM(label, targ, delta, count, ...) |
#define | LIST_COPY_APPT_ENUM(label, targ, delta, count, ...) |
#define | LIST_COPY_ENUM16(label, targ, delta, count, ...) |
#define | LIST_COPY_CONTACT_ENUM16(label, targ, delta, count, ...) |
#define | LIST_COPY_ENTRYID(label, targ) |
#define | LIST_COPY_EMAIL_ENTRYID(label, targ) |
#define | LIST_COPY_STORE_ENTRYID(label, targ) |
#define | LIST_COPY_STR(label, targ) |
#define | LIST_COPY_EMAIL_STR(label, targ) |
#define | LIST_COPY_CONTACT_STR(label, targ) |
#define | LIST_COPY_APPT_STR(label, targ) |
#define | LIST_COPY_JOURNAL_STR(label, targ) |
#define | LIST_COPY_TIME(label, targ) |
#define | LIST_COPY_EMAIL_TIME(label, targ) |
#define | LIST_COPY_CONTACT_TIME(label, targ) |
#define | LIST_COPY_APPT_TIME(label, targ) |
#define | LIST_COPY_JOURNAL_TIME(label, targ) |
#define | LIST_COPY_BIN(targ) |
#define | LIST_COPY_EMAIL_BIN(label, targ) |
#define | LIST_COPY_APPT_BIN(label, targ) |
#define | NULL_CHECK(x) { if (!x) { DEBUG_WARN(("NULL_CHECK: Null Found\n")); break;} } |
Typedefs | |
typedef struct pst_block_offset | pst_block_offset |
typedef struct pst_block_offset_pointer | pst_block_offset_pointer |
typedef struct pst_holder | pst_holder |
typedef struct pst_subblock | pst_subblock |
typedef struct pst_subblocks | pst_subblocks |
typedef struct pst_mapi_element | pst_mapi_element |
typedef struct pst_mapi_object | pst_mapi_object |
typedef struct pst_desc32 | pst_desc32 |
typedef struct pst_index32 | pst_index32 |
typedef struct pst_desc | pst_desc |
typedef struct pst_index64 | pst_index64 |
typedef struct pst_index | pst_index |
typedef struct pst_block_header | pst_block_header |
typedef struct pst_id2_assoc32 | pst_id2_assoc32 |
typedef struct pst_id2_assoc | pst_id2_assoc |
typedef struct pst_table3_rec32 | pst_table3_rec32 |
typedef struct pst_table3_rec | pst_table3_rec |
typedef struct pst_block_hdr | pst_block_hdr |
typedef struct pst_x_attrib | pst_x_attrib |
Functions | |
static size_t | pst_append_holder (pst_holder *h, size_t size, char **buf, size_t z) |
append (buf,z) data to the output destination (h,size) More... | |
static 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) |
Process the index2 b-tree from the pst file and create the pf->d_head tree from it. More... | |
static pst_id2_tree * | pst_build_id2 (pst_file *pf, pst_index_ll *list) |
static 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) |
Process the index1 b-tree from the pst file and create the pf->i_head linked list from it. More... | |
static int | pst_chr_count (char *str, char x) |
static size_t | pst_ff_compile_ID (pst_file *pf, uint64_t i_id, pst_holder *h, size_t size) |
find the actual data from an indirection i_id and send it to the destination specified by the pst_holder. More... | |
static size_t | pst_ff_getIDblock (pst_file *pf, uint64_t i_id, char **buf) |
Read a block of data from file into memory. More... | |
static size_t | pst_ff_getID2block (pst_file *pf, uint64_t id2, pst_id2_tree *id2_head, char **buf) |
static size_t | pst_ff_getID2data (pst_file *pf, pst_index_ll *ptr, pst_holder *h) |
find the actual data from an i_id and send it to the destination specified by the pst_holder h. More... | |
static size_t | pst_finish_cleanup_holder (pst_holder *h, size_t size) |
finish cleanup for base64 encoding to a file with extra bytes left over More... | |
static void | pst_free_attach (pst_item_attach *attach) |
static void | pst_free_desc (pst_desc_tree *head) |
static void | pst_free_id2 (pst_id2_tree *head) |
static void | pst_free_list (pst_mapi_object *list) |
static void | pst_free_xattrib (pst_x_attrib_ll *x) |
static size_t | pst_getAtPos (pst_file *pf, int64_t pos, void *buf, size_t size) |
Read part of the pst file. More... | |
static int | pst_getBlockOffsetPointer (pst_file *pf, pst_id2_tree *i2_head, pst_subblocks *subblocks, uint32_t offset, pst_block_offset_pointer *p) |
The offset might be zero, in which case we have no data, so return a pair of null pointers. More... | |
static int | pst_getBlockOffset (char *buf, size_t read_size, uint32_t i_offset, uint32_t offset, pst_block_offset *p) |
static pst_id2_tree * | pst_getID2 (pst_id2_tree *ptr, uint64_t id) |
static pst_desc_tree * | pst_getDptr (pst_file *pf, uint64_t d_id) |
find the id in the descriptor tree rooted at pf->d_head More... | |
static uint64_t | pst_getIntAt (pst_file *pf, char *buf) |
static uint64_t | pst_getIntAtPos (pst_file *pf, int64_t pos) |
static pst_mapi_object * | pst_parse_block (pst_file *pf, uint64_t block_id, pst_id2_tree *i2_head) |
Process a low level descriptor block (0x0101, 0xbcec, 0x7cec) into a list of MAPI objects, each of which contains a list of MAPI elements. More... | |
static void | pst_printDptr (pst_file *pf, pst_desc_tree *ptr) |
static void | pst_printID2ptr (pst_id2_tree *ptr) |
static int | pst_process (uint64_t block_id, pst_mapi_object *list, pst_item *item, pst_item_attach *attach) |
process the list of MAPI objects produced from parse_block() More... | |
static size_t | pst_read_block_size (pst_file *pf, int64_t offset, size_t size, size_t inflated_size, char **buf) |
static size_t | pst_read_raw_block_size (pst_file *pf, int64_t offset, size_t size, char **buf) |
Read a block of data from file into memory. More... | |
static int | pst_decrypt (uint64_t i_id, char *buf, size_t size, unsigned char type) |
Decrypt a block of data from the pst file. More... | |
static int | pst_strincmp (char *a, char *b, size_t x) |
static char * | pst_wide_to_single (char *wt, size_t size) |
static char * | pst_getcwd (void) |
int | pst_open (pst_file *pf, const char *name, const char *charset) |
Open a pst file. More... | |
int | pst_reopen (pst_file *pf) |
Reopen the pst file after a fork. More... | |
int | pst_close (pst_file *pf) |
Close a pst file. More... | |
static void | add_descriptor_to_list (pst_desc_tree *node, pst_desc_tree **head, pst_desc_tree **tail) |
add a pst descriptor node to a linked list of such nodes. More... | |
static void | record_descriptor (pst_file *pf, pst_desc_tree *node) |
add a pst descriptor node into the global tree. More... | |
static pst_id2_tree * | deep_copy (pst_id2_tree *head) |
make a deep copy of part of the id2 mapping tree, for use by an attachment containing an embedded rfc822 message. More... | |
pst_desc_tree * | pst_getTopOfFolders (pst_file *pf, const pst_item *root) |
Get the top of folders descriptor tree. More... | |
pst_binary | pst_attach_to_mem (pst_file *pf, pst_item_attach *attach) |
Assemble the binary attachment into a single buffer. More... | |
size_t | pst_attach_to_file (pst_file *pf, pst_item_attach *attach, FILE *fp) |
Write a binary attachment to a file. More... | |
size_t | pst_attach_to_file_base64 (pst_file *pf, pst_item_attach *attach, FILE *fp) |
Write a binary attachment base64 encoded to a file. More... | |
int | pst_load_index (pst_file *pf) |
Load the index entries from the pst file. More... | |
pst_desc_tree * | pst_getNextDptr (pst_desc_tree *d) |
Walk the descriptor tree. More... | |
int | pst_load_extended_attributes (pst_file *pf) |
Try to load the extended attributes from the pst file. More... | |
static size_t | pst_decode_desc (pst_file *pf, pst_desc *desc, char *buf) |
static size_t | pst_decode_table (pst_file *pf, struct pst_table_ptr_struct *table, char *buf) |
static size_t | pst_decode_index (pst_file *pf, pst_index *index, char *buf) |
static size_t | pst_decode_assoc (pst_file *pf, pst_id2_assoc *assoc, char *buf) |
static size_t | pst_decode_type3 (pst_file *pf, pst_table3_rec *table3_rec, char *buf) |
pst_item * | pst_parse_item (pst_file *pf, pst_desc_tree *d_ptr, pst_id2_tree *m_head) |
Process a high level object from the pst file. More... | |
static void | freeall (pst_subblocks *subs, pst_block_offset_pointer *p1, pst_block_offset_pointer *p2, pst_block_offset_pointer *p3, pst_block_offset_pointer *p4, pst_block_offset_pointer *p5, pst_block_offset_pointer *p6, pst_block_offset_pointer *p7) |
void | pst_freeItem (pst_item *item) |
Free the item returned by pst_parse_item(). More... | |
static int | pst_getID_compare (const void *key, const void *entry) |
pst_index_ll * | pst_getID (pst_file *pf, uint64_t i_id) |
Lookup the i_id in the index linked list, and return a pointer to the element. More... | |
size_t | pst_ff_getIDblock_dec (pst_file *pf, uint64_t i_id, char **buf) |
Get an ID block from file using pst_ff_getIDblock() and decrypt if necessary. More... | |
int | pst_stricmp (char *a, char *b) |
compare strings case-insensitive. More... | |
size_t | pst_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
fwrite with checking for null pointer. More... | |
char * | pst_rfc2426_escape (char *str, char **buf, size_t *buflen) |
Add any necessary escape characters for rfc2426 vcard format. More... | |
char * | pst_rfc2425_datetime_format (const FILETIME *ft, int buflen, char *result) |
Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z which is the same as one of the forms in the ISO3601 standard. More... | |
char * | pst_rfc2445_datetime_format (const FILETIME *ft, int buflen, char *result) |
Convert a FILETIME into rfc2445 date/time format 19531015T231000Z. More... | |
char * | pst_rfc2445_datetime_format_now (int buflen, char *result) |
Convert the current time rfc2445 date/time format 19531015T231000Z. More... | |
static const char * | codepage (int cp, int buflen, char *result) |
Convert a code page integer into a string suitable for iconv() More... | |
const char * | pst_default_charset (pst_item *item, int buflen, char *result) |
Get the default character set for this item. More... | |
void | pst_rfc2231 (pst_string *str) |
Convert str to rfc2231 encoding of str. More... | |
void | pst_rfc2047 (pst_item *item, pst_string *str, int needs_quote) |
Convert str to rfc2047 encoding of str, possibly enclosed in quotes if it contains spaces. More... | |
void | pst_convert_utf8_null (pst_item *item, pst_string *str) |
Convert str to utf8 if possible; null strings are preserved. More... | |
void | pst_convert_utf8 (pst_item *item, pst_string *str) |
Convert str to utf8 if possible; null strings are converted into empty strings. More... | |
pst_recurrence * | pst_convert_recurrence (pst_item_appointment *appt) |
Decode raw recurrence data into a better structure. More... | |
void | pst_free_recurrence (pst_recurrence *r) |
Free a recurrence structure. More... | |
Variables | |
static unsigned char | comp_enc [] |
for "compressible" encryption, just a simple substitution cipher, plaintext = comp_enc[ciphertext]; for "strong" encryption, this is the first rotor of an Enigma 3 rotor cipher. More... | |
static unsigned char | comp_high1 [] |
for "strong" encryption, this is the second rotor of an Enigma 3 rotor cipher. More... | |
static unsigned char | comp_high2 [] |
for "strong" encryption, this is the third rotor of an Enigma 3 rotor cipher. More... | |
#define BACKLINK_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? BACKLINK_OFFSET4K : BACKLINK_OFFSET64) : BACKLINK_OFFSET32) |
Definition at line 851 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define BLOCK_SIZE (size_t)((pf->do_read64 == 2) ? 4096 : 512) |
Definition at line 847 of file libpst.c.
Referenced by pst_build_id_ptr().
#define DESC_BLOCK_SIZE (size_t)((pf->do_read64 == 2) ? 4096 : 512) |
Definition at line 848 of file libpst.c.
Referenced by pst_build_desc_ptr().
#define ENC_TYPE ((pf->do_read64) ? ENC_TYPE64 : ENC_TYPE32) |
Definition at line 49 of file libpst.c.
Referenced by pst_open().
#define ENTRY_SIZE_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? ENTRY_SIZE_OFFSET4K : ENTRY_SIZE_OFFSET64) : ENTRY_SIZE_OFFSET32) |
Definition at line 852 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define FILE_SIZE_POINTER ((pf->do_read64) ? FILE_SIZE_POINTER64 : FILE_SIZE_POINTER32) |
Definition at line 44 of file libpst.c.
Referenced by pst_open().
#define INDEX_BACK ((pf->do_read64) ? INDEX_BACK64 : INDEX_BACK32) |
Definition at line 46 of file libpst.c.
Referenced by pst_open().
#define INDEX_POINTER ((pf->do_read64) ? INDEX_POINTER64 : INDEX_POINTER32) |
Definition at line 45 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE32 0x0E |
Definition at line 23 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE32A 0x0F |
Definition at line 24 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE4K 0x24 |
Definition at line 27 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE64 0x17 |
Definition at line 25 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE64A 0x15 |
Definition at line 26 of file libpst.c.
Referenced by pst_open().
#define INDEX_TYPE_OFFSET (int64_t)0x0A |
Definition at line 28 of file libpst.c.
Referenced by pst_open().
#define ITEM_COUNT_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? ITEM_COUNT_OFFSET4K : ITEM_COUNT_OFFSET64) : ITEM_COUNT_OFFSET32) |
Definition at line 849 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define LEVEL_INDICATOR_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? LEVEL_INDICATOR_OFFSET4K : LEVEL_INDICATOR_OFFSET64) : LEVEL_INDICATOR_OFFSET32) |
Definition at line 850 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define LIST_COPY | ( | targ, | |
type | |||
) |
#define LIST_COPY_APPT_BIN | ( | label, | |
targ | |||
) |
Definition at line 2154 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_APPT_BOOL | ( | label, | |
targ | |||
) |
Definition at line 1966 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_APPT_ENUM | ( | label, | |
targ, | |||
delta, | |||
count, | |||
... | |||
) |
Definition at line 2034 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_APPT_INT32 | ( | label, | |
targ | |||
) |
Definition at line 2004 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_APPT_STR | ( | label, | |
targ | |||
) |
Definition at line 2090 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_APPT_TIME | ( | label, | |
targ | |||
) |
Definition at line 2126 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_BIN | ( | targ | ) |
Definition at line 2137 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_BOOL | ( | label, | |
targ | |||
) |
Definition at line 1942 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_CONTACT_BOOL | ( | label, | |
targ | |||
) |
Definition at line 1961 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_CONTACT_ENUM16 | ( | label, | |
targ, | |||
delta, | |||
count, | |||
... | |||
) |
Definition at line 2049 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_CONTACT_STR | ( | label, | |
targ | |||
) |
Definition at line 2085 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_CONTACT_TIME | ( | label, | |
targ | |||
) |
Definition at line 2121 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_CSTR | ( | targ | ) |
Definition at line 1928 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_BIN | ( | label, | |
targ | |||
) |
Definition at line 2149 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_BOOL | ( | label, | |
targ | |||
) |
Definition at line 1956 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_ENTRYID | ( | label, | |
targ | |||
) |
Definition at line 2061 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_ENUM | ( | label, | |
targ, | |||
delta, | |||
count, | |||
... | |||
) |
Definition at line 2029 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_INT32 | ( | label, | |
targ | |||
) |
Definition at line 1999 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_STR | ( | label, | |
targ | |||
) |
Definition at line 2080 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_EMAIL_TIME | ( | label, | |
targ | |||
) |
Definition at line 2116 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_ENTRYID | ( | label, | |
targ | |||
) |
#define LIST_COPY_ENUM | ( | label, | |
targ, | |||
delta, | |||
count, | |||
... | |||
) |
Definition at line 2019 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_ENUM16 | ( | label, | |
targ, | |||
delta, | |||
count, | |||
... | |||
) |
#define LIST_COPY_FOLDER_INT32 | ( | label, | |
targ | |||
) |
Definition at line 2009 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_INT16 | ( | label, | |
targ | |||
) |
#define LIST_COPY_INT16_N | ( | targ | ) |
#define LIST_COPY_INT32 | ( | label, | |
targ | |||
) |
Definition at line 1994 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_INT32_N | ( | targ | ) |
#define LIST_COPY_JOURNAL_STR | ( | label, | |
targ | |||
) |
Definition at line 2095 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_JOURNAL_TIME | ( | label, | |
targ | |||
) |
Definition at line 2131 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_STORE_ENTRYID | ( | label, | |
targ | |||
) |
Definition at line 2066 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_STORE_INT32 | ( | label, | |
targ | |||
) |
Definition at line 2014 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_STR | ( | label, | |
targ | |||
) |
Definition at line 2074 of file libpst.c.
Referenced by pst_process().
#define LIST_COPY_TIME | ( | label, | |
targ | |||
) |
Definition at line 2101 of file libpst.c.
Referenced by pst_process().
#define MALLOC_APPOINTMENT | ( | x | ) | { if (!x->appointment) { x->appointment = (pst_item_appointment*) pst_malloc(sizeof(pst_item_appointment)); memset(x->appointment, 0, sizeof(pst_item_appointment) );} } |
#define MALLOC_CONTACT | ( | x | ) | { if (!x->contact) { x->contact = (pst_item_contact*) pst_malloc(sizeof(pst_item_contact)); memset(x->contact, 0, sizeof(pst_item_contact) );} } |
#define MALLOC_EMAIL | ( | x | ) | { if (!x->email) { x->email = (pst_item_email*) pst_malloc(sizeof(pst_item_email)); memset(x->email, 0, sizeof(pst_item_email) );} } |
#define MALLOC_FOLDER | ( | x | ) | { if (!x->folder) { x->folder = (pst_item_folder*) pst_malloc(sizeof(pst_item_folder)); memset(x->folder, 0, sizeof(pst_item_folder) );} } |
Definition at line 1915 of file libpst.c.
Referenced by pst_process().
#define MALLOC_JOURNAL | ( | x | ) | { if (!x->journal) { x->journal = (pst_item_journal*) pst_malloc(sizeof(pst_item_journal)); memset(x->journal, 0, sizeof(pst_item_journal) );} } |
#define MALLOC_MESSAGESTORE | ( | x | ) | { if (!x->message_store) { x->message_store = (pst_item_message_store*) pst_malloc(sizeof(pst_item_message_store)); memset(x->message_store, 0, sizeof(pst_item_message_store));} } |
#define MAX_COUNT_OFFSET (size_t)((pf->do_read64) ? (pf->do_read64 == 2 ? MAX_COUNT_OFFSET4K : MAX_COUNT_OFFSET64) : MAX_COUNT_OFFSET32) |
Definition at line 853 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define NULL_CHECK | ( | x | ) | { if (!x) { DEBUG_WARN(("NULL_CHECK: Null Found\n")); break;} } |
Definition at line 2161 of file libpst.c.
Referenced by pst_process().
#define PST_SIGNATURE 0x4E444221 |
Definition at line 52 of file libpst.c.
Referenced by pst_open().
#define read_twobyte | ( | BUF, | |
OFF | |||
) | (int32_t) ((((unsigned)BUF[OFF + 1] & 0xFF)) << 8) | ((unsigned)BUF[OFF] & 0xFF); |
Definition at line 855 of file libpst.c.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
#define SAFE_FREE | ( | x | ) | {if (x) free(x);} |
Definition at line 1909 of file libpst.c.
Referenced by pst_freeItem().
#define SAFE_FREE_BIN | ( | x | ) | SAFE_FREE(x.data) |
Definition at line 1911 of file libpst.c.
Referenced by pst_free_attach(), and pst_freeItem().
#define SAFE_FREE_STR | ( | x | ) | SAFE_FREE(x.str) |
Definition at line 1910 of file libpst.c.
Referenced by pst_free_attach(), and pst_freeItem().
#define SECOND_BACK ((pf->do_read64) ? SECOND_BACK64 : SECOND_BACK32) |
Definition at line 48 of file libpst.c.
Referenced by pst_open().
#define SECOND_POINTER ((pf->do_read64) ? SECOND_POINTER64 : SECOND_POINTER32) |
Definition at line 47 of file libpst.c.
Referenced by pst_open().
typedef struct pst_block_hdr pst_block_hdr |
typedef struct pst_block_header pst_block_header |
typedef struct pst_block_offset pst_block_offset |
typedef struct pst_block_offset_pointer pst_block_offset_pointer |
typedef struct pst_desc32 pst_desc32 |
typedef struct pst_holder pst_holder |
typedef struct pst_id2_assoc pst_id2_assoc |
typedef struct pst_id2_assoc32 pst_id2_assoc32 |
typedef struct pst_index32 pst_index32 |
typedef struct pst_index64 pst_index64 |
typedef struct pst_mapi_element pst_mapi_element |
typedef struct pst_mapi_object pst_mapi_object |
typedef struct pst_subblock pst_subblock |
typedef struct pst_subblocks pst_subblocks |
typedef struct pst_table3_rec pst_table3_rec |
typedef struct pst_table3_rec32 pst_table3_rec32 |
typedef struct pst_x_attrib pst_x_attrib |
|
static |
add a pst descriptor node to a linked list of such nodes.
node | pointer to the node to be added to the list |
head | pointer to the list head pointer |
tail | pointer to the list tail pointer |
Definition at line 443 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, pst_desc_tree::next, and pst_desc_tree::prev.
Referenced by record_descriptor().
|
static |
Convert a code page integer into a string suitable for iconv()
cp | the code page integer used in the pst file | |
[in] | buflen | length of the output buffer |
[out] | result | pointer to output buffer, must be at least 30 bytes |
Definition at line 4403 of file libpst.c.
Referenced by pst_default_charset().
|
static |
make a deep copy of part of the id2 mapping tree, for use by an attachment containing an embedded rfc822 message.
head | pointer to the subtree to be copied |
Definition at line 532 of file libpst.c.
References pst_id2_tree::child, pst_id2_tree::id, pst_id2_tree::id2, pst_id2_tree::next, and pst_malloc().
Referenced by pst_parse_item().
|
static |
Definition at line 1413 of file libpst.c.
References pst_subblock::buf, pst_block_offset_pointer::from, pst_block_offset_pointer::needfree, pst_subblocks::subblock_count, and pst_subblocks::subs.
Referenced by pst_parse_block().
|
static |
append (buf,z) data to the output destination (h,size)
h | specifies the output destination (buffer, file, encoding) |
size | number of bytes of data already sent to h |
buf | reference to a pointer to the buffer to be appended to the destination |
z | number of bytes in buf |
Definition at line 4155 of file libpst.c.
References pst_holder::base64, pst_holder::base64_extra, pst_holder::base64_extra_chars, pst_holder::base64_line_count, pst_holder::buf, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_holder::fp, pst_base64_encode_multiple(), pst_fwrite(), and pst_realloc().
Referenced by pst_ff_compile_ID(), and pst_ff_getID2data().
size_t pst_attach_to_file | ( | pst_file * | pf, |
pst_item_attach * | attach, | ||
FILE * | fp | ||
) |
Write a binary attachment to a file.
pf | pointer to the pst_file structure setup by pst_open(). |
attach | pointer to the attachment record |
fp | pointer to an open FILE. |
Definition at line 600 of file libpst.c.
References pst_binary::data, pst_item_attach::data, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_item_attach::i_id, pst_ff_getID2data(), pst_fwrite(), pst_getID(), and pst_binary::size.
Referenced by write_msg_email(), and write_separate_attachment().
size_t pst_attach_to_file_base64 | ( | pst_file * | pf, |
pst_item_attach * | attach, | ||
FILE * | fp | ||
) |
Write a binary attachment base64 encoded to a file.
pf | pointer to the pst_file structure setup by pst_open(). |
attach | pointer to the attachment record |
fp | pointer to an open FILE. |
Definition at line 624 of file libpst.c.
References pst_binary::data, pst_item_attach::data, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_item_attach::i_id, pst_base64_encode(), pst_ff_getID2data(), pst_fwrite(), pst_getID(), and pst_binary::size.
Referenced by write_inline_attachment().
pst_binary pst_attach_to_mem | ( | pst_file * | pf, |
pst_item_attach * | attach | ||
) |
Assemble the binary attachment into a single buffer.
pf | pointer to the pst_file structure setup by pst_open(). |
attach | pointer to the attachment record |
Definition at line 576 of file libpst.c.
References pst_binary::data, pst_item_attach::data, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_item_attach::i_id, pst_ff_getID2data(), pst_getID(), and pst_binary::size.
|
static |
Process the index2 b-tree from the pst file and create the pf->d_head tree from it.
This tree holds descriptions of the higher level objects (email, contact, etc) in the pst file.
Definition at line 1140 of file libpst.c.
References pst_desc_tree::assoc_tree, BACKLINK_OFFSET, pst_desc_tree::d_id, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_desc_tree::desc, DESC_BLOCK_SIZE, pst_file::do_read64, ENTRY_SIZE_OFFSET, ITEM_COUNT_OFFSET, LEVEL_INDICATOR_OFFSET, MAX_COUNT_OFFSET, pst_table_ptr_struct::offset, pst_desc_tree::parent_d_id, pst_decode_desc(), pst_decode_table(), pst_getID(), pst_getIntAt(), pst_malloc(), pst_read_block_size(), read_twobyte, record_descriptor(), pst_table_ptr_struct::start, and pst_table_ptr_struct::u1.
Referenced by pst_load_index().
|
static |
Definition at line 3296 of file libpst.c.
References pst_id2_tree::child, pst_id2_assoc::child_id, pst_block_header::count, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::do_read64, pst_index_ll::i_id, pst_id2_tree::id, pst_id2_assoc::id, pst_id2_tree::id2, pst_id2_assoc::id2, pst_index_ll::inflated_size, LE16_CPU, pst_id2_tree::next, pst_index_ll::offset, pst_decode_assoc(), pst_getID(), pst_malloc(), pst_read_block_size(), pst_index_ll::size, pst_block_header::type, and pst_index_ll::u1.
Referenced by pst_load_extended_attributes(), and pst_parse_item().
|
static |
Process the index1 b-tree from the pst file and create the pf->i_head linked list from it.
This tree holds the location (offset and size) of lower level objects (0xbcec descriptor blocks, etc) in the pst file.
Definition at line 1029 of file libpst.c.
References BACKLINK_OFFSET, BLOCK_SIZE, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::do_read64, ENTRY_SIZE_OFFSET, pst_file::i_capacity, pst_file::i_count, pst_index_ll::i_id, pst_file::i_table, pst_index::id, pst_index::inflated_size, ITEM_COUNT_OFFSET, LEVEL_INDICATOR_OFFSET, MAX_COUNT_OFFSET, pst_index::offset, pst_table_ptr_struct::offset, pst_decode_index(), pst_decode_table(), pst_getIntAt(), pst_read_block_size(), pst_realloc(), read_twobyte, pst_index::size, pst_table_ptr_struct::start, pst_index::u1, and pst_table_ptr_struct::u1.
Referenced by pst_load_index().
|
static |
Definition at line 4347 of file libpst.c.
Referenced by pst_rfc2426_escape().
int pst_close | ( | pst_file * | pf | ) |
Close a pst file.
pf | pointer to the pst_file structure setup by pst_open(). |
Definition at line 410 of file libpst.c.
References pst_file::cwd, pst_file::d_head, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_file::fname, pst_file::fp, pst_file::i_table, pst_free_desc(), pst_free_xattrib(), and pst_file::x_head.
Referenced by main().
pst_recurrence* pst_convert_recurrence | ( | pst_item_appointment * | appt | ) |
Decode raw recurrence data into a better structure.
appt | pointer to appointment structure |
Definition at line 4586 of file libpst.c.
References pst_recurrence::bydaymask, pst_recurrence::count, pst_binary::data, pst_recurrence::dayofmonth, pst_recurrence::interval, pst_recurrence::monthofyear, pst_recurrence::parm1, pst_recurrence::parm2, pst_recurrence::parm4, pst_recurrence::parm5, pst_recurrence::position, PST_LE_GET_UINT32, PST_LE_GET_UINT8, pst_malloc(), pst_item_appointment::recurrence_data, pst_recurrence::signature, pst_binary::size, pst_recurrence::sub_type, pst_recurrence::termination, and pst_recurrence::type.
Referenced by write_appointment().
void pst_convert_utf8 | ( | pst_item * | item, |
pst_string * | str | ||
) |
Convert str to utf8 if possible; null strings are converted into empty strings.
item | pointer to the containing mapi item |
str | pointer to the mapi string of interest |
Definition at line 4546 of file libpst.c.
References pst_varbuf::b, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_string::is_utf8, pst_default_charset(), pst_vb_8bit2utf8(), pst_vballoc(), and pst_string::str.
Referenced by create_enter_dir(), process(), pst_convert_utf8_null(), pst_rfc2047(), and write_normal_email().
void pst_convert_utf8_null | ( | pst_item * | item, |
pst_string * | str | ||
) |
Convert str to utf8 if possible; null strings are preserved.
item | pointer to the containing mapi item |
str | pointer to the mapi string of interest |
Definition at line 4535 of file libpst.c.
References pst_convert_utf8(), and pst_string::str.
Referenced by process(), write_appointment(), write_journal(), write_normal_email(), and write_vcard().
|
static |
Definition at line 973 of file libpst.c.
References pst_id2_assoc32::child_id, pst_id2_assoc::child_id, DEBUG_HEXDUMPC, DEBUG_INFO, pst_file::do_read64, pst_id2_assoc32::id, pst_id2_assoc::id, pst_id2_assoc32::id2, pst_id2_assoc::id2, LE32_CPU, and LE64_CPU.
Referenced by pst_build_id2().
Definition at line 858 of file libpst.c.
References pst_desc32::d_id, pst_desc::d_id, DEBUG_HEXDUMPC, DEBUG_INFO, pst_desc32::desc_id, pst_desc::desc_id, pst_file::do_read64, LE32_CPU, LE64_CPU, pst_desc32::parent_d_id, pst_desc::parent_d_id, pst_desc32::tree_id, pst_desc::tree_id, and pst_desc::u1.
Referenced by pst_build_desc_ptr().
Definition at line 921 of file libpst.c.
References DEBUG_HEXDUMPC, DEBUG_INFO, pst_file::do_read64, pst_index32::id, pst_index64::id, pst_index::id, pst_index::inflated_size, LE16_CPU, LE32_CPU, LE64_CPU, pst_index32::offset, pst_index64::offset, pst_index::offset, pst_index32::size, pst_index64::size, pst_index::size, pst_index64::u0, pst_index::u0, pst_index32::u1, pst_index64::u1, and pst_index::u1.
Referenced by pst_build_id_ptr().
|
static |
Definition at line 892 of file libpst.c.
References DEBUG_HEXDUMPC, DEBUG_INFO, pst_file::do_read64, LE32_CPU, LE64_CPU, pst_table_ptr_struct32::offset, pst_table_ptr_struct::offset, pst_table_ptr_struct32::start, pst_table_ptr_struct::start, pst_table_ptr_struct32::u1, and pst_table_ptr_struct::u1.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
|
static |
Definition at line 1001 of file libpst.c.
References DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, pst_file::do_read64, pst_table3_rec32::id, pst_table3_rec::id, LE32_CPU, and LE64_CPU.
Referenced by pst_ff_compile_ID(), and pst_parse_block().
|
static |
Decrypt a block of data from the pst file.
i_id | identifier of this block, needed as part of the key for the enigma cipher |
buf | pointer to the buffer to be decrypted in place |
size | size of the buffer |
type |
|
Definition at line 3854 of file libpst.c.
References comp_enc, comp_high1, comp_high2, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, PST_COMP_ENCRYPT, and PST_ENCRYPT.
Referenced by pst_ff_compile_ID(), and pst_ff_getIDblock_dec().
const char* pst_default_charset | ( | pst_item * | item, |
int | buflen, | ||
char * | result | ||
) |
Get the default character set for this item.
This is used to find the charset for pst_string elements that are not already in utf8 encoding.
item | pointer to the mapi item of interest | |
[in] | buflen | length of the output buffer |
[out] | result | pointer to output buffer, must be at least 30 bytes |
Definition at line 4451 of file libpst.c.
References pst_item::body_charset, pst_file::charset, codepage(), pst_item::internet_cpid, pst_item::message_codepage, pst_item::pf, and pst_string::str.
Referenced by pst_convert_utf8(), write_msg_email(), and write_normal_email().
|
static |
find the actual data from an indirection i_id and send it to the destination specified by the pst_holder.
pf | PST file structure |
i_id | ID of the block to read |
h | specifies the output destination (buffer, file, encoding) |
size | number of bytes of data already sent to h |
Definition at line 4079 of file libpst.c.
References DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::encryption, pst_table3_rec::id, pst_block_hdr::index_offset, LE16_CPU, LE32_CPU, pst_block_hdr::offset, pst_append_holder(), pst_decode_type3(), pst_decrypt(), pst_ff_getIDblock(), pst_ff_getIDblock_dec(), and pst_block_hdr::type.
Referenced by pst_ff_getID2data().
|
static |
Definition at line 4025 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_id2_tree::id, pst_ff_getID2data(), and pst_getID2().
Referenced by pst_getBlockOffsetPointer(), and pst_parse_block().
|
static |
find the actual data from an i_id and send it to the destination specified by the pst_holder h.
h must be a new empty destination.
pf | PST file structure |
ptr | |
h | specifies the output destination (buffer, file, encoding) |
Definition at line 4051 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_index_ll::i_id, pst_append_holder(), pst_ff_compile_ID(), pst_ff_getIDblock_dec(), and pst_finish_cleanup_holder().
Referenced by pst_attach_to_file(), pst_attach_to_file_base64(), pst_attach_to_mem(), and pst_ff_getID2block().
|
static |
Read a block of data from file into memory.
pf | PST file structure |
i_id | ID of block to read |
buf | reference to pointer to buffer that will contain the data block. If this pointer is non-NULL, it will first be free()d. |
Definition at line 4008 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_index_ll::inflated_size, pst_index_ll::offset, pst_getID(), pst_read_block_size(), and pst_index_ll::size.
Referenced by pst_ff_compile_ID(), and pst_ff_getIDblock_dec().
size_t pst_ff_getIDblock_dec | ( | pst_file * | pf, |
uint64_t | i_id, | ||
char ** | buf | ||
) |
Get an ID block from file using pst_ff_getIDblock() and decrypt if necessary.
Get an ID block from the file using pst_ff_getIDblock() and decrypt if necessary.
pf | PST file structure |
i_id | ID of block to retrieve |
buf | reference to pointer to buffer that will contain the data block. If this pointer is non-NULL, it will first be free()d. |
Definition at line 3985 of file libpst.c.
References DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, pst_file::encryption, pst_decrypt(), and pst_ff_getIDblock().
Referenced by dumper(), main(), pst_ff_compile_ID(), pst_ff_getID2data(), and pst_parse_block().
|
static |
finish cleanup for base64 encoding to a file with extra bytes left over
h | specifies the output destination (buffer, file, encoding) |
size | number of bytes of data already sent to h |
Definition at line 4211 of file libpst.c.
References pst_holder::base64, pst_holder::base64_extra, pst_holder::base64_extra_chars, pst_holder::base64_line_count, DEBUG_ENT, DEBUG_RET, pst_holder::fp, pst_base64_encode_multiple(), and pst_fwrite().
Referenced by pst_ff_getID2data().
|
static |
Definition at line 3365 of file libpst.c.
References pst_item_attach::content_id, pst_item_attach::data, pst_item_attach::filename1, pst_item_attach::filename2, pst_item_attach::id2_head, pst_item_attach::mimetype, pst_item_attach::next, pst_free_id2(), SAFE_FREE_BIN, and SAFE_FREE_STR.
Referenced by pst_freeItem().
|
static |
Definition at line 3270 of file libpst.c.
References pst_desc_tree::child, DEBUG_ENT, DEBUG_RET, and pst_desc_tree::next.
Referenced by pst_close().
|
static |
Definition at line 3257 of file libpst.c.
References pst_id2_tree::child, DEBUG_ENT, DEBUG_RET, and pst_id2_tree::next.
Referenced by pst_free_attach(), pst_load_extended_attributes(), and pst_parse_item().
|
static |
Definition at line 3235 of file libpst.c.
References pst_mapi_element::data, DEBUG_ENT, DEBUG_RET, pst_mapi_object::elements, pst_mapi_object::next, and pst_mapi_object::orig_count.
Referenced by pst_load_extended_attributes(), pst_parse_block(), and pst_parse_item().
void pst_free_recurrence | ( | pst_recurrence * | r | ) |
Free a recurrence structure.
r | input pointer to be freed |
Definition at line 4661 of file libpst.c.
Referenced by write_appointment().
|
static |
Definition at line 3283 of file libpst.c.
References pst_x_attrib_ll::data, DEBUG_ENT, DEBUG_RET, and pst_x_attrib_ll::next.
Referenced by pst_close().
void pst_freeItem | ( | pst_item * | item | ) |
Free the item returned by pst_parse_item().
item | pointer to item returned from pst_parse_item(). |
Definition at line 3381 of file libpst.c.
References pst_item_contact::account_name, pst_item_contact::address1, pst_item_contact::address1_desc, pst_item_contact::address1_transport, pst_item_contact::address1a, pst_item_contact::address2, pst_item_contact::address2_desc, pst_item_contact::address2_transport, pst_item_contact::address2a, pst_item_contact::address3, pst_item_contact::address3_desc, pst_item_contact::address3_transport, pst_item_contact::address3a, pst_item_appointment::alarm_filename, pst_item::appointment, pst_item_email::arrival_date, pst_item::ascii_type, pst_item_contact::assistant_name, pst_item_contact::assistant_phone, pst_item::attach, pst_item_email::bcc_address, pst_item_contact::billing_information, pst_item_contact::birthday, pst_item::body, pst_item::body_charset, pst_item_contact::business_address, pst_item_contact::business_city, pst_item_contact::business_country, pst_item_contact::business_fax, pst_item_contact::business_homepage, pst_item_contact::business_phone, pst_item_contact::business_phone2, pst_item_contact::business_po_box, pst_item_contact::business_postal_code, pst_item_contact::business_state, pst_item_contact::business_street, pst_item_contact::callback_phone, pst_item_contact::car_phone, pst_item_email::cc_address, pst_item::comment, pst_item_contact::common_name, pst_item_message_store::common_view_folder, pst_item_contact::company_main_phone, pst_item_contact::company_name, pst_item_contact::computer_name, pst_item::contact, pst_item_email::conversation_index, pst_item::create_date, pst_item_contact::customer_id, DEBUG_ENT, DEBUG_RET, pst_item_contact::def_postal_address, pst_item_message_store::default_outbox_folder, pst_item_message_store::deleted_items_folder, pst_item_contact::department, pst_item_contact::display_name_prefix, pst_item::email, pst_item_email::encrypted_body, pst_item_email::encrypted_htmlbody, pst_item_journal::end, pst_item_appointment::end, pst_item::extra_fields, pst_item_extra_field::field_name, pst_item::file_as, pst_item_contact::first_name, pst_item::folder, pst_item_contact::followup, pst_item_contact::free_busy_address, pst_item_contact::ftp_site, pst_item_contact::fullname, pst_item_contact::gov_id, pst_item_email::header, pst_item_contact::hobbies, pst_item_contact::home_address, pst_item_contact::home_city, pst_item_contact::home_country, pst_item_contact::home_fax, pst_item_contact::home_phone, pst_item_contact::home_phone2, pst_item_contact::home_po_box, pst_item_contact::home_postal_code, pst_item_contact::home_state, pst_item_contact::home_street, pst_item_email::htmlbody, pst_item_email::in_reply_to, pst_item_contact::initials, pst_item_contact::isdn_phone, pst_item_contact::job_title, pst_item::journal, pst_item_contact::keyword, pst_item_contact::language, pst_item_contact::location, pst_item_appointment::location, pst_item_contact::manager_name, pst_item::message_store, pst_item_email::messageid, pst_item_contact::middle_name, pst_item_contact::mileage, pst_item_contact::mobile_phone, pst_item::modify_date, pst_item_extra_field::next, pst_item_contact::nickname, pst_item_contact::office_loc, pst_item_contact::org_id, pst_item_email::original_bcc, pst_item_email::original_cc, pst_item_email::original_to, pst_item_contact::other_address, pst_item_contact::other_city, pst_item_contact::other_country, pst_item_contact::other_phone, pst_item_contact::other_po_box, pst_item_contact::other_postal_code, pst_item_contact::other_state, pst_item_contact::other_street, pst_item_email::outlook_normalized_subject, pst_item_email::outlook_received_name1, pst_item_email::outlook_recipient, pst_item_email::outlook_recipient2, pst_item_email::outlook_recipient_name, pst_item_email::outlook_search_key, pst_item_email::outlook_sender, pst_item_email::outlook_sender2, pst_item_email::outlook_sender_name, pst_item_email::outlook_sender_name2, pst_item::outlook_version, pst_item_contact::pager_phone, pst_item_contact::personal_homepage, pst_item::predecessor_change, pst_item_contact::pref_name, pst_item_contact::primary_fax, pst_item_contact::primary_phone, pst_item_email::processed_subject, pst_item_contact::profession, pst_free_attach(), pst_item_contact::radio_phone, pst_item_email::recip2_access, pst_item_email::recip2_address, pst_item_email::recip_access, pst_item_email::recip_address, pst_item::record_key, pst_item_appointment::recurrence_data, pst_item_appointment::recurrence_description, pst_item_appointment::recurrence_end, pst_item_appointment::recurrence_start, pst_item_appointment::reminder, pst_item_email::reply_to, pst_item_email::report_text, pst_item_email::report_time, pst_item_email::return_path_address, pst_item_email::rtf_body_tag, pst_item_email::rtf_compressed, SAFE_FREE, SAFE_FREE_BIN, SAFE_FREE_STR, pst_item_message_store::search_root_folder, pst_item_email::sender2_access, pst_item_email::sender2_address, pst_item_email::sender_access, pst_item_email::sender_address, pst_item_email::sent_date, pst_item_message_store::sent_items_folder, pst_item_email::sentmail_folder, pst_item_email::sentto_address, pst_item_contact::spouse_name, pst_item_journal::start, pst_item_appointment::start, pst_item::subject, pst_item_contact::suffix, pst_item_email::supplementary_info, pst_item_contact::surname, pst_item_contact::telex, pst_item_appointment::timezonestring, pst_item_message_store::top_of_folder, pst_item_message_store::top_of_personal_folder, pst_item_contact::transmittable_display_name, pst_item_contact::ttytdd_phone, pst_item_journal::type, pst_item_message_store::user_views_folder, pst_item_extra_field::value, pst_item_contact::wedding_anniversary, pst_item_contact::work_address_city, pst_item_contact::work_address_country, pst_item_contact::work_address_postalcode, pst_item_contact::work_address_postofficebox, pst_item_contact::work_address_state, and pst_item_contact::work_address_street.
Referenced by dumper(), main(), process(), pst_parse_item(), and write_embedded_message().
size_t pst_fwrite | ( | const void * | ptr, |
size_t | size, | ||
size_t | nmemb, | ||
FILE * | stream | ||
) |
fwrite with checking for null pointer.
ptr | pointer to the buffer |
size | size of each item |
nmemb | number of items |
stream | output file |
Definition at line 4261 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, and DEBUG_WARN.
Referenced by main(), print_pdf(), pst_append_holder(), pst_attach_to_file(), pst_attach_to_file_base64(), pst_finish_cleanup_holder(), and write_email_body().
|
static |
Read part of the pst file.
pf | PST file structure |
pos | offset of the data in the pst file |
buf | buffer to contain the data |
size | size of the buffer and the amount of data to be read |
Definition at line 3942 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, and pst_file::fp.
Referenced by pst_getIntAtPos(), pst_open(), and pst_read_raw_block_size().
|
static |
Definition at line 3649 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_block_offset::from, LE16_CPU, and pst_block_offset::to.
Referenced by pst_getBlockOffsetPointer().
|
static |
The offset might be zero, in which case we have no data, so return a pair of null pointers.
Or, the offset might end in 0xf, so it is an id2 pointer, in which case we read the id2 block. Otherwise, the high order 16 bits of offset is the index into the subblocks, and the (low order 16 bits of offset)>>4 is an index into the table of offsets in the subblock.
Definition at line 3596 of file libpst.c.
References pst_subblock::buf, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, pst_file::do_read64, pst_block_offset::from, pst_block_offset_pointer::from, pst_subblock::i_offset, pst_block_offset_pointer::needfree, pst_ff_getID2block(), pst_getBlockOffset(), pst_subblock::read_size, pst_subblocks::subs, pst_block_offset::to, and pst_block_offset_pointer::to.
Referenced by pst_parse_block().
|
static |
Definition at line 303 of file libpst.c.
References pst_malloc().
Referenced by pst_open(), and pst_reopen().
|
static |
find the id in the descriptor tree rooted at pf->d_head
pf | global pst file pointer |
d_id | the id we are looking for |
Definition at line 3732 of file libpst.c.
References pst_desc_tree::child, pst_file::d_head, pst_desc_tree::d_id, DEBUG_ENT, DEBUG_RET, pst_desc_tree::next, and pst_desc_tree::parent.
Referenced by pst_getTopOfFolders(), pst_load_extended_attributes(), and record_descriptor().
pst_index_ll* pst_getID | ( | pst_file * | pf, |
uint64_t | i_id | ||
) |
Lookup the i_id in the index linked list, and return a pointer to the element.
pf | pointer to the pst_file structure setup by pst_open(). |
i_id | key for the index linked list |
Definition at line 3681 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_file::i_count, pst_file::i_table, and pst_getID_compare().
Referenced by dumper(), pst_attach_to_file(), pst_attach_to_file_base64(), pst_attach_to_mem(), pst_build_desc_ptr(), pst_build_id2(), pst_ff_getIDblock(), write_embedded_message(), write_inline_attachment(), and write_separate_attachment().
|
static |
Definition at line 3702 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_index_ll::i_id, pst_id2_tree::id, pst_id2_tree::id2, and pst_id2_tree::next.
Referenced by pst_ff_getID2block(), and pst_parse_item().
|
static |
Definition at line 3673 of file libpst.c.
Referenced by pst_getID().
|
static |
Definition at line 3902 of file libpst.c.
References pst_file::do_read64, LE32_CPU, and LE64_CPU.
Referenced by pst_build_desc_ptr(), and pst_build_id_ptr().
|
static |
Definition at line 3918 of file libpst.c.
References pst_file::do_read64, LE32_CPU, LE64_CPU, and pst_getAtPos().
Referenced by pst_open().
pst_desc_tree* pst_getNextDptr | ( | pst_desc_tree * | d | ) |
Walk the descriptor tree.
d | pointer to the current item in the descriptor tree. |
Definition at line 674 of file libpst.c.
References pst_desc_tree::child, DEBUG_ENT, DEBUG_RET, pst_desc_tree::next, and pst_desc_tree::parent.
Referenced by dumper().
pst_desc_tree* pst_getTopOfFolders | ( | pst_file * | pf, |
const pst_item * | root | ||
) |
Get the top of folders descriptor tree.
This is the main descriptor tree that needs to be walked to look at every item in the pst file.
pf | pointer to the pst_file structure setup by pst_open(). |
root | root item, which can be obtained by pst_parse_item(pf, pf->d_head, NULL). |
Definition at line 544 of file libpst.c.
References pst_desc_tree::assoc_tree, pst_desc_tree::d_id, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_desc_tree::desc, pst_entryid::id, pst_item::message_store, pst_desc_tree::parent_d_id, pst_getDptr(), pst_malloc(), record_descriptor(), and pst_item_message_store::top_of_personal_folder.
Referenced by main().
int pst_load_extended_attributes | ( | pst_file * | pf | ) |
Try to load the extended attributes from the pst file.
Load the extended attribute mapping table from the pst file.
Definition at line 698 of file libpst.c.
References pst_desc_tree::assoc_tree, pst_mapi_object::count_elements, pst_mapi_element::data, pst_x_attrib_ll::data, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_desc_tree::desc, pst_mapi_object::elements, pst_x_attrib::extended, pst_index_ll::i_id, LE32_CPU, pst_x_attrib::map, pst_x_attrib_ll::map, pst_mapi_element::mapi_id, pst_x_attrib_ll::mytype, pst_x_attrib_ll::next, pst_build_id2(), pst_free_id2(), pst_free_list(), pst_getDptr(), PST_LE_GET_UINT16, PST_LE_GET_UINT32, pst_malloc(), PST_MAP_ATTRIB, PST_MAP_HEADER, pst_parse_block(), pst_printID2ptr(), pst_wide_to_single(), pst_mapi_element::size, pst_mapi_element::type, pst_x_attrib::type, and pst_file::x_head.
Referenced by main().
int pst_load_index | ( | pst_file * | pf | ) |
Load the index entries from the pst file.
This loads both the i_id linked list, and the d_id tree, and should normally be the first call after pst_open().
pf | pointer to the pst_file structure setup by pst_open(). |
Definition at line 652 of file libpst.c.
References pst_file::d_head, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::index1, pst_file::index1_back, pst_file::index2, pst_file::index2_back, pst_build_desc_ptr(), pst_build_id_ptr(), and pst_printDptr().
Referenced by main().
int pst_open | ( | pst_file * | pf, |
const char * | name, | ||
const char * | charset | ||
) |
Open a pst file.
pf | pointer to uninitialized pst_file structure. This structure will be filled in by this function. |
name | name of the file, suitable for fopen(). |
charset | default charset for item with unspecified character sets |
Definition at line 315 of file libpst.c.
References pst_file::charset, pst_file::cwd, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::do_read64, ENC_TYPE, pst_file::encryption, FILE_SIZE_POINTER, pst_file::fname, pst_file::fp, pst_file::ind_type, pst_file::index1, pst_file::index1_back, pst_file::index2, pst_file::index2_back, INDEX_BACK, INDEX_POINTER, INDEX_TYPE32, INDEX_TYPE32A, INDEX_TYPE4K, INDEX_TYPE64, INDEX_TYPE64A, INDEX_TYPE_OFFSET, LE32_CPU, pst_getAtPos(), pst_getcwd(), pst_getIntAtPos(), PST_SIGNATURE, pst_unicode_init(), SECOND_BACK, SECOND_POINTER, pst_file::size, and WARN.
Referenced by main().
|
static |
Process a low level descriptor block (0x0101, 0xbcec, 0x7cec) into a list of MAPI objects, each of which contains a list of MAPI elements.
Definition at line 1440 of file libpst.c.
References pst_varbuf::b, pst_subblock::buf, pst_mapi_object::count_elements, pst_mapi_object::count_objects, pst_mapi_element::data, pst_x_attrib_ll::data, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_varbuf::dlen, pst_file::do_read64, pst_mapi_object::elements, pst_mapi_element::extra, freeall(), pst_block_offset_pointer::from, pst_subblock::i_offset, pst_table3_rec::id, pst_block_hdr::index_offset, LE16_CPU, LE32_CPU, pst_x_attrib_ll::map, pst_mapi_element::mapi_id, pst_x_attrib_ll::mytype, pst_block_offset_pointer::needfree, pst_mapi_object::next, pst_x_attrib_ll::next, pst_block_hdr::offset, pst_mapi_object::orig_count, PST_ATTRIB_HEADER, pst_decode_type3(), pst_ff_getID2block(), pst_ff_getIDblock_dec(), pst_free_list(), pst_getBlockOffsetPointer(), pst_malloc(), PST_MAP_ATTRIB, PST_MAP_HEADER, pst_vb_utf16to8(), pst_vballoc(), pst_vbappend(), pst_vbset(), pst_subblock::read_size, pst_mapi_element::size, pst_subblocks::subblock_count, pst_subblocks::subs, pst_block_offset_pointer::to, pst_mapi_element::type, pst_block_hdr::type, pst_table_ptr_struct::u1, and pst_file::x_head.
Referenced by pst_load_extended_attributes(), and pst_parse_item().
pst_item* pst_parse_item | ( | pst_file * | pf, |
pst_desc_tree * | d_ptr, | ||
pst_id2_tree * | m_head | ||
) |
Process a high level object from the pst file.
Assemble a mapi object from a descriptor pointer.
Definition at line 1249 of file libpst.c.
References pst_desc_tree::assoc_tree, pst_item::attach, pst_id2_tree::child, pst_mapi_object::count_objects, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, deep_copy(), pst_desc_tree::desc, pst_item::flags, pst_index_ll::i_id, pst_item_attach::i_id, pst_id2_tree::id, pst_item_attach::id2_head, pst_item_attach::id2_val, pst_item_attach::next, pst_item::pf, pst_build_id2(), PST_FLAG_HAS_ATTACHMENT, pst_free_id2(), pst_free_list(), pst_freeItem(), pst_getID2(), pst_malloc(), pst_parse_block(), pst_printID2ptr(), and pst_process().
Referenced by dumper(), main(), process(), and write_embedded_message().
|
static |
Definition at line 3751 of file libpst.c.
References pst_desc_tree::assoc_tree, pst_desc_tree::child, pst_desc_tree::d_id, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_desc_tree::desc, pst_index_ll::i_id, pst_desc_tree::next, and pst_desc_tree::no_child.
Referenced by pst_load_index().
|
static |
Definition at line 3766 of file libpst.c.
References pst_id2_tree::child, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_index_ll::i_id, pst_id2_tree::id, pst_id2_tree::id2, and pst_id2_tree::next.
Referenced by pst_load_extended_attributes(), and pst_parse_item().
|
static |
process the list of MAPI objects produced from parse_block()
block_id | block number used by parse_block() to produce these MAPI objects |
list | pointer to the list of MAPI objects from parse_block() |
item | pointer to the high level item to be updated from the list. this item may be an email, contact or other sort of item. the type of this item is generally set by the MAPI elements from the list. |
attach | pointer to the list of attachment records. If this is non-null, the length of the this attachment list must be at least as large as the length of the MAPI objects list. |
Definition at line 2179 of file libpst.c.
References pst_item_contact::account_name, pst_item_contact::address1, pst_item_contact::address1_desc, pst_item_contact::address1_transport, pst_item_contact::address1a, pst_item_contact::address2, pst_item_contact::address2_desc, pst_item_contact::address2_transport, pst_item_contact::address2a, pst_item_contact::address3, pst_item_contact::address3_desc, pst_item_contact::address3_transport, pst_item_contact::address3a, pst_item_appointment::alarm, pst_item_appointment::alarm_filename, pst_item_appointment::alarm_minutes, pst_item_appointment::all_day, pst_item::appointment, pst_item_email::arrival_date, pst_item::ascii_type, pst_item_contact::assistant_name, pst_item_contact::assistant_phone, pst_item_folder::assoc_count, pst_item_email::autoforward, pst_item_email::bcc_address, pst_item_contact::billing_information, pst_item_contact::birthday, pst_item::block_id, pst_item::body, pst_item::body_charset, pst_item_contact::business_address, pst_item_contact::business_city, pst_item_contact::business_country, pst_item_contact::business_fax, pst_item_contact::business_homepage, pst_item_contact::business_phone, pst_item_contact::business_phone2, pst_item_contact::business_po_box, pst_item_contact::business_postal_code, pst_item_contact::business_state, pst_item_contact::business_street, pst_item_contact::callback_phone, pst_item_contact::car_phone, pst_item_email::cc_address, pst_item::comment, pst_item_contact::common_name, pst_item_message_store::common_view_folder, pst_item_contact::company_main_phone, pst_item_contact::company_name, pst_item_contact::computer_name, pst_item::contact, pst_item_attach::content_id, pst_item_email::conversation_index, pst_item_email::conversion_prohibited, pst_mapi_object::count_elements, pst_item::create_date, pst_item_contact::customer_id, pst_mapi_element::data, pst_binary::data, pst_item_attach::data, DEBUG_ENT, DEBUG_HEXDUMP, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_item_contact::def_postal_address, pst_item_message_store::default_outbox_folder, pst_item_email::delete_after_submit, pst_item_message_store::deleted_items_folder, pst_item_email::delivery_report, pst_item_contact::department, pst_item_journal::description, pst_item_contact::display_name_prefix, pst_mapi_object::elements, pst_item::email, pst_item_email::encrypted_body, pst_item_email::encrypted_htmlbody, pst_item_journal::end, pst_item_appointment::end, pst_mapi_element::extra, pst_item::extra_fields, pst_item_extra_field::field_name, pst_item::file_as, pst_item_attach::filename1, pst_item_attach::filename2, pst_item_contact::first_name, pst_item::flags, pst_item::folder, pst_item_contact::followup, pst_item_contact::free_busy_address, pst_item_contact::ftp_site, pst_item_contact::fullname, pst_item_contact::gender, pst_item_contact::gov_id, pst_item_email::header, pst_item_contact::hobbies, pst_item_contact::home_address, pst_item_contact::home_city, pst_item_contact::home_country, pst_item_contact::home_fax, pst_item_contact::home_phone, pst_item_contact::home_phone2, pst_item_contact::home_po_box, pst_item_contact::home_postal_code, pst_item_contact::home_state, pst_item_contact::home_street, pst_item_email::htmlbody, pst_item_attach::id2_val, pst_item_email::importance, pst_item_email::in_reply_to, pst_item_contact::initials, pst_item::internet_cpid, pst_item_appointment::is_recurring, pst_string::is_utf8, pst_item_contact::isdn_phone, pst_item_folder::item_count, pst_item_contact::job_title, pst_item::journal, pst_item_contact::keyword, pst_item_appointment::label, pst_item_contact::language, LIST_COPY_APPT_BIN, LIST_COPY_APPT_BOOL, LIST_COPY_APPT_ENUM, LIST_COPY_APPT_INT32, LIST_COPY_APPT_STR, LIST_COPY_APPT_TIME, LIST_COPY_BIN, LIST_COPY_BOOL, LIST_COPY_CONTACT_BOOL, LIST_COPY_CONTACT_ENUM16, LIST_COPY_CONTACT_STR, LIST_COPY_CONTACT_TIME, LIST_COPY_CSTR, LIST_COPY_EMAIL_BIN, LIST_COPY_EMAIL_BOOL, LIST_COPY_EMAIL_ENTRYID, LIST_COPY_EMAIL_ENUM, LIST_COPY_EMAIL_INT32, LIST_COPY_EMAIL_STR, LIST_COPY_EMAIL_TIME, LIST_COPY_ENUM, LIST_COPY_FOLDER_INT32, LIST_COPY_INT32, LIST_COPY_JOURNAL_STR, LIST_COPY_JOURNAL_TIME, LIST_COPY_STORE_ENTRYID, LIST_COPY_STORE_INT32, LIST_COPY_STR, LIST_COPY_TIME, pst_item_contact::location, pst_item_appointment::location, pst_item_contact::mail_permission, MALLOC_FOLDER, pst_item_contact::manager_name, pst_mapi_element::mapi_id, pst_item_email::message_cc_me, pst_item::message_codepage, pst_item_email::message_recip_me, pst_item::message_size, pst_item::message_store, pst_item_email::message_to_me, pst_item_email::messageid, pst_item_attach::method, pst_item_contact::middle_name, pst_item_contact::mileage, pst_item_attach::mimetype, pst_item_contact::mobile_phone, pst_item::modify_date, pst_item_email::ndr_diag_code, pst_item_email::ndr_reason_code, pst_item_email::ndr_status_code, pst_mapi_object::next, pst_item_attach::next, pst_item_extra_field::next, pst_item_contact::nickname, NULL_CHECK, pst_item_contact::office_loc, pst_item_contact::org_id, pst_item_email::original_bcc, pst_item_email::original_cc, pst_item_email::original_sensitivity, pst_item_email::original_to, pst_item_contact::other_address, pst_item_contact::other_city, pst_item_contact::other_country, pst_item_contact::other_phone, pst_item_contact::other_po_box, pst_item_contact::other_postal_code, pst_item_contact::other_state, pst_item_contact::other_street, pst_item_email::outlook_normalized_subject, pst_item_email::outlook_received_name1, pst_item_email::outlook_recipient, pst_item_email::outlook_recipient2, pst_item_email::outlook_recipient_name, pst_item_email::outlook_search_key, pst_item_email::outlook_sender, pst_item_email::outlook_sender2, pst_item_email::outlook_sender_name, pst_item_email::outlook_sender_name2, pst_item::outlook_version, pst_item_contact::pager_phone, pst_item_contact::personal_homepage, pst_item_attach::position, pst_item::predecessor_change, pst_item_contact::pref_name, pst_item_contact::primary_fax, pst_item_contact::primary_phone, pst_item_email::priority, pst_item::private_member, pst_item_email::processed_subject, pst_item_contact::profession, PST_ATTRIB_HEADER, pst_fileTimeToAscii(), PST_LE_GET_INT32, pst_malloc(), pst_stricmp(), pst_strincmp(), PST_TYPE_APPOINTMENT, PST_TYPE_CONTACT, PST_TYPE_JOURNAL, PST_TYPE_NOTE, PST_TYPE_OTHER, PST_TYPE_REPORT, PST_TYPE_SCHEDULE, PST_TYPE_STICKYNOTE, PST_TYPE_TASK, pst_item_message_store::pwd_chksum, pst_item_contact::radio_phone, pst_item_email::read_receipt, pst_item_email::recip2_access, pst_item_email::recip2_address, pst_item_email::recip_access, pst_item_email::recip_address, pst_item::record_key, pst_item_appointment::recurrence_data, pst_item_appointment::recurrence_description, pst_item_appointment::recurrence_end, pst_item_appointment::recurrence_start, pst_item_appointment::recurrence_type, pst_item_appointment::reminder, pst_item_email::reply_requested, pst_item_email::reply_to, pst_item_email::report_text, pst_item_email::report_time, pst_item::response_requested, pst_item_email::return_path_address, pst_item_contact::rich_text, pst_item_email::rtf_body_char_count, pst_item_email::rtf_body_crc, pst_item_email::rtf_body_tag, pst_item_email::rtf_compressed, pst_item_email::rtf_in_sync, pst_item_email::rtf_ws_prefix_count, pst_item_email::rtf_ws_trailing_count, pst_item_message_store::search_root_folder, pst_item_email::sender2_access, pst_item_email::sender2_address, pst_item_email::sender_access, pst_item_email::sender_address, pst_item_email::sensitivity, pst_item_email::sent_date, pst_item_message_store::sent_items_folder, pst_item_email::sentmail_folder, pst_item_email::sentto_address, pst_item_attach::sequence, pst_item_appointment::showas, pst_mapi_element::size, pst_binary::size, pst_item_contact::spouse_name, pst_item_journal::start, pst_item_appointment::start, pst_string::str, pst_item_folder::subfolder, pst_item::subject, pst_item_contact::suffix, pst_item_email::supplementary_info, pst_item_contact::surname, pst_item_contact::telex, pst_item_appointment::timezonestring, pst_item_message_store::top_of_folder, pst_item_message_store::top_of_personal_folder, pst_item_contact::transmittable_display_name, pst_item_contact::ttytdd_phone, pst_mapi_element::type, pst_item_journal::type, pst_item::type, pst_item_folder::unseen_item_count, pst_item_message_store::user_views_folder, pst_item_message_store::valid_mask, pst_item_extra_field::value, pst_item_contact::wedding_anniversary, pst_item_contact::work_address_city, pst_item_contact::work_address_country, pst_item_contact::work_address_postalcode, pst_item_contact::work_address_postofficebox, pst_item_contact::work_address_state, and pst_item_contact::work_address_street.
Referenced by pst_parse_item().
|
static |
Definition at line 3813 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_malloc(), and pst_read_raw_block_size().
Referenced by pst_build_desc_ptr(), pst_build_id2(), pst_build_id_ptr(), and pst_ff_getIDblock().
|
static |
Read a block of data from file into memory.
pf | PST file |
offset | offset in the pst file of the data |
size | size of the block to be read |
buf | reference to pointer to buffer. If this pointer is non-NULL, it will first be free()d |
Definition at line 3786 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, pst_file::fp, pst_getAtPos(), and pst_malloc().
Referenced by pst_read_block_size().
int pst_reopen | ( | pst_file * | pf | ) |
Reopen the pst file after a fork.
pf | pointer to the pst_file structure setup by pst_open(). |
Definition at line 395 of file libpst.c.
References pst_file::cwd, pst_file::fname, pst_file::fp, and pst_getcwd().
Referenced by try_fork().
void pst_rfc2047 | ( | pst_item * | item, |
pst_string * | str, | ||
int | needs_quote | ||
) |
Convert str to rfc2047 encoding of str, possibly enclosed in quotes if it contains spaces.
item | pointer to the containing mapi item |
str | pointer to the mapi string of interest |
needs_quote | true if strings containing spaces should be wrapped in quotes |
Definition at line 4502 of file libpst.c.
References pst_base64_encode_single(), pst_convert_utf8(), pst_malloc(), and pst_string::str.
Referenced by write_normal_email().
void pst_rfc2231 | ( | pst_string * | str | ) |
Convert str to rfc2231 encoding of str.
str | pointer to the mapi string of interest |
Definition at line 4464 of file libpst.c.
References pst_malloc(), and pst_string::str.
Referenced by write_inline_attachment().
char* pst_rfc2425_datetime_format | ( | const FILETIME * | ft, |
int | buflen, | ||
char * | result | ||
) |
Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z which is the same as one of the forms in the ISO3601 standard.
[in] | ft | time to be converted |
[in] | buflen | length of the output buffer |
[out] | result | pointer to output buffer, must be at least 30 bytes |
Definition at line 4357 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, and pst_fileTimeToStructTM().
Referenced by write_vcard().
char* pst_rfc2426_escape | ( | char * | str, |
char ** | result, | ||
size_t * | resultlen | ||
) |
Add any necessary escape characters for rfc2426 vcard format.
[in] | str | pointer to input string |
[in,out] | result | pointer to a char* pointer that may be realloc'ed if needed |
[in,out] | resultlen | size of the result buffer |
Definition at line 4293 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, pst_chr_count(), and pst_realloc().
Referenced by process(), write_appointment(), write_extra_categories(), write_journal(), and write_vcard().
char* pst_rfc2445_datetime_format | ( | const FILETIME * | ft, |
int | buflen, | ||
char * | result | ||
) |
Convert a FILETIME into rfc2445 date/time format 19531015T231000Z.
[in] | ft | time to be converted |
[in] | buflen | length of the output buffer |
[out] | result | pointer to output buffer, must be at least 30 bytes |
Definition at line 4369 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, and pst_fileTimeToStructTM().
Referenced by process(), write_appointment(), and write_journal().
char* pst_rfc2445_datetime_format_now | ( | int | buflen, |
char * | result | ||
) |
Convert the current time rfc2445 date/time format 19531015T231000Z.
[in] | buflen | length of the output buffer |
[out] | result | pointer to output buffer, must be at least 30 bytes |
Definition at line 4381 of file libpst.c.
References DEBUG_ENT, DEBUG_INFO, and DEBUG_RET.
Referenced by write_appointment(), and write_journal().
int pst_stricmp | ( | char * | a, |
char * | b | ||
) |
compare strings case-insensitive.
Definition at line 4231 of file libpst.c.
Referenced by acceptable_ext(), and pst_process().
|
static |
Definition at line 4244 of file libpst.c.
Referenced by pst_process().
|
static |
Definition at line 4275 of file libpst.c.
References DEBUG_ENT, DEBUG_RET, and pst_malloc().
Referenced by pst_load_extended_attributes().
|
static |
add a pst descriptor node into the global tree.
pf | global pst file pointer |
node | pointer to the new node to be added to the tree |
Definition at line 467 of file libpst.c.
References add_descriptor_to_list(), pst_desc_tree::child, pst_desc_tree::child_tail, pst_file::d_head, pst_desc_tree::d_id, pst_file::d_tail, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_desc_tree::next, pst_desc_tree::no_child, pst_desc_tree::parent, pst_desc_tree::parent_d_id, pst_desc_tree::prev, and pst_getDptr().
Referenced by pst_build_desc_ptr(), and pst_getTopOfFolders().
|
static |
for "compressible" encryption, just a simple substitution cipher, plaintext = comp_enc[ciphertext]; for "strong" encryption, this is the first rotor of an Enigma 3 rotor cipher.
Definition at line 209 of file libpst.c.
Referenced by pst_decrypt().
|
static |
for "strong" encryption, this is the second rotor of an Enigma 3 rotor cipher.
Definition at line 230 of file libpst.c.
Referenced by pst_decrypt().
|
static |
for "strong" encryption, this is the third rotor of an Enigma 3 rotor cipher.
Definition at line 251 of file libpst.c.
Referenced by pst_decrypt().