#include "common.h"Include dependency graph for libpst.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | pst_entryid |
| struct | pst_index_ll |
| struct | pst_id2_tree |
| struct | pst_desc_tree |
| struct | pst_string |
| The string is either utf8 encoded, or it is in the code page specified by the containing mapi object. More... | |
| struct | pst_binary |
| a simple wrapper for binary blobs More... | |
| struct | pst_item_email |
| This contains the email related mapi elements. More... | |
| struct | pst_item_folder |
| This contains the folder related mapi elements. More... | |
| struct | pst_item_message_store |
| This contains the message store related mapi elements. More... | |
| struct | pst_item_contact |
| This contains the contact related mapi elements. More... | |
| struct | pst_item_attach |
| This contains the attachment related mapi elements. More... | |
| struct | pst_item_extra_field |
| linked list of extra header fields More... | |
| struct | pst_item_journal |
| This contains the journal related mapi elements. More... | |
| struct | pst_item_appointment |
| This contains the appointment related mapi elements. More... | |
| struct | pst_item |
| This contains the common mapi elements, and pointers to structures for each major mapi item type. More... | |
| struct | pst_x_attrib_ll |
| Linked list of extended attributes. More... | |
| struct | pst_block_recorder |
| this is only used for internal debugging More... | |
| struct | pst_file |
Defines | |
| #define | PST_TYPE_NOTE 1 |
| #define | PST_TYPE_APPOINTMENT 8 |
| #define | PST_TYPE_CONTACT 9 |
| #define | PST_TYPE_JOURNAL 10 |
| #define | PST_TYPE_STICKYNOTE 11 |
| #define | PST_TYPE_TASK 12 |
| #define | PST_TYPE_OTHER 13 |
| #define | PST_TYPE_REPORT 14 |
| #define | PST_NO_ENCRYPT 0 |
| #define | PST_COMP_ENCRYPT 1 |
| #define | PST_ENCRYPT 2 |
| #define | PST_MAP_ATTRIB (uint32_t)1 |
| #define | PST_MAP_HEADER (uint32_t)2 |
| #define | PST_ATTRIB_HEADER -1 |
| #define | PST_FREEBUSY_FREE 0 |
| #define | PST_FREEBUSY_TENTATIVE 1 |
| #define | PST_FREEBUSY_BUSY 2 |
| #define | PST_FREEBUSY_OUT_OF_OFFICE 3 |
| #define | PST_APP_LABEL_NONE 0 |
| #define | PST_APP_LABEL_IMPORTANT 1 |
| #define | PST_APP_LABEL_BUSINESS 2 |
| #define | PST_APP_LABEL_PERSONAL 3 |
| #define | PST_APP_LABEL_VACATION 4 |
| #define | PST_APP_LABEL_MUST_ATTEND 5 |
| #define | PST_APP_LABEL_TRAVEL_REQ 6 |
| #define | PST_APP_LABEL_NEEDS_PREP 7 |
| #define | PST_APP_LABEL_BIRTHDAY 8 |
| #define | PST_APP_LABEL_ANNIVERSARY 9 |
| #define | PST_APP_LABEL_PHONE_CALL 10 |
| #define | PST_APP_RECUR_NONE 0 |
| #define | PST_APP_RECUR_DAILY 1 |
| #define | PST_APP_RECUR_WEEKLY 2 |
| #define | PST_APP_RECUR_MONTHLY 3 |
| #define | PST_APP_RECUR_YEARLY 4 |
Typedefs | |
| typedef pst_entryid | pst_entryid |
| typedef pst_index_ll | pst_index_ll |
| typedef pst_id2_tree | pst_id2_tree |
| typedef pst_desc_tree | pst_desc_tree |
| typedef pst_string | pst_string |
| The string is either utf8 encoded, or it is in the code page specified by the containing mapi object. | |
| typedef pst_binary | pst_binary |
| a simple wrapper for binary blobs | |
| typedef pst_item_email | pst_item_email |
| This contains the email related mapi elements. | |
| typedef pst_item_folder | pst_item_folder |
| This contains the folder related mapi elements. | |
| typedef pst_item_message_store | pst_item_message_store |
| This contains the message store related mapi elements. | |
| typedef pst_item_contact | pst_item_contact |
| This contains the contact related mapi elements. | |
| typedef pst_item_attach | pst_item_attach |
| This contains the attachment related mapi elements. | |
| typedef pst_item_extra_field | pst_item_extra_field |
| linked list of extra header fields | |
| typedef pst_item_journal | pst_item_journal |
| This contains the journal related mapi elements. | |
| typedef pst_item_appointment | pst_item_appointment |
| This contains the appointment related mapi elements. | |
| typedef pst_item | pst_item |
| This contains the common mapi elements, and pointers to structures for each major mapi item type. | |
| typedef pst_x_attrib_ll | pst_x_attrib_ll |
| Linked list of extended attributes. | |
| typedef pst_block_recorder | pst_block_recorder |
| this is only used for internal debugging | |
| typedef pst_file | pst_file |
Functions | |
| int | pst_open (pst_file *pf, char *name) |
| Open a pst file. | |
| int | pst_load_index (pst_file *pf) |
| Load the index entries from the pst file. | |
| int | pst_load_extended_attributes (pst_file *pf) |
| Load the extended attribute mapping table from the pst file. | |
| int | pst_close (pst_file *pf) |
| Close a pst file. | |
| pst_desc_tree * | pst_getTopOfFolders (pst_file *pf, pst_item *root) |
| Get the top of folders descriptor tree. | |
| size_t | pst_attach_to_mem (pst_file *pf, pst_item_attach *attach, char **b) |
| Assemble the binary attachment into a single buffer. | |
| size_t | pst_attach_to_file (pst_file *pf, pst_item_attach *attach, FILE *fp) |
| Write a binary attachment to a file. | |
| 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. | |
| pst_desc_tree * | pst_getNextDptr (pst_desc_tree *d) |
| Walk the descriptor tree. | |
| pst_item * | pst_parse_item (pst_file *pf, pst_desc_tree *d_ptr, pst_id2_tree *m_head) |
| Assemble a mapi object from a descriptor pointer. | |
| void | pst_freeItem (pst_item *item) |
| Free the item returned by pst_parse_item(). | |
| 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. | |
| int | pst_decrypt (uint64_t i_id, char *buf, size_t size, unsigned char type) |
| Decrypt a block of data from the pst file. | |
| size_t | pst_ff_getIDblock_dec (pst_file *pf, uint64_t i_id, char **buf) |
| Get an ID block from the file using pst_ff_getIDblock() and decrypt if necessary. | |
| size_t | pst_ff_getIDblock (pst_file *pf, uint64_t i_id, char **buf) |
| Read a block of data from the file into memory. | |
| size_t | pst_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
| fwrite with checking for null pointer. | |
| char * | pst_rfc2426_escape (char *str) |
| Add any necessary escape characters for rfc2426 vcard format. | |
| char * | pst_rfc2425_datetime_format (FILETIME *ft) |
| 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. | |
| char * | pst_rfc2445_datetime_format (FILETIME *ft) |
| Convert a FILETIME into rfc2445 date/time format 19531015T231000Z. | |
| const char * | pst_default_charset (pst_item *item) |
| Get the default character set for this item. | |
| void | pst_convert_utf8_null (pst_item *item, pst_string *str) |
| Convert str to utf8 if possible; null strings are preserved. | |
| void | pst_convert_utf8 (pst_item *item, pst_string *str) |
| Convert str to utf8 if possible; null strings are converted into empty strings. | |
|
|
Definition at line 63 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 62 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 56 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 55 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 59 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 61 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 54 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 57 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 64 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 60 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 58 of file libpst.h. Referenced by write_appointment(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 45 of file libpst.h. Referenced by pst_process(). |
|
|
Definition at line 37 of file libpst.h. Referenced by main(). |
|
|
|
|
|
Definition at line 50 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 48 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 51 of file libpst.h. Referenced by write_appointment(). |
|
|
Definition at line 49 of file libpst.h. Referenced by write_appointment(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 27 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 28 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 29 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 26 of file libpst.h. Referenced by mk_recurse_dir(), and process(). |
|
|
Definition at line 32 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 33 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 30 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
Definition at line 31 of file libpst.h. Referenced by mk_recurse_dir(). |
|
|
a simple wrapper for binary blobs
|
|
|
this is only used for internal debugging
|
|
|
Referenced by dumper(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This contains the common mapi elements, and pointers to structures for each major mapi item type. It represents a complete mapi object. Referenced by pst_parse_item(). |
|
|
This contains the appointment related mapi elements.
|
|
|
This contains the attachment related mapi elements.
Referenced by pst_parse_item(), and write_normal_email(). |
|
|
This contains the contact related mapi elements.
|
|
|
This contains the email related mapi elements.
|
|
|
linked list of extra header fields
Referenced by pst_process(). |
|
|
This contains the folder related mapi elements.
|
|
|
This contains the journal related mapi elements.
|
|
|
This contains the message store related mapi elements.
|
|
|
The string is either utf8 encoded, or it is in the code page specified by the containing mapi object. It can be forced into utf8 by calling pst_convert_utf8() or pst_convert_utf8_null(). |
|
|
Linked list of extended attributes. This is used to convert mapi_id values in the pst file into cannonical mapi_id values to be used in this code. This list is kept in sorted order, where the key is the 'map' field. Some mapi_id values are converted to cannonical mapi_id values (PST_MAP_ATTRIB), and others are converted to a string (PST_ATTRIB_HEADER). |
|
||||||||||||||||
|
Write a binary attachment to a file.
Definition at line 544 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_separate_attachment(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Write a binary attachment base64 encoded to a file.
Definition at line 567 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(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Assemble the binary attachment into a single buffer.
Definition at line 522 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. |
Here is the call graph for this function:

|
|
Close a pst file.
Definition at line 360 of file libpst.c. References pst_file::d_head, DEBUG_ENT, DEBUG_RET, pst_file::fp, pst_file::i_head, pst_free_desc(), pst_free_id(), pst_free_xattrib(), WARN, and pst_file::x_head. Referenced by main(). |
Here is the call graph for this function:

|
||||||||||||
|
Convert str to utf8 if possible; null strings are converted into empty strings.
Definition at line 4263 of file libpst.c. References pst_varbuf::b, DEBUG_EMAIL, DEBUG_ENT, DEBUG_RET, pst_string::is_utf8, pst_default_charset(), pst_vb_8bit2utf8(), pst_vballoc(), pst_vbuf, and pst_string::str. Referenced by create_enter_dir(), process(), pst_convert_utf8_null(), and write_normal_email(). |
Here is the call graph for this function:

|
||||||||||||
|
Convert str to utf8 if possible; null strings are preserved.
Definition at line 4252 of file libpst.c. References pst_convert_utf8(), and pst_string::str. Referenced by write_appointment(), write_normal_email(), and write_vcard(). |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Decrypt a block of data from the pst file.
Definition at line 3704 of file libpst.c. References comp_enc, comp_high1, comp_high2, DEBUG_ENT, DEBUG_RET, and WARN. Referenced by main(), pst_ff_compile_ID(), and pst_ff_getIDblock_dec(). |
|
|
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.
Definition at line 4239 of file libpst.c. References pst_item::body_charset, codepage(), pst_item::internet_cpid, pst_item::message_codepage, and pst_string::str. Referenced by pst_convert_utf8(), and write_normal_email(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Read a block of data from the file into memory.
Definition at line 3858 of file libpst.c. References DEBUG_ENT, DEBUG_INDEX, DEBUG_RET, 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(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Get an ID block from the file using pst_ff_getIDblock() and decrypt if necessary.
Definition at line 3835 of file libpst.c. References DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INDEX, 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(). |
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||||||||||
|
fwrite with checking for null pointer.
Definition at line 4066 of file libpst.c. References DEBUG_ENT, DEBUG_RET, and DEBUG_WARN. Referenced by main(), print_pdf(), pst_attach_to_file(), pst_attach_to_file_base64(), pst_ff_compile_ID(), pst_ff_getID2data(), write_email_body(), write_inline_attachment(), and write_separate_attachment(). |
|
||||||||||||
|
Lookup the i_id in the index linked list, and return a pointer to the element.
Definition at line 3553 of file libpst.c. References DEBUG_ENT, DEBUG_INDEX, DEBUG_RET, pst_file::i_head, pst_index_ll::i_id, and pst_index_ll::next. 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(). |
|
|
Walk the descriptor tree.
Definition at line 615 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(). |
|
||||||||||||
|
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.
Definition at line 490 of file libpst.c. References pst_desc_tree::assoc_tree, pst_desc_tree::d_id, DEBUG_ENT, DEBUG_INDEX, 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(). |
Here is the call graph for this function:

|
|
Load the extended attribute mapping table from the pst file.
Definition at line 639 of file libpst.c. References pst_desc_tree::assoc_tree, pst_mapi_object::count_elements, pst_mapi_element::data, DEBUG_EMAIL, DEBUG_ENT, DEBUG_HEXDUMPC, DEBUG_INDEX, 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_ll::map, pst_x_attrib::map, pst_mapi_element::mapi_id, 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_parse_block(), pst_printID2ptr(), pst_wide_to_single(), pst_mapi_element::size, pst_x_attrib::type, pst_mapi_element::type, and pst_file::x_head. Referenced by main(). |
Here is the call graph for this function:

|
|
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().
Definition at line 594 of file libpst.c. References pst_file::d_head, DEBUG_CODE, DEBUG_ENT, DEBUG_INDEX, DEBUG_RET, pst_file::index1, pst_file::index1_back, pst_file::index2, pst_file::index2_back, pst_build_desc_ptr(), pst_build_id_ptr(), pst_printDptr(), and WARN. Referenced by main(). |
Here is the call graph for this function:

|
||||||||||||
|
Open a pst file.
Definition at line 287 of file libpst.c. References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, ENC_TYPE, FILE_SIZE_POINTER, INDEX_BACK, INDEX_POINTER, INDEX_TYPE32, INDEX_TYPE32A, INDEX_TYPE64, INDEX_TYPE64A, INDEX_TYPE_OFFSET, LE32_CPU, pst_getAtPos(), pst_getIntAtPos(), pst_unicode_init(), SECOND_BACK, SECOND_POINTER, and WARN. Referenced by main(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Assemble a mapi object from a descriptor pointer.
Definition at line 1182 of file libpst.c. References pst_desc_tree::assoc_tree, pst_item::attach, pst_id2_tree::child, pst_mapi_object::count_objects, DEBUG_EMAIL, DEBUG_ENT, DEBUG_RET, DEBUG_WARN, deep_copy(), pst_desc_tree::desc, pst_item_attach::i_id, pst_index_ll::i_id, pst_id2_tree::id, pst_item_attach::id2_head, pst_item_attach::id2_val, pst_item_attach::next, pst_build_id2(), pst_free_id2(), pst_free_list(), pst_freeItem(), pst_getID2(), pst_item, pst_item_attach, pst_malloc(), pst_parse_block(), pst_printID2ptr(), and pst_process(). Referenced by dumper(), main(), process(), and write_embedded_message(). |
Here is the call graph for this function:

|
|
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.
Definition at line 4162 of file libpst.c. References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, and pst_fileTimeToStructTM(). Referenced by write_vcard(). |
Here is the call graph for this function:

|
|
Add any necessary escape characters for rfc2426 vcard format.
Definition at line 4098 of file libpst.c. References DEBUG_ENT, DEBUG_RET, and pst_chr_count(). Referenced by process(), write_appointment(), and write_vcard(). |
Here is the call graph for this function:

|
|
Convert a FILETIME into rfc2445 date/time format 19531015T231000Z.
Definition at line 4175 of file libpst.c. References DEBUG_ENT, DEBUG_INFO, DEBUG_RET, and pst_fileTimeToStructTM(). Referenced by process(), and write_appointment(). |
Here is the call graph for this function:

1.3.9.1