aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-08-26 05:01:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-08-26 05:01:55 +0800
commite74d9ca1cc1bd40982341aa85600fbc0b4f31824 (patch)
treef247f13df83c3440be8cf03592e1a2c233d16a54 /camel/camel-mime-utils.h
parent0357dde828171cb027545ca577a57a39f23b37f0 (diff)
downloadgsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar.gz
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar.bz2
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar.lz
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar.xz
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.tar.zst
gsoc2013-evolution-e74d9ca1cc1bd40982341aa85600fbc0b4f31824.zip
Namespaced.
2003-08-25 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.[c,h]: Namespaced. * camel-data-wrapper.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-digest-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-filter-driver.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-filter-search.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-folder-search.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-folder-summary.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-http-stream.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-http-stream.h: updated for namespace changed made to camel-mime-utils.[c,h] * camel-internet-address.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-medium.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-message.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-parser.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-part-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-part.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-movemail.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart-encrypted.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart-signed.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-search-private.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-types.h: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-store-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imapp/camel-imapp-utils.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-local-summary.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-maildir-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-mbox-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-spool-summary.h: updated for namespace changed made to camel-mime-utils.[c,h] * providers/nntp/camel-nntp-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/nntp/camel-nntp-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/pop3/camel-pop3-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/sendmail/camel-sendmail-transport.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/smtp/camel-smtp-transport.c: updated for namespace changed made to camel-mime-utils.[c,h] svn path=/trunk/; revision=22355
Diffstat (limited to 'camel/camel-mime-utils.h')
-rw-r--r--camel/camel-mime-utils.h188
1 files changed, 94 insertions, 94 deletions
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index b58bcbea72..7035b7696d 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 2000 Ximian Inc.
+ * Copyright (C) 2000-2003 Ximian Inc.
*
* Authors: Michael Zucchi <notzed@ximian.com>
* Jeffrey Stedfast <fejj@ximian.com>
@@ -32,9 +32,9 @@ extern "C" {
#include <time.h>
#include <glib.h>
-/* maximum recommended size of a line from header_fold() */
+/* maximum recommended size of a line from camel_header_fold() */
#define CAMEL_FOLD_SIZE (77)
-/* maximum hard size of a line from header_fold() */
+/* maximum hard size of a line from camel_header_fold() */
#define CAMEL_FOLD_MAX_SIZE (998)
#define CAMEL_UUDECODE_STATE_INIT (0)
@@ -55,53 +55,53 @@ typedef enum _CamelMimePartEncodingType {
} CamelMimePartEncodingType;
/* a list of references for this message */
-struct _header_references {
- struct _header_references *next;
+struct _camel_header_references {
+ struct _camel_header_references *next;
char *id;
};
-struct _header_param {
- struct _header_param *next;
+struct _camel_header_param {
+ struct _camel_header_param *next;
char *name;
char *value;
};
/* describes a content-type */
-struct _header_content_type {
+typedef struct {
char *type;
char *subtype;
- struct _header_param *params;
+ struct _camel_header_param *params;
unsigned int refcount;
-};
+} CamelContentType;
/* a raw rfc822 header */
/* the value MUST be US-ASCII */
-struct _header_raw {
- struct _header_raw *next;
+struct _camel_header_raw {
+ struct _camel_header_raw *next;
char *name;
char *value;
int offset; /* in file, if known */
};
-typedef struct _CamelMimeDisposition {
+typedef struct {
char *disposition;
- struct _header_param *params;
+ struct _camel_header_param *params;
unsigned int refcount;
-} CamelMimeDisposition;
+} CamelContentDisposition;
-enum _header_address_type {
+enum _camel_header_address_t {
HEADER_ADDRESS_NONE, /* uninitialised */
HEADER_ADDRESS_NAME,
HEADER_ADDRESS_GROUP
};
-struct _header_address {
- struct _header_address *next;
- enum _header_address_type type;
+struct _camel_header_address {
+ struct _camel_header_address *next;
+ enum _camel_header_address_t type;
char *name;
union {
char *addr;
- struct _header_address *members;
+ struct _camel_header_address *members;
} v;
unsigned int refcount;
};
@@ -110,116 +110,116 @@ struct _header_address {
void camel_mime_utils_init(void);
/* Address lists */
-struct _header_address *header_address_new(void);
-struct _header_address *header_address_new_name(const char *name, const char *addr);
-struct _header_address *header_address_new_group(const char *name);
-void header_address_ref(struct _header_address *);
-void header_address_unref(struct _header_address *);
-void header_address_set_name(struct _header_address *, const char *name);
-void header_address_set_addr(struct _header_address *, const char *addr);
-void header_address_set_members(struct _header_address *, struct _header_address *group);
-void header_address_add_member(struct _header_address *, struct _header_address *member);
-void header_address_list_append_list(struct _header_address **l, struct _header_address **h);
-void header_address_list_append(struct _header_address **, struct _header_address *);
-void header_address_list_clear(struct _header_address **);
-
-struct _header_address *header_address_decode(const char *in, const char *charset);
-struct _header_address *header_mailbox_decode(const char *in, const char *charset);
+struct _camel_header_address *camel_header_address_new (void);
+struct _camel_header_address *camel_header_address_new_name (const char *name, const char *addr);
+struct _camel_header_address *camel_header_address_new_group (const char *name);
+void camel_header_address_ref (struct _camel_header_address *);
+void camel_header_address_unref (struct _camel_header_address *);
+void camel_header_address_set_name (struct _camel_header_address *, const char *name);
+void camel_header_address_set_addr (struct _camel_header_address *, const char *addr);
+void camel_header_address_set_members (struct _camel_header_address *, struct _camel_header_address *group);
+void camel_header_address_add_member (struct _camel_header_address *, struct _camel_header_address *member);
+void camel_header_address_list_append_list (struct _camel_header_address **l, struct _camel_header_address **h);
+void camel_header_address_list_append (struct _camel_header_address **, struct _camel_header_address *);
+void camel_header_address_list_clear (struct _camel_header_address **);
+
+struct _camel_header_address *camel_header_address_decode (const char *in, const char *charset);
+struct _camel_header_address *camel_header_mailbox_decode (const char *in, const char *charset);
/* for mailing */
-char *header_address_list_encode(struct _header_address *a);
+char *camel_header_address_list_encode (struct _camel_header_address *a);
/* for display */
-char *header_address_list_format(struct _header_address *a);
+char *camel_header_address_list_format (struct _camel_header_address *a);
/* structured header prameters */
-struct _header_param *header_param_list_decode(const char *in);
-char *header_param(struct _header_param *p, const char *name);
-struct _header_param *header_set_param(struct _header_param **l, const char *name, const char *value);
-void header_param_list_format_append(GString *out, struct _header_param *p);
-char *header_param_list_format(struct _header_param *p);
-void header_param_list_free(struct _header_param *p);
+struct _camel_header_param *camel_header_param_list_decode (const char *in);
+char *camel_header_param (struct _camel_header_param *p, const char *name);
+struct _camel_header_param *camel_header_set_param (struct _camel_header_param **l, const char *name, const char *value);
+void camel_header_param_list_format_append (GString *out, struct _camel_header_param *p);
+char *camel_header_param_list_format (struct _camel_header_param *p);
+void camel_header_param_list_free (struct _camel_header_param *p);
/* Content-Type header */
-struct _header_content_type *header_content_type_new(const char *type, const char *subtype);
-struct _header_content_type *header_content_type_decode(const char *in);
-void header_content_type_unref(struct _header_content_type *ct);
-void header_content_type_ref(struct _header_content_type *ct);
-const char *header_content_type_param(struct _header_content_type *t, const char *name);
-void header_content_type_set_param(struct _header_content_type *t, const char *name, const char *value);
-int header_content_type_is(struct _header_content_type *ct, const char *type, const char *subtype);
-char *header_content_type_format(struct _header_content_type *ct);
-char *header_content_type_simple(struct _header_content_type *ct);
+CamelContentType *camel_content_type_new (const char *type, const char *subtype);
+CamelContentType *camel_content_type_decode (const char *in);
+void camel_content_type_unref (CamelContentType *ct);
+void camel_content_type_ref (CamelContentType *ct);
+const char *camel_content_type_param (CamelContentType *t, const char *name);
+void camel_content_type_set_param (CamelContentType *t, const char *name, const char *value);
+int camel_content_type_is (CamelContentType *ct, const char *type, const char *subtype);
+char *camel_content_type_format (CamelContentType *ct);
+char *camel_content_type_simple (CamelContentType *ct);
/* DEBUGGING function */
-void header_content_type_dump(struct _header_content_type *ct);
+void camel_content_type_dump (CamelContentType *ct);
/* Content-Disposition header */
-CamelMimeDisposition *header_disposition_decode(const char *in);
-void header_disposition_ref(CamelMimeDisposition *);
-void header_disposition_unref(CamelMimeDisposition *);
-char *header_disposition_format(CamelMimeDisposition *d);
+CamelContentDisposition *camel_content_disposition_decode (const char *in);
+void camel_content_disposition_ref (CamelContentDisposition *);
+void camel_content_disposition_unref (CamelContentDisposition *);
+char *camel_content_disposition_format (CamelContentDisposition *d);
/* decode the contents of a content-encoding header */
-char *header_content_encoding_decode(const char *in);
+char *camel_header_content_encoding_decode (const char *in);
/* raw headers */
-void header_raw_append(struct _header_raw **list, const char *name, const char *value, int offset);
-void header_raw_append_parse(struct _header_raw **list, const char *header, int offset);
-const char *header_raw_find(struct _header_raw **list, const char *name, int *offset);
-const char *header_raw_find_next(struct _header_raw **list, const char *name, int *offset, const char *last);
-void header_raw_replace(struct _header_raw **list, const char *name, const char *value, int offset);
-void header_raw_remove(struct _header_raw **list, const char *name);
-void header_raw_fold(struct _header_raw **list);
-void header_raw_clear(struct _header_raw **list);
+void camel_header_raw_append (struct _camel_header_raw **list, const char *name, const char *value, int offset);
+void camel_header_raw_append_parse (struct _camel_header_raw **list, const char *header, int offset);
+const char *camel_header_raw_find (struct _camel_header_raw **list, const char *name, int *offset);
+const char *camel_header_raw_find_next (struct _camel_header_raw **list, const char *name, int *offset, const char *last);
+void camel_header_raw_replace (struct _camel_header_raw **list, const char *name, const char *value, int offset);
+void camel_header_raw_remove (struct _camel_header_raw **list, const char *name);
+void camel_header_raw_fold (struct _camel_header_raw **list);
+void camel_header_raw_clear (struct _camel_header_raw **list);
-char *header_raw_check_mailing_list(struct _header_raw **list);
+char *camel_header_raw_check_mailing_list (struct _camel_header_raw **list);
/* fold a header */
-char *header_address_fold (const char *in, size_t headerlen);
-char *header_fold (const char *in, size_t headerlen);
-char *header_unfold (const char *in);
+char *camel_header_address_fold (const char *in, size_t headerlen);
+char *camel_header_fold (const char *in, size_t headerlen);
+char *camel_header_unfold (const char *in);
/* decode a header which is a simple token */
-char *header_token_decode (const char *in);
+char *camel_header_token_decode (const char *in);
-int header_decode_int (const char **in);
+int camel_header_decode_int (const char **in);
/* decode/encode a string type, like a subject line */
-char *header_decode_string (const char *in, const char *default_charset);
-char *header_encode_string (const unsigned char *in);
+char *camel_header_decode_string (const char *in, const char *default_charset);
+char *camel_header_encode_string (const unsigned char *in);
/* encode a phrase, like the real name of an address */
-char *header_encode_phrase (const unsigned char *in);
+char *camel_header_encode_phrase (const unsigned char *in);
/* decode an email date field into a GMT time, + optional offset */
-time_t header_decode_date (const char *in, int *saveoffset);
-char *header_format_date (time_t time, int offset);
+time_t camel_header_decode_date (const char *in, int *saveoffset);
+char *camel_header_format_date (time_t time, int offset);
/* decode a message id */
-char *header_msgid_decode (const char *in);
-char *header_contentid_decode (const char *in);
+char *camel_header_msgid_decode (const char *in);
+char *camel_header_contentid_decode (const char *in);
/* generate msg id */
-char *header_msgid_generate (void);
+char *camel_header_msgid_generate (void);
/* decode a References or In-Reply-To header */
-struct _header_references *header_references_inreplyto_decode (const char *in);
-struct _header_references *header_references_decode(const char *in);
-void header_references_list_clear(struct _header_references **list);
-void header_references_list_append_asis(struct _header_references **list, char *ref);
-int header_references_list_size(struct _header_references **list);
-struct _header_references *header_references_dup(const struct _header_references *list);
+struct _camel_header_references *camel_header_references_inreplyto_decode (const char *in);
+struct _camel_header_references *camel_header_references_decode (const char *in);
+void camel_header_references_list_clear (struct _camel_header_references **list);
+void camel_header_references_list_append_asis (struct _camel_header_references **list, char *ref);
+int camel_header_references_list_size (struct _camel_header_references **list);
+struct _camel_header_references *camel_header_references_dup (const struct _camel_header_references *list);
/* decode content-location */
-char *header_location_decode(const char *in);
+char *camel_header_location_decode (const char *in);
/* decode the mime-type header */
-void header_mime_decode(const char *in, int *maj, int *min);
+void camel_header_mime_decode (const char *in, int *maj, int *min);
/* do incremental base64/quoted-printable (de/en)coding */
-size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save);
+size_t base64_decode_step (unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save);
-size_t base64_encode_step(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
-size_t base64_encode_close(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
+size_t base64_encode_step (unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
+size_t base64_encode_close (unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
size_t uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save);
@@ -228,10 +228,10 @@ size_t uuencode_step (unsigned char *in, size_t len, unsigned char *out, unsigne
size_t uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state,
guint32 *save);
-size_t quoted_decode_step(unsigned char *in, size_t len, unsigned char *out, int *savestate, int *saveme);
+size_t quoted_decode_step (unsigned char *in, size_t len, unsigned char *out, int *savestate, int *saveme);
-size_t quoted_encode_step(unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
-size_t quoted_encode_close(unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
+size_t quoted_encode_step (unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
+size_t quoted_encode_close (unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
char *base64_encode_simple (const char *data, size_t len);
size_t base64_decode_simple (char *data, size_t len);