Back to index

courier  0.68.2
mimegpgheader.h
Go to the documentation of this file.
00001 #ifndef mimegpgheader_h
00002 #define mimegpgheader_h
00003 /*
00004 ** Copyright 2001 Double Precision, Inc.  See COPYING for
00005 ** distribution information.
00006 */
00007 
00008 
00009 #include "config.h"
00010 #include <stdio.h>
00011 
00012 #ifdef  __cplusplus
00013 extern "C" {
00014 #endif
00015 
00016 struct header {
00017        struct header *next;
00018        char *header;
00019 } ;
00020 
00021 struct read_header_context {
00022        int continue_header;
00023        int header_len;
00024        struct header *first, *last;
00025 } ;
00026 
00027 void libmail_readheader_init(struct read_header_context *);
00028 int libmail_readheader(struct read_header_context *, const char *);
00029 struct header *libmail_readheader_finish(struct read_header_context *);
00030 #define READ_START_OF_LINE(cts) ((cts).continue_header == 0)
00031 
00032 void libmail_header_free(struct header *p);
00033 struct header *libmail_header_find(struct header *p, const char *n);
00034 const char *libmail_header_find_txt(struct header *p, const char *n);
00035 
00036 struct mime_header {
00037        char *header_name;
00038        struct mime_attribute *attr_list;
00039 } ;
00040 
00041 struct mime_attribute {
00042        struct mime_attribute *next;
00043        char *name, *value;
00044 } ;
00045 
00046 void libmail_mimeheader_free(struct mime_header *);
00047 struct mime_header *libmail_mimeheader_parse(const char *);
00048 const char *libmail_mimeheader_getattr(struct mime_header *, const char *);
00049 
00050 #ifdef  __cplusplus
00051 } ;
00052 #endif
00053 
00054 #endif