Top |
Functions
Description
A GMimeFormatOptions is used by GMime to determine how to serialize various objects and headers.
Functions
g_mime_format_options_new ()
GMimeFormatOptions *
g_mime_format_options_new (void
);
Creates a new set of GMimeFormatOptions.
g_mime_format_options_free ()
void
g_mime_format_options_free (GMimeFormatOptions *options
);
Frees a set of GMimeFormatOptions.
g_mime_format_options_clone ()
GMimeFormatOptions *
g_mime_format_options_clone (GMimeFormatOptions *options
);
Clones a GMimeFormatOptions.
g_mime_format_options_get_default ()
GMimeFormatOptions *
g_mime_format_options_get_default (void
);
Gets the default format options.
g_mime_format_options_get_param_encoding_method ()
GMimeParamEncodingMethod
g_mime_format_options_get_param_encoding_method
(GMimeFormatOptions *options
);
Gets the parameter encoding method to use for GMimeParam parameters that do not already have an encoding method specified.
g_mime_format_options_set_param_encoding_method ()
void g_mime_format_options_set_param_encoding_method (GMimeFormatOptions *options
,GMimeParamEncodingMethod method
);
Sets the parameter encoding method to use when encoding parameters which do not have an encoding method specified.
Note: GMIME_PARAM_ENCODING_METHOD_DEFAULT is not allowed.
g_mime_format_options_get_newline_format ()
GMimeNewLineFormat
g_mime_format_options_get_newline_format
(GMimeFormatOptions *options
);
Gets the new-line format to use when writing out messages and headers.
g_mime_format_options_set_newline_format ()
void g_mime_format_options_set_newline_format (GMimeFormatOptions *options
,GMimeNewLineFormat newline
);
Sets the new-line format that should be used when writing headers and messages.
g_mime_format_options_get_newline ()
const char *
g_mime_format_options_get_newline (GMimeFormatOptions *options
);
Gets a string representing the currently set new-line format.
g_mime_format_options_create_newline_filter ()
GMimeFilter * g_mime_format_options_create_newline_filter (GMimeFormatOptions *options
,gboolean ensure_newline
);
Creates a GMimeFilter suitable for converting line-endings to the currently set new-line format.
Parameters
options |
a GMimeFormatOptions or |
[nullable] |
ensure_newline |
|
g_mime_format_options_is_hidden_header ()
gboolean g_mime_format_options_is_hidden_header (GMimeFormatOptions *options
,const char *header
);
Gets whether or not the specified header should be hidden.
g_mime_format_options_add_hidden_header ()
void g_mime_format_options_add_hidden_header (GMimeFormatOptions *options
,const char *header
);
Adds the given header to the list of headers that should be hidden.
g_mime_format_options_remove_hidden_header ()
void g_mime_format_options_remove_hidden_header (GMimeFormatOptions *options
,const char *header
);
Removes the given header from the list of headers that should be hidden.
g_mime_format_options_clear_hidden_headers ()
void
g_mime_format_options_clear_hidden_headers
(GMimeFormatOptions *options
);
Clears the list of headers that should be hidden.
Types and Values
enum GMimeParamEncodingMethod
The MIME specifications specify that the proper method for encoding Content-Type and Content-Disposition parameter values is the method described in
<a>rfc2231</a>. However, it is common forsome older email clients to improperly encode using the method described in
<a>rfc2047</a> instead.Members
Use the default encoding method set on the GMimeFormatOptions. |
||
Use the encoding method described in rfc2231. |
||
Use the encoding method described in rfc2047. |
enum GMimeNewLineFormat
There are two commonly used line-endings used by modern Operating Systems. Unix-based systems such as Linux and Mac OS use a single character ('\n' aka LF) to represent the end of line where-as Windows (or DOS) uses a sequence of two characters ("\r\n" aka CRLF). Most text-based network protocols such as SMTP, POP3, and IMAP use the CRLF sequence as well.