comparison src/libpst.h @ 195:320cfcba8058

add python module interface to the shared library for easy scripting. the shared library must never write to stdout or stderr. fix pst_attach_to_mem so the caller does not need to initialize the buffer pointer.
author Carl Byington <carl@five-ten-sg.com>
date Mon, 20 Apr 2009 19:39:26 -0700
parents cf3df962f1e5
children 7c60d6d1c681
comparison
equal deleted inserted replaced
194:885b47107036 195:320cfcba8058
841 * @param pf pointer to uninitialized pst_file structure. This structure 841 * @param pf pointer to uninitialized pst_file structure. This structure
842 * will be filled in by this function. 842 * will be filled in by this function.
843 * @param name name of the file, suitable for fopen(). 843 * @param name name of the file, suitable for fopen().
844 * @return 0 if ok, -1 if error 844 * @return 0 if ok, -1 if error
845 */ 845 */
846 int pst_open(pst_file *pf, char *name); 846 int pst_open(pst_file *pf, const char *name);
847 847
848 848
849 /** Load the index entries from the pst file. This loads both the 849 /** Load the index entries from the pst file. This loads both the
850 * i_id linked list, and the d_id tree, and should normally be the 850 * i_id linked list, and the d_id tree, and should normally be the
851 * first call after pst_open(). 851 * first call after pst_open().
870 /** Get the top of folders descriptor tree. This is the main descriptor tree 870 /** Get the top of folders descriptor tree. This is the main descriptor tree
871 * that needs to be walked to look at every item in the pst file. 871 * that needs to be walked to look at every item in the pst file.
872 * @param pf pointer to the pst_file structure setup by pst_open(). 872 * @param pf pointer to the pst_file structure setup by pst_open().
873 * @param root root item, which can be obtained by pst_parse_item(pf, pf->d.head, NULL). 873 * @param root root item, which can be obtained by pst_parse_item(pf, pf->d.head, NULL).
874 */ 874 */
875 pst_desc_tree* pst_getTopOfFolders(pst_file *pf, pst_item *root); 875 pst_desc_tree* pst_getTopOfFolders(pst_file *pf, const pst_item *root);
876 876
877 877
878 /** Assemble the binary attachment into a single buffer. 878 /** Assemble the binary attachment into a single buffer.
879 * @param pf pointer to the pst_file structure setup by pst_open(). 879 * @param pf pointer to the pst_file structure setup by pst_open().
880 * @param attach pointer to the attachment record 880 * @param attach pointer to the attachment record
932 pst_index_ll* pst_getID(pst_file* pf, uint64_t i_id); 932 pst_index_ll* pst_getID(pst_file* pf, uint64_t i_id);
933 933
934 934
935 /** Decrypt a block of data from the pst file. 935 /** Decrypt a block of data from the pst file.
936 * @param i_id identifier of this block, needed as part of the key for the enigma cipher 936 * @param i_id identifier of this block, needed as part of the key for the enigma cipher
937 * @param buf pointer to the buffer to be decrypted 937 * @param buf pointer to the buffer to be decrypted in place
938 * @param size size of the buffer 938 * @param size size of the buffer
939 * @param type 939 * @param type
940 @li 0 PST_NO_ENCRYPT, none 940 @li 0 PST_NO_ENCRYPT, none
941 @li 1 PST_COMP_ENCRYPT, simple byte substitution cipher with fixed key 941 @li 1 PST_COMP_ENCRYPT, simple byte substitution cipher with fixed key
942 @li 2 PST_ENCRYPT, german enigma 3 rotor cipher with fixed key 942 @li 2 PST_ENCRYPT, german enigma 3 rotor cipher with fixed key
988 /** Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z 988 /** Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z
989 * which is the same as one of the forms in the ISO3601 standard 989 * which is the same as one of the forms in the ISO3601 standard
990 * @param ft time to be converted 990 * @param ft time to be converted
991 * @return time in rfc2425 format 991 * @return time in rfc2425 format
992 */ 992 */
993 char * pst_rfc2425_datetime_format(FILETIME *ft); 993 char * pst_rfc2425_datetime_format(const FILETIME *ft);
994 994
995 995
996 /** Convert a FILETIME into rfc2445 date/time format 19531015T231000Z 996 /** Convert a FILETIME into rfc2445 date/time format 19531015T231000Z
997 * @param ft time to be converted 997 * @param ft time to be converted
998 * @return time in rfc2445 format 998 * @return time in rfc2445 format
999 */ 999 */
1000 char * pst_rfc2445_datetime_format(FILETIME *ft); 1000 char * pst_rfc2445_datetime_format(const FILETIME *ft);
1001 1001
1002 1002
1003 /** Get the default character set for this item. This is used to find 1003 /** Get the default character set for this item. This is used to find
1004 * the charset for pst_string elements that are not already in utf8 encoding. 1004 * the charset for pst_string elements that are not already in utf8 encoding.
1005 * @param item pointer to the mapi item of interest 1005 * @param item pointer to the mapi item of interest