GMime Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#define BASE64_ENCODE_LEN (x) #define QP_ENCODE_LEN (x) time_t g_mime_utils_header_decode_date (const gchar *in, gint *saveoffset); gchar* g_mime_utils_header_format_date (time_t time, gint offset); gchar* g_mime_utils_header_fold (const gchar *in); gchar* g_mime_utils_header_printf (const gchar *format, ...); gchar* g_mime_utils_quote_string (const gchar *string); void g_mime_utils_unquote_string (gchar *string); gboolean g_mime_utils_text_is_8bit (const guchar *text, guint len); GMimePartEncodingType g_mime_utils_best_encoding (const guchar *text, guint len); gchar* g_mime_utils_8bit_header_decode (const guchar *in); gchar* g_mime_utils_8bit_header_encode (const guchar *in); gchar* g_mime_utils_8bit_header_encode_phrase (const guchar *in); gint g_mime_utils_base64_decode_step (const guchar *in, gint inlen, guchar *out, gint *state, guint *save); gint g_mime_utils_base64_encode_step (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); gint g_mime_utils_base64_encode_close (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); gint g_mime_utils_uudecode_step (const guchar *in, gint inlen, guchar *out, gint *state, guint32 *save, gchar *uulen); gint g_mime_utils_quoted_decode_step (const guchar *in, gint inlen, guchar *out, gint *savestate, gint *saved); gint g_mime_utils_quoted_encode_step (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); gint g_mime_utils_quoted_encode_close (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); |
#define BASE64_ENCODE_LEN(x) ((guint) ((x) * 5 / 3) + 4) /* conservative would be ((x * 4 / 3) + 4) */ |
#define QP_ENCODE_LEN(x) ((guint) ((x) * 7 / 2) + 4) /* conservative would be ((x * 3) + 4) */ |
time_t g_mime_utils_header_decode_date (const gchar *in, gint *saveoffset); |
gchar* g_mime_utils_header_format_date (time_t time, gint offset); |
void g_mime_utils_unquote_string (gchar *string); |
Unquotes and unescapes a string.
GMimePartEncodingType g_mime_utils_best_encoding (const guchar *text, guint len); |
gchar* g_mime_utils_8bit_header_encode_phrase (const guchar *in); |
gint g_mime_utils_base64_decode_step (const guchar *in, gint inlen, guchar *out, gint *state, guint *save); |
gint g_mime_utils_base64_encode_step (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); |
in : | input stream |
inlen : | length of the input |
out : | output string |
state : | holds the number of bits that are stored in save |
save : | leftover bits that have not yet been encoded |
Returns : | the number of bytes encoded. Performs an 'encode step', only encodes blocks of 3 characters to the output at a time, saves left-over state in state and save (initialise to 0 on first invocation). |
gint g_mime_utils_base64_encode_close (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); |
in : | input stream |
inlen : | length of the input |
out : | output string |
state : | holds the number of bits that are stored in save |
save : | leftover bits that have not yet been encoded |
Returns : | the number of bytes encoded. Call this when finished encoding data with base64_encode_step to flush off the last little bit. |
gint g_mime_utils_uudecode_step (const guchar *in, gint inlen, guchar *out, gint *state, guint32 *save, gchar *uulen); |
in : | input stream |
inlen : | max length of data to decode ( normally strlen(in) ??) |
out : | output stream |
state : | holds the number of bits that are stored in save |
save : | leftover bits that have not yet been decoded |
uulen : | holds the value of the length-char which is used to calculate how many more chars need to be decoded for that 'line' |
Returns : | the number of bytes decoded. Performs a 'uudecode step' on a chunk of uuencoded data. Assumes the "begin <mode> <file name>" line has been stripped off. |
gint g_mime_utils_quoted_decode_step (const guchar *in, gint inlen, guchar *out, gint *savestate, gint *saved); |
gint g_mime_utils_quoted_encode_step (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); |
in : | input stream |
inlen : | length of the input |
out : | output string |
state : | holds the number of bits that are stored in save |
save : | leftover bits that have not yet been encoded |
Returns : | the number of bytes encoded. Performs an 'encode step', saves left-over state in state and save (initialise to -1 on first invocation). |
gint g_mime_utils_quoted_encode_close (const guchar *in, gint inlen, guchar *out, gint *state, gint *save); |
in : | input stream |
inlen : | length of the input |
out : | output string |
state : | holds the number of bits that are stored in save |
save : | leftover bits that have not yet been encoded |
Returns : | the number of bytes encoded. Call this when finished encoding data with quoted_encode_step to flush off the last little bit. |