comparison src/libpst.h @ 211:94bde95d7e18

the shared library interface should now be thread safe
author Carl Byington <carl@five-ten-sg.com>
date Mon, 08 Jun 2009 11:49:39 -0700
parents 268458c79e9b
children 7fcff97ca5a9
comparison
equal deleted inserted replaced
210:2d1111fd70cf 211:94bde95d7e18
1013 */ 1013 */
1014 size_t pst_fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream); 1014 size_t pst_fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream);
1015 1015
1016 1016
1017 /** Add any necessary escape characters for rfc2426 vcard format 1017 /** Add any necessary escape characters for rfc2426 vcard format
1018 * @param str pointer to input string 1018 * @param[in] str pointer to input string
1019 * @param[in,out] result pointer to a char* pointer that may be realloc'ed if needed
1020 * @param[in,out] resultlen size of the result buffer
1019 * @return pointer to output string, either the input pointer if 1021 * @return pointer to output string, either the input pointer if
1020 * there are no characters that need escapes, or a pointer 1022 * there are no characters that need escapes, or a pointer
1021 * to a different buffer containing the escaped string. In 1023 * to a possibly realloc'ed result buffer.
1022 * either case, you don't need to free this returned pointer. 1024 */
1023 */ 1025 char* pst_rfc2426_escape(char* str, char** result, size_t* resultlen);
1024 char* pst_rfc2426_escape(char *str);
1025 1026
1026 1027
1027 /** Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z 1028 /** Convert a FILETIME into rfc2425 date/time format 1953-10-15T23:10:00Z
1028 * which is the same as one of the forms in the ISO3601 standard 1029 * which is the same as one of the forms in the ISO3601 standard
1029 * @param[in] ft time to be converted 1030 * @param[in] ft time to be converted
1033 */ 1034 */
1034 char* pst_rfc2425_datetime_format(const FILETIME* ft, int buflen, char* result); 1035 char* pst_rfc2425_datetime_format(const FILETIME* ft, int buflen, char* result);
1035 1036
1036 1037
1037 /** Convert a FILETIME into rfc2445 date/time format 19531015T231000Z 1038 /** Convert a FILETIME into rfc2445 date/time format 19531015T231000Z
1038 * @param[in] ft time to be converted 1039 * @param[in] ft time to be converted
1039 * @param[in] buflen length of the output buffer 1040 * @param[in] buflen length of the output buffer
1040 * @param[out] result pointer to output buffer, must be at least 30 bytes 1041 * @param[out] result pointer to output buffer, must be at least 30 bytes
1041 * @return time in rfc2445 format 1042 * @return time in rfc2445 format
1042 */ 1043 */
1043 char* pst_rfc2445_datetime_format(const FILETIME* ft, int buflen, char* result); 1044 char* pst_rfc2445_datetime_format(const FILETIME* ft, int buflen, char* result);
1044 1045
1045 1046
1046 /** Convert the current time rfc2445 date/time format 19531015T231000Z 1047 /** Convert the current time rfc2445 date/time format 19531015T231000Z
1048 * @param[in] buflen length of the output buffer
1049 * @param[out] result pointer to output buffer, must be at least 30 bytes
1047 * @return time in rfc2445 format 1050 * @return time in rfc2445 format
1048 */ 1051 */
1049 char* pst_rfc2445_datetime_format_now(int buflen, char* result); 1052 char* pst_rfc2445_datetime_format_now(int buflen, char* result);
1050 1053
1051 1054
1052 /** Get the default character set for this item. This is used to find 1055 /** Get the default character set for this item. This is used to find
1053 * the charset for pst_string elements that are not already in utf8 encoding. 1056 * the charset for pst_string elements that are not already in utf8 encoding.
1054 * @param item pointer to the mapi item of interest 1057 * @param item pointer to the mapi item of interest
1058 * @param[in] buflen length of the output buffer
1059 * @param[out] result pointer to output buffer, must be at least 30 bytes
1055 * @return default character set as a string useable by iconv() 1060 * @return default character set as a string useable by iconv()
1056 */ 1061 */
1057 const char* pst_default_charset(pst_item *item); 1062 const char* pst_default_charset(pst_item *item, int buflen, char* result);
1058 1063
1059 1064
1060 /** Convert str to utf8 if possible; null strings are preserved. 1065 /** Convert str to utf8 if possible; null strings are preserved.
1061 * @param item pointer to the containing mapi item 1066 * @param item pointer to the containing mapi item
1062 * @param str pointer to the mapi string of interest 1067 * @param str pointer to the mapi string of interest