Mercurial > libpst
comparison src/libpst.h @ 298:201464dd356e
add default character set for items where the pst file does not specify a character set
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 02 Aug 2011 17:02:39 -0700 |
parents | 8b3a827b71f4 |
children | c4537664ff50 |
comparison
equal
deleted
inserted
replaced
297:8b3a827b71f4 | 298:201464dd356e |
---|---|
758 | 758 |
759 /** This contains the common mapi elements, and pointers to structures for | 759 /** This contains the common mapi elements, and pointers to structures for |
760 * each major mapi item type. It represents a complete mapi object. | 760 * each major mapi item type. It represents a complete mapi object. |
761 */ | 761 */ |
762 typedef struct pst_item { | 762 typedef struct pst_item { |
763 /** pointer to the pst_file */ | |
764 struct pst_file *pf; | |
763 /** block id that can be used to generate uid */ | 765 /** block id that can be used to generate uid */ |
764 uint64_t block_id; | 766 uint64_t block_id; |
765 /** email mapi elements */ | 767 /** email mapi elements */ |
766 pst_item_email *email; | 768 pst_item_email *email; |
767 /** folder mapi elements */ | 769 /** folder mapi elements */ |
876 FILE* fp; | 878 FILE* fp; |
877 /** original cwd when the file was opened */ | 879 /** original cwd when the file was opened */ |
878 char* cwd; | 880 char* cwd; |
879 /** original file name when the file was opened */ | 881 /** original file name when the file was opened */ |
880 char* fname; | 882 char* fname; |
883 /** default character set for items without one */ | |
884 char* charset; | |
881 /** the head and tail of the linked list of index structures */ | 885 /** the head and tail of the linked list of index structures */ |
882 pst_index_ll *i_head, *i_tail; | 886 pst_index_ll *i_head, *i_tail; |
883 /** the head and tail of the top level of the descriptor tree */ | 887 /** the head and tail of the top level of the descriptor tree */ |
884 pst_desc_tree *d_head, *d_tail; | 888 pst_desc_tree *d_head, *d_tail; |
885 /** the head of the extended attributes linked list */ | 889 /** the head of the extended attributes linked list */ |
914 unsigned char ind_type; | 918 unsigned char ind_type; |
915 } pst_file; | 919 } pst_file; |
916 | 920 |
917 | 921 |
918 /** Open a pst file. | 922 /** Open a pst file. |
919 * @param pf pointer to uninitialized pst_file structure. This structure | 923 * @param pf pointer to uninitialized pst_file structure. This structure |
920 * will be filled in by this function. | 924 * will be filled in by this function. |
921 * @param name name of the file, suitable for fopen(). | 925 * @param name name of the file, suitable for fopen(). |
926 * @param charset default charset for item with unspecified character sets | |
922 * @return 0 if ok, -1 if error | 927 * @return 0 if ok, -1 if error |
923 */ | 928 */ |
924 int pst_open(pst_file *pf, const char *name); | 929 int pst_open(pst_file *pf, const char *name, const char *charset); |
925 | 930 |
926 | 931 |
927 /** Reopen the pst file after a fork | 932 /** Reopen the pst file after a fork |
928 * @param pf pointer to the pst_file structure setup by pst_open(). | 933 * @param pf pointer to the pst_file structure setup by pst_open(). |
929 * @return 0 if ok, -1 if error | 934 * @return 0 if ok, -1 if error |