ze-filter  (ze-filter-0.8.0-develop-180218)
Tools : Message Tools

Classes

struct  mime_part_T
 
struct  header_T
 
struct  content_text_T
 
struct  content_field_T
 
struct  attachment_T
 
struct  rfc2822_hdr_T
 
struct  UU_BLOCK_T
 

Macros

#define TSPECIALS   "()<>@,;:\\/[]?=\""
 
#define MIME_ERROR_UNUSED_BOUNDARY   0
 
#define MIME_TYPE_TEXT   (1 << 8)
 
#define MIME_TYPE_IMAGE   (2 << 8)
 
#define MIME_TYPE_AUDIO   (3 << 8)
 
#define MIME_TYPE_VIDEO   (4 << 8)
 
#define MIME_TYPE_APPLICATION   (5 << 8)
 
#define MIME_TYPE_EXTENSION_TOKEN   (6 << 8)
 
#define MIME_TYPE_MESSAGE   (7 << 8)
 
#define MIME_TYPE_MULTIPART   (8 << 8)
 
#define MIME_ENCODE_NONE   0
 
#define MIME_ENCODE_7BIT   0
 
#define MIME_ENCODE_8BIT   2
 
#define MIME_ENCODE_BINARY   3
 
#define MIME_ENCODE_BASE64   4
 
#define MIME_ENCODE_QUOTED_PRINTABLE   5
 
#define MIME_ENCODE_OTHER   6
 
#define MIME_TYPE_LENGTH   64
 
#define CHARSET_LENGTH   64
 
#define NB_ATTR   64
 
#define rfc2822_free(f)   FREE((f)->line)
 
#define rfc2822_free_list(head)
 

Typedefs

typedef struct mime_part_T mime_part_T
 
typedef struct mime_part_Tmime_part_P
 
typedef bool(* demime_F) (char *, size_t, char *, int, int, void *, mime_part_T *)
 
typedef struct header_T header_T
 
typedef bool(* mbox_F) (char *fname, int id, void *arg)
 
typedef struct content_text_T content_text_T
 
typedef struct content_field_T content_field_T
 
typedef struct attachment_T attachment_T
 
typedef struct rfc2822_hdr_T rfc2822_hdr_T
 
typedef struct rfc2822_hdr_Trfc2822_hdr_P
 

Functions

int base64_decode (char *, char *, size_t *, size_t *)
 
bool base64_encode (char *sout, size_t szout, unsigned char *sin, size_t szin)
 
void * alt_base64_decode (char *, size_t *)
 
void convert_8to7 (char *buf, bool convert_spaces)
 
void convert_filename_8to7 (char *buf)
 
bool is_rfc1521_encoded (char *)
 
int decode_rfc1521 (char *, char *, size_t)
 
bool is_rfc2047_encoded (char *)
 
int decode_rfc2047 (char *, char *, size_t)
 
bool is_rfc2231_encoded (char *)
 
int decode_rfc2231 (char *, char *, size_t)
 
int strascii (char *, char *, char *)
 
bool decode_mime_buffer (char *, char *, size_t, int, uint32_t *, demime_F, void *)
 
bool decode_mime_file (char *, char *, uint32_t *, demime_F, void *)
 
int which_mime_encoding (char *)
 
char * mime_encode_name (int)
 
int which_mime_type (char *s)
 
char * mime_type_name (int)
 
void set_mime_debug (bool)
 
bool add_to_msgheader_list (header_T **, char *, char *)
 
header_Tclear_msgheader_list (header_T *)
 
int count_msgheader_attr (header_T *, char *)
 
header_Tget_msgheader (header_T *, char *)
 
int get_msgheader_index (header_T *, char *)
 
header_Tget_msgheader_index_2 (header_T *, char *, int)
 
header_Tget_msgheader_next (header_T *, char *)
 
bool get_msgheader_attribute (header_T *, char *, char *, size_t)
 
void html_clean_codes (char *, size_t)
 
char * cleanup_html_buffer (char *, size_t)
 
int check_valid_html_tags (char *, char *)
 
int get_html_entity (char *)
 
int mbox_handle (char *fname, mbox_F func, void *arg)
 
int maildir_handle (char *dirname, mbox_F func, void *arg)
 
char * chomp_filename (char *)
 
bool add_content_field_attr (content_field_T *, char *, char *)
 
content_field_Tsave_content_field (content_field_T *, content_field_T **)
 
void free_content_field (content_field_T *)
 
void free_content_field_rec (content_field_T *)
 
void free_content_field_list (content_field_T *)
 
void free_attachment_list (attachment_T *)
 
attachment_Tadd_attachment (attachment_T *file, attachment_T **)
 
int extract_attachments (content_field_T *, attachment_T **)
 
int get_file_disposition (content_field_T *, char *, char *, size_t)
 
int qp_decode (char *, char *, size_t)
 
rfc2822_hdr_Trfc2822_get_headers (char *buf, size_t size, char **nptr)
 
rfc2822_hdr_Trfc2822_lookup_header (rfc2822_hdr_T *head, char *key)
 
char * rfc2822_get_value (rfc2822_hdr_T *header)
 
char * rfc2822_get_main_attr (rfc2822_hdr_T *header)
 
char * rfc2822_get_attr (rfc2822_hdr_T *header, char *attr)
 
bool unattach (char *, char *, char *, uint32_t *)
 
bool uudecode_buffer (char *, UU_BLOCK_T *)
 
bool uudecode_file (char *, UU_BLOCK_T *)
 
void free_uu_block (UU_BLOCK_T *)
 

Detailed Description

Macro Definition Documentation

◆ CHARSET_LENGTH

#define CHARSET_LENGTH   64

Definition at line 55 of file ze-demime.h.

◆ MIME_ENCODE_7BIT

#define MIME_ENCODE_7BIT   0

Definition at line 45 of file ze-demime.h.

◆ MIME_ENCODE_8BIT

#define MIME_ENCODE_8BIT   2

Definition at line 46 of file ze-demime.h.

◆ MIME_ENCODE_BASE64

#define MIME_ENCODE_BASE64   4

Definition at line 48 of file ze-demime.h.

◆ MIME_ENCODE_BINARY

#define MIME_ENCODE_BINARY   3

Definition at line 47 of file ze-demime.h.

◆ MIME_ENCODE_NONE

#define MIME_ENCODE_NONE   0

Definition at line 44 of file ze-demime.h.

◆ MIME_ENCODE_OTHER

#define MIME_ENCODE_OTHER   6

Definition at line 50 of file ze-demime.h.

◆ MIME_ENCODE_QUOTED_PRINTABLE

#define MIME_ENCODE_QUOTED_PRINTABLE   5

Definition at line 49 of file ze-demime.h.

◆ MIME_ERROR_UNUSED_BOUNDARY

#define MIME_ERROR_UNUSED_BOUNDARY   0

Definition at line 32 of file ze-demime.h.

◆ MIME_TYPE_APPLICATION

#define MIME_TYPE_APPLICATION   (5 << 8)

Definition at line 38 of file ze-demime.h.

◆ MIME_TYPE_AUDIO

#define MIME_TYPE_AUDIO   (3 << 8)

Definition at line 36 of file ze-demime.h.

◆ MIME_TYPE_EXTENSION_TOKEN

#define MIME_TYPE_EXTENSION_TOKEN   (6 << 8)

Definition at line 39 of file ze-demime.h.

◆ MIME_TYPE_IMAGE

#define MIME_TYPE_IMAGE   (2 << 8)

Definition at line 35 of file ze-demime.h.

◆ MIME_TYPE_LENGTH

#define MIME_TYPE_LENGTH   64

Definition at line 54 of file ze-demime.h.

◆ MIME_TYPE_MESSAGE

#define MIME_TYPE_MESSAGE   (7 << 8)

Definition at line 40 of file ze-demime.h.

◆ MIME_TYPE_MULTIPART

#define MIME_TYPE_MULTIPART   (8 << 8)

Definition at line 41 of file ze-demime.h.

◆ MIME_TYPE_TEXT

#define MIME_TYPE_TEXT   (1 << 8)

Definition at line 34 of file ze-demime.h.

◆ MIME_TYPE_VIDEO

#define MIME_TYPE_VIDEO   (4 << 8)

Definition at line 37 of file ze-demime.h.

◆ NB_ATTR

#define NB_ATTR   64

Definition at line 48 of file ze-mimelist.h.

◆ rfc2822_free

#define rfc2822_free (   f)    FREE((f)->line)

Definition at line 48 of file ze-rfc2822.h.

◆ rfc2822_free_list

#define rfc2822_free_list (   head)
Value:
while (head != NULL) \
{ \
rfc2822_hdr_T *x = (head)->next; \
FREE((head)->line); \
FREE((head)); \
(head) = x; \
}
#define FREE(x)
Definition: macros.h:37

Definition at line 50 of file ze-rfc2822.h.

◆ TSPECIALS

#define TSPECIALS   "()<>@,;:\\/[]?=\""

Definition at line 42 of file ze-decode.h.

Typedef Documentation

◆ attachment_T

typedef struct attachment_T attachment_T

Definition at line 67 of file ze-mimelist.h.

◆ content_field_T

Definition at line 51 of file ze-mimelist.h.

◆ content_text_T

Definition at line 40 of file ze-mimelist.h.

◆ demime_F

typedef bool(* demime_F) (char *, size_t, char *, int, int, void *, mime_part_T *)

Definition at line 77 of file ze-demime.h.

◆ header_T

typedef struct header_T header_T

Definition at line 32 of file ze-headers.h.

◆ mbox_F

typedef bool(* mbox_F) (char *fname, int id, void *arg)

Definition at line 32 of file ze-mbox.h.

◆ mime_part_P

typedef struct mime_part_T * mime_part_P

Definition at line 52 of file ze-demime.h.

◆ mime_part_T

typedef struct mime_part_T mime_part_T

Definition at line 52 of file ze-demime.h.

◆ rfc2822_hdr_P

typedef struct rfc2822_hdr_T * rfc2822_hdr_P

Definition at line 32 of file ze-rfc2822.h.

◆ rfc2822_hdr_T

typedef struct rfc2822_hdr_T rfc2822_hdr_T

Definition at line 32 of file ze-rfc2822.h.

Function Documentation

◆ add_attachment()

attachment_T* add_attachment ( attachment_T file,
attachment_T **   
)

Definition at line 243 of file ze-mimelist.c.

◆ add_content_field_attr()

bool add_content_field_attr ( content_field_T ,
char *  ,
char *   
)

Definition at line 80 of file ze-mimelist.c.

◆ add_to_msgheader_list()

bool add_to_msgheader_list ( header_T **  ,
char *  ,
char *   
)

Definition at line 36 of file ze-headers.c.

◆ alt_base64_decode()

void* alt_base64_decode ( char *  ,
size_t *   
)

◆ base64_decode()

int base64_decode ( char *  ,
char *  ,
size_t *  ,
size_t *   
)

Definition at line 94 of file ze-base64.c.

◆ base64_encode()

bool base64_encode ( char *  sout,
size_t  szout,
unsigned char *  sin,
size_t  szin 
)

Definition at line 312 of file ze-base64.c.

◆ check_valid_html_tags()

int check_valid_html_tags ( char *  ,
char *   
)

Definition at line 334 of file ze-html.c.

◆ chomp_filename()

char * chomp_filename ( char *  s)

Definition at line 42 of file ze-mimelist.c.

◆ cleanup_html_buffer()

char* cleanup_html_buffer ( char *  ,
size_t   
)

Definition at line 163 of file ze-html.c.

◆ clear_msgheader_list()

header_T* clear_msgheader_list ( header_T )

Definition at line 93 of file ze-headers.c.

◆ convert_8to7()

void convert_8to7 ( char *  buf,
bool  convert_spaces 
)

Definition at line 34 of file ze-convert-8to7.c.

◆ convert_filename_8to7()

void convert_filename_8to7 ( char *  buf)

Definition at line 115 of file ze-convert-8to7.c.

◆ count_msgheader_attr()

int count_msgheader_attr ( header_T ,
char *   
)

Definition at line 116 of file ze-headers.c.

◆ decode_mime_buffer()

bool decode_mime_buffer ( char *  ,
char *  ,
size_t  ,
int  ,
uint32_t ,
demime_F  ,
void *   
)

Definition at line 154 of file ze-demime.c.

◆ decode_mime_file()

bool decode_mime_file ( char *  ,
char *  ,
uint32_t ,
demime_F  ,
void *   
)

Definition at line 584 of file ze-demime.c.

◆ decode_rfc1521()

int decode_rfc1521 ( char *  ,
char *  ,
size_t   
)

Definition at line 75 of file ze-decode.c.

◆ decode_rfc2047()

int decode_rfc2047 ( char *  ,
char *  ,
size_t   
)

Definition at line 49 of file ze-decode.c.

◆ decode_rfc2231()

int decode_rfc2231 ( char *  ,
char *  ,
size_t   
)

Definition at line 200 of file ze-decode.c.

◆ extract_attachments()

int extract_attachments ( content_field_T ,
attachment_T **   
)

Definition at line 330 of file ze-mimelist.c.

◆ free_attachment_list()

void free_attachment_list ( attachment_T )

Definition at line 218 of file ze-mimelist.c.

◆ free_content_field()

void free_content_field ( content_field_T )

Definition at line 152 of file ze-mimelist.c.

◆ free_content_field_list()

void free_content_field_list ( content_field_T )

Definition at line 201 of file ze-mimelist.c.

◆ free_content_field_rec()

void free_content_field_rec ( content_field_T )

Definition at line 176 of file ze-mimelist.c.

◆ free_uu_block()

void free_uu_block ( UU_BLOCK_T )

Definition at line 345 of file ze-uudecode.c.

◆ get_file_disposition()

int get_file_disposition ( content_field_T ,
char *  ,
char *  ,
size_t   
)

Definition at line 683 of file ze-mimelist.c.

◆ get_html_entity()

int get_html_entity ( char *  )

Definition at line 535 of file ze-html.c.

◆ get_msgheader()

header_T* get_msgheader ( header_T ,
char *   
)

Definition at line 144 of file ze-headers.c.

◆ get_msgheader_attribute()

bool get_msgheader_attribute ( header_T ,
char *  ,
char *  ,
size_t   
)

Definition at line 260 of file ze-headers.c.

◆ get_msgheader_index()

int get_msgheader_index ( header_T ,
char *   
)

Definition at line 191 of file ze-headers.c.

◆ get_msgheader_index_2()

header_T* get_msgheader_index_2 ( header_T ,
char *  ,
int   
)

Definition at line 221 of file ze-headers.c.

◆ get_msgheader_next()

header_T* get_msgheader_next ( header_T ,
char *   
)

Definition at line 175 of file ze-headers.c.

◆ html_clean_codes()

void html_clean_codes ( char *  ,
size_t   
)

Definition at line 72 of file ze-html.c.

◆ is_rfc1521_encoded()

bool is_rfc1521_encoded ( char *  )

Definition at line 62 of file ze-decode.c.

◆ is_rfc2047_encoded()

bool is_rfc2047_encoded ( char *  )

Definition at line 38 of file ze-decode.c.

◆ is_rfc2231_encoded()

bool is_rfc2231_encoded ( char *  )

Definition at line 175 of file ze-decode.c.

◆ maildir_handle()

int maildir_handle ( char *  dirname,
mbox_F  func,
void *  arg 
)

Definition at line 125 of file ze-mbox.c.

◆ mbox_handle()

int mbox_handle ( char *  fname,
mbox_F  func,
void *  arg 
)

Definition at line 34 of file ze-mbox.c.

◆ mime_encode_name()

char* mime_encode_name ( int  )

Definition at line 642 of file ze-demime.c.

◆ mime_type_name()

char* mime_type_name ( int  )

Definition at line 686 of file ze-demime.c.

◆ qp_decode()

int qp_decode ( char *  ,
char *  ,
size_t   
)

Definition at line 33 of file ze-qp.c.

◆ rfc2822_get_attr()

char* rfc2822_get_attr ( rfc2822_hdr_T header,
char *  attr 
)

Definition at line 201 of file ze-rfc2822.c.

◆ rfc2822_get_headers()

rfc2822_hdr_T* rfc2822_get_headers ( char *  buf,
size_t  size,
char **  nptr 
)

Definition at line 64 of file ze-rfc2822.c.

◆ rfc2822_get_main_attr()

char* rfc2822_get_main_attr ( rfc2822_hdr_T header)

Definition at line 178 of file ze-rfc2822.c.

◆ rfc2822_get_value()

char* rfc2822_get_value ( rfc2822_hdr_T header)

Definition at line 164 of file ze-rfc2822.c.

◆ rfc2822_lookup_header()

rfc2822_hdr_T* rfc2822_lookup_header ( rfc2822_hdr_T head,
char *  key 
)

Definition at line 145 of file ze-rfc2822.c.

◆ save_content_field()

content_field_T* save_content_field ( content_field_T ,
content_field_T **   
)

Definition at line 116 of file ze-mimelist.c.

◆ set_mime_debug()

void set_mime_debug ( bool  )

Definition at line 69 of file ze-demime.c.

◆ strascii()

int strascii ( char *  ,
char *  ,
char *   
)

Definition at line 327 of file ze-decode.c.

◆ unattach()

bool unattach ( char *  ,
char *  ,
char *  ,
uint32_t  
)

Definition at line 110 of file ze-unattach.c.

◆ uudecode_buffer()

bool uudecode_buffer ( char *  ,
UU_BLOCK_T  
)

Definition at line 148 of file ze-uudecode.c.

◆ uudecode_file()

bool uudecode_file ( char *  ,
UU_BLOCK_T  
)

Definition at line 314 of file ze-uudecode.c.

◆ which_mime_encoding()

int which_mime_encoding ( char *  )

Definition at line 619 of file ze-demime.c.

◆ which_mime_type()

int which_mime_type ( char *  s)

Definition at line 662 of file ze-demime.c.