NeoMutt  2025-12-11-980-ge38c27
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
parse.h
Go to the documentation of this file.
1
23
24#ifndef MUTT_EMAIL_PARSE_H
25#define MUTT_EMAIL_PARSE_H
26
27#include "config.h"
28#include <stdbool.h>
29#include <stdio.h>
30#include "mutt/lib.h"
31#include "mime.h"
32
33struct Body;
34struct Email;
35struct Envelope;
36
41{
42 struct ListHead archive;
43 struct ListHead help;
44 struct ListHead owner;
45 struct ListHead post;
46 struct ListHead subscribe;
47 struct ListHead unsubscribe;
48};
49
50int mutt_check_encoding (const char *c);
51enum ContentType mutt_check_mime_type (const char *s);
52char * mutt_extract_message_id (const char *s, size_t *len);
53bool mutt_is_message_type (int type, const char *subtype);
54bool mutt_matches_ignore (const char *s);
55void mutt_parse_content_type (const char *s, struct Body *b);
56bool mutt_parse_mailto (struct Envelope *env, char **body, const char *src);
57size_t mutt_rfc2369_parse (const char *body, struct ListHead *links);
58char * mutt_rfc2369_first_mailto(const char *body);
60void mutt_rfc2369_read_headers(FILE *fp, struct Rfc2369ListHeaders *headers);
61struct Body * mutt_parse_multipart (FILE *fp, const char *boundary, LOFF_T end_off, bool digest);
62void mutt_parse_part (FILE *fp, struct Body *b);
63struct Body * mutt_read_mime_header (FILE *fp, bool digest);
64int mutt_rfc822_parse_line (struct Envelope *env, struct Email *e, const char *name, size_t name_len, const char *body, bool user_hdrs, bool weed, bool do_2047);
65struct Body * mutt_rfc822_parse_message(FILE *fp, struct Body *b);
66struct Envelope *mutt_rfc822_read_header (FILE *fp, struct Email *e, bool user_hdrs, bool weed);
67size_t mutt_rfc822_read_line (FILE *fp, struct Buffer *out);
68
69void mutt_filter_commandline_header_tag (char *header);
71
72#endif /* MUTT_EMAIL_PARSE_H */
int mutt_rfc822_parse_line(struct Envelope *env, struct Email *e, const char *name, size_t name_len, const char *body, bool user_hdrs, bool weed, bool do_2047)
Parse an email header.
Definition parse.c:798
struct Body * mutt_rfc822_parse_message(FILE *fp, struct Body *b)
Parse a Message/RFC822 body.
Definition parse.c:1964
void mutt_parse_part(FILE *fp, struct Body *b)
Parse a MIME part.
Definition parse.c:1949
void mutt_parse_content_type(const char *s, struct Body *b)
Parse a content type.
Definition parse.c:433
char * mutt_rfc2369_first_mailto(const char *body)
Extract the first mailto: URL from an RFC 2369 list.
Definition parse.c:672
struct Body * mutt_read_mime_header(FILE *fp, bool digest)
Parse a MIME header.
Definition parse.c:1484
bool mutt_matches_ignore(const char *s)
Does the string match the ignore list.
Definition parse.c:320
enum ContentType mutt_check_mime_type(const char *s)
Check a MIME type string.
Definition parse.c:333
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
Parses an RFC822 header.
Definition parse.c:1325
bool mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
Definition parse.c:1878
int mutt_check_encoding(const char *c)
Check the encoding type.
Definition parse.c:404
size_t mutt_rfc822_read_line(FILE *fp, struct Buffer *out)
Read a header line from a file.
Definition parse.c:1245
struct Body * mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, bool digest)
Parse a multipart structure.
Definition parse.c:1980
size_t mutt_rfc2369_parse(const char *body, struct ListHead *links)
Extract URLs from an RFC 2369 list header.
Definition parse.c:638
void mutt_filter_commandline_header_tag(char *header)
Sanitise characters in a header tag.
Definition parse.c:73
char * mutt_extract_message_id(const char *s, size_t *len)
Find a Message-ID.
Definition parse.c:368
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
Definition parse.c:1620
void mutt_rfc2369_list_headers_free(struct Rfc2369ListHeaders *headers)
Free RFC 2369 mailing-list header values.
Definition parse.c:704
void mutt_filter_commandline_header_value(char *header)
Sanitise characters in a header value.
Definition parse.c:93
void mutt_rfc2369_read_headers(FILE *fp, struct Rfc2369ListHeaders *headers)
Read RFC 2369 mailing-list headers.
Definition parse.c:724
Constants and macros for managing MIME encoding.
ContentType
Content-Type.
Definition mime.h:30
Convenience wrapper for the library headers.
The body of an email.
Definition body.h:36
String manipulation buffer.
Definition buffer.h:36
The envelope/body of an email.
Definition email.h:39
The header of an Email.
Definition envelope.h:57
Mailing-list actions from RFC 2369 headers.
Definition parse.h:41
struct ListHead owner
List-Owner.
Definition parse.h:44
struct ListHead archive
List-Archive.
Definition parse.h:42
struct ListHead post
List-Post.
Definition parse.h:45
struct ListHead unsubscribe
List-Unsubscribe.
Definition parse.h:47
struct ListHead subscribe
List-Subscribe.
Definition parse.h:46
struct ListHead help
List-Help.
Definition parse.h:43