| Top |
Functions
Types and Values
| enum | CamelTransferEncoding |
| struct | camel_header_references |
| struct | camel_header_param |
| CamelContentType | |
| struct | camel_header_raw |
| CamelContentDisposition | |
| enum | camel_header_address_t |
| struct | camel_header_address |
| struct | camel_header_newsgroup |
Functions
CAMEL_UUDECODE_STATE_MASK
#define CAMEL_UUDECODE_STATE_MASK (CAMEL_UUDECODE_STATE_BEGIN | CAMEL_UUDECODE_STATE_END)
camel_mktime_utc ()
time_t
camel_mktime_utc (struct tm *tm);
Like mktime(3), but assumes UTC instead of local timezone.
Since 3.4
camel_localtime_with_offset ()
void camel_localtime_with_offset (time_t tt,struct tm *tm,gint *offset);
Converts the calendar time representation tt
to a broken-down
time representation, stored in tm
, and provides the offset in
seconds from UTC time, stored in offset
.
Parameters
tt |
the time_t to convert |
|
tm |
the tm to store the result in |
|
offset |
the gint to store the offset in |
camel_header_address_new_name ()
struct _camel_header_address * camel_header_address_new_name (const gchar *name,const gchar *addr);
camel_header_address_new_group ()
struct _camel_header_address *
camel_header_address_new_group (const gchar *name);
camel_header_address_unref ()
void
camel_header_address_unref (struct _camel_header_address *addrlist);
camel_header_address_set_name ()
void camel_header_address_set_name (struct _camel_header_address *addrlist,const gchar *name);
camel_header_address_set_addr ()
void camel_header_address_set_addr (struct _camel_header_address *addrlist,const gchar *addr);
camel_header_address_set_members ()
void camel_header_address_set_members (struct _camel_header_address *addrlist,struct _camel_header_address *group);
camel_header_address_add_member ()
void camel_header_address_add_member (struct _camel_header_address *addrlist,struct _camel_header_address *member);
camel_header_address_list_append_list ()
void camel_header_address_list_append_list (struct _camel_header_address **addrlistp,struct _camel_header_address **addrs);
camel_header_address_list_append ()
void camel_header_address_list_append (struct _camel_header_address **addrlistp,struct _camel_header_address *addr);
camel_header_address_list_clear ()
void
camel_header_address_list_clear (struct _camel_header_address **addrlistp);
camel_header_address_decode ()
struct _camel_header_address * camel_header_address_decode (const gchar *in,const gchar *charset);
camel_header_mailbox_decode ()
struct _camel_header_address * camel_header_mailbox_decode (const gchar *in,const gchar *charset);
camel_header_address_list_encode ()
gchar *
camel_header_address_list_encode (struct _camel_header_address *addrlist);
camel_header_address_list_format ()
gchar *
camel_header_address_list_format (struct _camel_header_address *addrlist);
camel_header_param_list_decode ()
struct _camel_header_param *
camel_header_param_list_decode (const gchar *in);
camel_header_set_param ()
struct _camel_header_param * camel_header_set_param (struct _camel_header_param **paramsp,const gchar *name,const gchar *value);
Set a parameter in the list.
camel_header_param_list_format_append ()
void camel_header_param_list_format_append (GString *out,struct _camel_header_param *params);
camel_header_param_list_format ()
gchar *
camel_header_param_list_format (struct _camel_header_param *params);
camel_header_param_list_free ()
void
camel_header_param_list_free (struct _camel_header_param *params);
Free the list of params.
camel_content_type_new ()
CamelContentType * camel_content_type_new (const gchar *type,const gchar *subtype);
Create a new CamelContentType.
camel_content_type_unref ()
void
camel_content_type_unref (CamelContentType *content_type);
Unrefs, and potentially frees, the content type.
camel_content_type_ref ()
void
camel_content_type_ref (CamelContentType *content_type);
Refs the content type.
camel_content_type_param ()
const gchar * camel_content_type_param (CamelContentType *content_type,const gchar *name);
Searches the params on s CamelContentType for a param named name
and gets the value.
camel_content_type_set_param ()
void camel_content_type_set_param (CamelContentType *content_type,const gchar *name,const gchar *value);
Set a parameter on content_type
.
camel_content_type_is ()
gint camel_content_type_is (CamelContentType *content_type,const gchar *type,const gchar *subtype);
The subtype of "*" will match any subtype. If ct
is NULL, then
it will match the type "text/plain".
Parameters
content_type |
A content type specifier, or |
|
type |
A type to check against. |
|
subtype |
A subtype to check against, or "*" to match any subtype. |
camel_content_disposition_decode ()
CamelContentDisposition *
camel_content_disposition_decode (const gchar *in);
camel_content_disposition_ref ()
void
camel_content_disposition_ref (CamelContentDisposition *disposition);
camel_content_disposition_unref ()
void
camel_content_disposition_unref (CamelContentDisposition *disposition);
camel_content_disposition_format ()
gchar *
camel_content_disposition_format (CamelContentDisposition *disposition);
camel_content_transfer_encoding_decode ()
gchar *
camel_content_transfer_encoding_decode
(const gchar *in);
camel_header_raw_append ()
void camel_header_raw_append (struct _camel_header_raw **list,const gchar *name,const gchar *value,gint offset);
camel_header_raw_append_parse ()
void camel_header_raw_append_parse (struct _camel_header_raw **list,const gchar *header,gint offset);
camel_header_raw_find ()
const gchar * camel_header_raw_find (struct _camel_header_raw **list,const gchar *name,gint *offset);
camel_header_raw_find_next ()
const gchar * camel_header_raw_find_next (struct _camel_header_raw **list,const gchar *name,gint *offset,const gchar *last);
camel_header_raw_replace ()
void camel_header_raw_replace (struct _camel_header_raw **list,const gchar *name,const gchar *value,gint offset);
camel_header_raw_remove ()
void camel_header_raw_remove (struct _camel_header_raw **list,const gchar *name);
camel_header_raw_check_mailing_list ()
gchar *
camel_header_raw_check_mailing_list (struct _camel_header_raw **list);
camel_header_token_decode ()
gchar *
camel_header_token_decode (const gchar *in);
Gets the first token in the string according to the rules of rfc0822.
camel_header_decode_int ()
gint
camel_header_decode_int (const gchar **in);
Extracts an integer token from in
and updates the pointer to point
to after the end of the integer token (sort of like strtol).
camel_header_decode_string ()
gchar * camel_header_decode_string (const gchar *in,const gchar *default_charset);
Decodes rfc2047 encoded-word tokens
camel_header_encode_string ()
gchar *
camel_header_encode_string (const guchar *in);
Encodes a 'text' header according to the rules of rfc2047.
camel_header_format_ctext ()
gchar * camel_header_format_ctext (const gchar *in,const gchar *default_charset);
Decodes a header which contains rfc2047 encoded-word tokens that may or may not be within a comment.
camel_header_encode_phrase ()
gchar *
camel_header_encode_phrase (const guchar *in);
Encodes a 'phrase' header according to the rules in rfc2047.
camel_header_decode_date ()
time_t camel_header_decode_date (const gchar *str,gint *tz_offset);
Decodes the rfc822 date string and saves the GMT offset into
tz_offset
if non-NULL.
camel_header_format_date ()
gchar * camel_header_format_date (time_t date,gint tz_offset);
Allocates a string buffer containing the rfc822 formatted date
string represented by time
and tz_offset
.
camel_header_msgid_decode ()
gchar *
camel_header_msgid_decode (const gchar *in);
Extract a message-id token from in
.
camel_header_contentid_decode ()
gchar *
camel_header_contentid_decode (const gchar *in);
Extract a content-id from in
.
camel_header_msgid_generate ()
gchar *
camel_header_msgid_generate (const gchar *domain);
Either the domain
is used, or the user's local hostname,
in case it's NULL or empty.
camel_header_references_inreplyto_decode ()
struct _camel_header_references *
camel_header_references_inreplyto_decode
(const gchar *in);
camel_header_references_decode ()
struct _camel_header_references *
camel_header_references_decode (const gchar *in);
camel_header_references_list_clear ()
void
camel_header_references_list_clear (struct _camel_header_references **list);
camel_header_references_list_append_asis ()
void camel_header_references_list_append_asis (struct _camel_header_references **list,gchar *ref);
camel_header_references_list_size ()
gint
camel_header_references_list_size (struct _camel_header_references **list);
camel_header_references_dup ()
struct _camel_header_references *
camel_header_references_dup (const struct _camel_header_references *list);
camel_header_newsgroups_decode ()
struct _camel_header_newsgroup *
camel_header_newsgroups_decode (const gchar *in);
camel_header_newsgroups_free ()
void
camel_header_newsgroups_free (struct _camel_header_newsgroup *ng);
camel_transfer_encoding_to_string ()
const gchar *
camel_transfer_encoding_to_string (CamelTransferEncoding encoding);
camel_transfer_encoding_from_string ()
CamelTransferEncoding
camel_transfer_encoding_from_string (const gchar *string);
camel_uudecode_step ()
gsize camel_uudecode_step (guchar *in,gsize inlen,guchar *out,gint *state,guint32 *save);
Uudecodes a chunk of data. Performs a 'decode step' on a chunk of uuencoded data. Assumes the "begin mode filename" line has been stripped off.
camel_uuencode_step ()
gsize camel_uuencode_step (guchar *in,gsize len,guchar *out,guchar *uubuf,gint *state,guint32 *save);
Uuencodes a chunk of data. Performs an 'encode step', only encodes
blocks of 45 characters to the output at a time, saves left-over
state in uubuf
, state
and save
(initialize to 0 on first
invocation).
camel_uuencode_close ()
gsize camel_uuencode_close (guchar *in,gsize len,guchar *out,guchar *uubuf,gint *state,guint32 *save);
Uuencodes a chunk of data. Call this when finished encoding data
with camel_uuencode_step() to flush off the last little bit.
camel_quoted_decode_step ()
gsize camel_quoted_decode_step (guchar *in,gsize len,guchar *out,gint *savestate,gint *saveme);
Decodes a block of quoted-printable encoded data. Performs a 'decode step' on a chunk of QP encoded data.
camel_quoted_encode_step ()
gsize camel_quoted_encode_step (guchar *in,gsize len,guchar *out,gint *state,gint *save);
Quoted-printable encodes a block of text. Performs an 'encode step', saves left-over state in state and save (initialise to -1 on first invocation).
camel_quoted_encode_close ()
gsize camel_quoted_encode_close (guchar *in,gsize len,guchar *out,gint *state,gint *save);
Quoted-printable encodes a block of text. Call this when finished
encoding data with camel_quoted_encode_step() to flush off
the last little bit.
camel_mime_is_ctrl()
#define camel_mime_is_ctrl(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_CTRL) != 0)
camel_mime_is_lwsp()
#define camel_mime_is_lwsp(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_LWSP) != 0)
camel_mime_is_tspecial()
#define camel_mime_is_tspecial(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_TSPECIAL) != 0)
camel_mime_is_type()
#define camel_mime_is_type(x, t) ((camel_mime_special_table[(guchar)(x)] & (t)) != 0)
camel_mime_is_ttoken()
#define camel_mime_is_ttoken(x) ((camel_mime_special_table[(guchar)(x)] & (CAMEL_MIME_IS_TSPECIAL|CAMEL_MIME_IS_LWSP|CAMEL_MIME_IS_CTRL)) == 0)
camel_mime_is_atom()
#define camel_mime_is_atom(x) ((camel_mime_special_table[(guchar)(x)] & (CAMEL_MIME_IS_SPECIAL|CAMEL_MIME_IS_SPACE|CAMEL_MIME_IS_CTRL)) == 0)
camel_mime_is_dtext()
#define camel_mime_is_dtext(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_DSPECIAL) == 0)
camel_mime_is_fieldname()
#define camel_mime_is_fieldname(x) ((camel_mime_special_table[(guchar)(x)] & (CAMEL_MIME_IS_CTRL|CAMEL_MIME_IS_SPACE)) == 0)
camel_mime_is_qpsafe()
#define camel_mime_is_qpsafe(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_QPSAFE) != 0)
camel_mime_is_especial()
#define camel_mime_is_especial(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_ESPECIAL) != 0)
camel_mime_is_psafe()
#define camel_mime_is_psafe(x) ((camel_mime_special_table[(guchar)(x)] & CAMEL_MIME_IS_PSAFE) != 0)
Types and Values
struct camel_header_references
struct camel_header_references {
struct _camel_header_references *next;
gchar *id;
};
struct camel_header_param
struct camel_header_param {
struct _camel_header_param *next;
gchar *name;
gchar *value;
};
Searches params
for a param named name
and gets the value.
CamelContentType
typedef struct {
gchar *type;
gchar *subtype;
struct _camel_header_param *params;
guint refcount;
} CamelContentType;
struct camel_header_raw
struct camel_header_raw {
struct _camel_header_raw *next;
gchar *name;
gchar *value;
gint offset; /* in file, if known */
};
CamelContentDisposition
typedef struct {
gchar *disposition;
struct _camel_header_param *params;
guint refcount;
} CamelContentDisposition;
struct camel_header_address
struct camel_header_address {
struct _camel_header_address *next;
camel_header_address_t type;
gchar *name;
union {
gchar *addr;
struct _camel_header_address *members;
} v;
guint refcount;
};
