Defines the SMFHeader_T data type and related functions.
More...
#include <cmime.h>
Go to the source code of this file.
|
typedef CMimeHeader_T | SMFHeader_T |
| Represents a message header.
|
|
Defines the SMFHeader_T data type and related functions.
SMFHeader_T represents an email header.
To create a new SMFHeader_T, use smf_header_new()
To destroy a SMFHeader_T use smf_header_free()
Free a SMFHeader_T object.
- Parameters
-
header | SMFHeader_T pointer |
Get header value count.
- Parameters
-
- Returns
- header value count
Return header name.
- Parameters
-
- Returns
- header name
char* smf_header_get_value |
( |
SMFHeader_T * |
header, |
|
|
int |
pos |
|
) |
| |
Return header value (at given position, if header appears more than once)
- Parameters
-
header | SMFHeader_T pointer |
pos | Position of appearance in email |
- Returns
- header value
Creates a new SMFHeader_T object.
- Returns
- SMFHeader_T pointer, or NULL on failure
void smf_header_set_name |
( |
SMFHeader_T * |
header, |
|
|
const char * |
name |
|
) |
| |
Set a header name, if aleready exists, name will be overwritten.
- Parameters
-
header | SMFHeader_T pointer |
name | name of header |
void smf_header_set_value |
( |
SMFHeader_T * |
header, |
|
|
const char * |
value, |
|
|
int |
overwrite |
|
) |
| |
Set/append a header value.
- Parameters
-
header | SMFHeader_T pointer |
value | header value |
overwrite | 1 will overwrite value, 0 append |
Return full header as newly allocated string.
- Parameters
-
header | a SMFHeader_T object |
- Returns
- full header as newly allocated string