Top |
Functions
Functions
GMimeHeaderRawValueFormatter ()
char * (*GMimeHeaderRawValueFormatter) (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Function callback for encoding and formatting a header value.
g_mime_header_format_addrlist ()
char * g_mime_header_format_addrlist (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a Sender, From, Reply-To, To, Cc, or Bcc header value |
|
charset |
a charset (note: unused) |
g_mime_header_format_content_disposition ()
char * g_mime_header_format_content_disposition (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a Content-Disposition header value |
|
charset |
a charset (note: unused) |
g_mime_header_format_content_type ()
char * g_mime_header_format_content_type (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a Content-Type header value |
|
charset |
a charset (note: unused) |
g_mime_header_format_default ()
char * g_mime_header_format_default (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a header value |
|
charset |
a charset to use when encoding the |
g_mime_header_format_message_id ()
char * g_mime_header_format_message_id (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a Message-Id or Content-Id header value |
|
charset |
a charset (note: unused) |
g_mime_header_format_received ()
char * g_mime_header_format_received (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a Received header value |
|
charset |
a charset (note: unused) |
g_mime_header_format_references ()
char * g_mime_header_format_references (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
a References or In-Reply-To header value |
|
charset |
a charset (note: unused) |
g_mime_header_get_name ()
const char *
g_mime_header_get_name (GMimeHeader *header
);
Gets the header's name.
g_mime_header_get_raw_name ()
const char *
g_mime_header_get_raw_name (GMimeHeader *header
);
Gets the header's raw name. The raw header name is the complete string up to
(but not including) the ':' separating the header's name from its value. This
string may be different from the value returned by g_mime_header_get_name()
if the parsed message's header contained trailing whitespace after the header
name, such as: "Subject : this is the subject\r\n".
g_mime_header_get_offset ()
gint64
g_mime_header_get_offset (GMimeHeader *header
);
Gets the header's stream offset if known.
g_mime_header_get_value ()
const char *
g_mime_header_get_value (GMimeHeader *header
);
Gets the header's unfolded value.
g_mime_header_set_value ()
void g_mime_header_set_value (GMimeHeader *header
,GMimeFormatOptions *options
,const char *value
,const char *charset
);
Sets the header's decoded value.
Parameters
header |
||
options |
a GMimeFormatOptions or |
[nullable] |
value |
the new header value |
|
charset |
a charset |
g_mime_header_get_raw_value ()
const char *
g_mime_header_get_raw_value (GMimeHeader *header
);
Gets the header's raw (folded) value.
g_mime_header_set_raw_value ()
void g_mime_header_set_raw_value (GMimeHeader *header
,const char *raw_value
);
Sets the header's raw value.
g_mime_header_write_to_stream ()
ssize_t g_mime_header_write_to_stream (GMimeHeader *header
,GMimeFormatOptions *options
,GMimeStream *stream
);
Write the header to the specified stream.
g_mime_header_list_new ()
GMimeHeaderList *
g_mime_header_list_new (GMimeParserOptions *options
);
Creates a new GMimeHeaderList object.
g_mime_header_list_get_count ()
int
g_mime_header_list_get_count (GMimeHeaderList *headers
);
Gets the number of headers contained within the header list.
g_mime_header_list_clear ()
void
g_mime_header_list_clear (GMimeHeaderList *headers
);
Removes all of the headers from the GMimeHeaderList.
g_mime_header_list_contains ()
gboolean g_mime_header_list_contains (GMimeHeaderList *headers
,const char *name
);
Checks whether or not a header exists.
g_mime_header_list_get_header ()
GMimeHeader * g_mime_header_list_get_header (GMimeHeaderList *headers
,const char *name
);
Gets the first header with the specified name.
g_mime_header_list_get_header_at ()
GMimeHeader * g_mime_header_list_get_header_at (GMimeHeaderList *headers
,int index
);
Gets the header at the specified index
within the list.
g_mime_header_list_prepend ()
void g_mime_header_list_prepend (GMimeHeaderList *headers
,const char *name
,const char *value
,const char *charset
);
Prepends a header. If value
is NULL
, a space will be set aside
for it (useful for setting the order of headers before values can
be obtained for them) otherwise the header will be unset.
g_mime_header_list_append ()
void g_mime_header_list_append (GMimeHeaderList *headers
,const char *name
,const char *value
,const char *charset
);
Appends a header. If value
is NULL
, a space will be set aside for it
(useful for setting the order of headers before values can be
obtained for them) otherwise the header will be unset.
g_mime_header_list_set ()
void g_mime_header_list_set (GMimeHeaderList *headers
,const char *name
,const char *value
,const char *charset
);
Set the value of the specified header. If value
is NULL
and the
header, name
, had not been previously set, a space will be set
aside for it (useful for setting the order of headers before values
can be obtained for them) otherwise the header will be unset.
Note: If there are multiple headers with the specified field name, the first instance of the header will be replaced and further instances will be removed.
g_mime_header_list_remove ()
gboolean g_mime_header_list_remove (GMimeHeaderList *headers
,const char *name
);
Remove the first instance of the specified header.
g_mime_header_list_remove_at ()
void g_mime_header_list_remove_at (GMimeHeaderList *headers
,int index
);
Removes the header at the specified index
from headers
.
g_mime_header_list_write_to_stream ()
ssize_t g_mime_header_list_write_to_stream (GMimeHeaderList *headers
,GMimeFormatOptions *options
,GMimeStream *stream
);
Write the headers to a stream.
g_mime_header_list_to_string ()
char * g_mime_header_list_to_string (GMimeHeaderList *headers
,GMimeFormatOptions *options
);
Allocates a string buffer containing the raw rfc822 headers
contained in headers
.