smf_header.h
Go to the documentation of this file.
1 /* spmfilter - mail filtering framework
2  * Copyright (C) 2009-2012 Axel Steiner and SpaceNet AG
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 3 of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
26 #ifndef _SMF_HEADER_H
27 #define _SMF_HEADER_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <cmime.h>
34 
39 typedef CMimeHeader_T SMFHeader_T;
40 
46 SMFHeader_T *smf_header_new(void);
47 
53 void smf_header_free(SMFHeader_T *header);
54 
61 void smf_header_set_name(SMFHeader_T *header, const char *name);
62 
69 char *smf_header_get_name(SMFHeader_T *header);
70 
78 void smf_header_set_value(SMFHeader_T *header, const char *value, int overwrite);
79 
87 char *smf_header_get_value(SMFHeader_T *header,int pos);
88 
95 int smf_header_get_count(SMFHeader_T *header);
96 
103 char *smf_header_to_string(SMFHeader_T *header);
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* _SMF_HEADER_H */