X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mime%2Fmime.h;h=4f2d62c51ad8ae2a3a389e411db4d8a151632076;hp=6f2091021a44c6e895fee5a38100836b95e810da;hb=b934795055e8c16e6cb7c9687a4dce815cb300e6;hpb=7a368b3670a90656b2e0e724ed3efd79221f3d31 diff --git a/lib-mime/mime.h b/lib-mime/mime.h index 6f20910..4f2d62c 100644 --- a/lib-mime/mime.h +++ b/lib-mime/mime.h @@ -19,6 +19,7 @@ /* * Copyright notice from original mutt: + * Copyright (C) 1996-2000 Michael R. Elkins * Copyright (C) 1999-2000 Thomas Roessler * * This file is part of mutt-ng, see http://www.muttng.org/. @@ -32,6 +33,7 @@ #include #include +#include #include /* Content-Type */ @@ -72,6 +74,53 @@ typedef struct parameter { struct parameter *next; } PARAMETER; +typedef struct address_t { + char *personal; /* real name of address */ + char *mailbox; /* mailbox and host address */ + int group; /* group mailbox? */ + struct address_t *next; +} address_t; + +typedef struct envelope_t { + address_t *return_path; + address_t *from; + address_t *to; + address_t *cc; + address_t *bcc; + address_t *sender; + address_t *reply_to; + address_t *mail_followup_to; + char *list_post; /* this stores a mailto URL, or nothing */ + char *subject; + char *real_subj; /* offset of the real subject */ + char *message_id; + char *supersedes; + char *date; + char *x_label; + char *organization; +#ifdef USE_NNTP + char *newsgroups; + char *xref; + char *followup_to; + char *x_comment_to; +#endif + BUFFER *spam; + LIST *references; /* message references (in reverse order) */ + LIST *in_reply_to; /* in-reply-to header content */ + LIST *userhdrs; /* user defined headers */ + unsigned int irt_changed:1; /* In-Reply-To changed to link/break threads */ + unsigned int refs_changed:1; /* References changed to break thread */ +} ENVELOPE; + + +DO_INIT(address_t, address); +void address_wipe(address_t *); + +DO_NEW(address_t, address); +DO_DELETE(address_t, address); +DO_SLIST(address_t, address); + + extern const char MimeSpecials[]; extern const char *BodyTypes[]; extern const char *BodyEncodings[]; @@ -90,21 +139,6 @@ extern const char *BodyEncodings[]; /* Standard for ARPA Internet Text Messages */ /****************************************************************************/ -typedef struct address_t { - char *personal; /* real name of address */ - char *mailbox; /* mailbox and host address */ - int group; /* group mailbox? */ - struct address_t *next; -} address_t; - -DO_INIT(address_t, address); -void address_wipe(address_t *); - -DO_NEW(address_t, address); -DO_DELETE(address_t, address); -DO_SLIST(address_t, address); - - address_t *address_dup(address_t *addr); address_t *address_list_dup(address_t *addr); void rfc822_qualify(address_t *, const char *); @@ -115,10 +149,23 @@ ssize_t rfc822_write_address(char *, ssize_t, address_t *, int); ssize_t rfc822_write_address_single(char *, ssize_t, address_t *, int); ssize_t rfc822_strcpy(char *, ssize_t, const char *, const char *); -extern int RFC822Error; extern const char RFC822Specials[]; -#define rfc822_error(x) RFC822Errors[x] +/****************************************************************************/ +/* RFC 2047 */ +/* MIME (Multipurpose Internet Mail Extensions) Part Three: */ +/* Message Header Extensions for Non-ASCII Text */ +/****************************************************************************/ + +char *mutt_choose_charset(const char *fromcode, const char *charsets, + char *u, ssize_t ulen, char **d, ssize_t *dlen); + +void rfc2047_encode_string(char **); +void rfc2047_encode_adrlist(address_t *, const char *); + +void rfc2047_decode(char **); +void rfc2047_decode_adrlist(address_t *); +void rfc2047_decode_envelope(ENVELOPE* e); /****************************************************************************/ /* RFC 2231 */