Top | ![]() |
![]() |
![]() |
![]() |
A GMimeFormatOptions is used by GMime to determine how to serialize various objects and headers.
GMimeFormatOptions *
g_mime_format_options_new (void
);
Creates a new set of GMimeFormatOptions.
void
g_mime_format_options_free (GMimeFormatOptions *options
);
Frees a set of GMimeFormatOptions.
GMimeFormatOptions *
g_mime_format_options_clone (GMimeFormatOptions *options
);
Clones a GMimeFormatOptions.
GMimeFormatOptions *
g_mime_format_options_get_default (void
);
Gets the default format options.
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.
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.
GMimeNewLineFormat
g_mime_format_options_get_newline_format
(GMimeFormatOptions *options
);
Gets the new-line format to use when writing out messages and headers.
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.
const char *
g_mime_format_options_get_newline (GMimeFormatOptions *options
);
Gets a string representing the currently set new-line format.
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.
options |
a GMimeFormatOptions or |
[nullable] |
ensure_newline |
|
gboolean g_mime_format_options_is_hidden_header (GMimeFormatOptions *options
,const char *header
);
Gets whether or not the specified header should be hidden.
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.
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.
void
g_mime_format_options_clear_hidden_headers
(GMimeFormatOptions *options
);
Clears the list of headers that should be hidden.
The MIME specifications specify that the proper method for encoding Content-Type and Content-Disposition parameter values is the method described in
rfc2231. However, it is common forsome older email clients to improperly encode using the method described in
rfc2047 instead.
Use the default encoding method set on the GMimeFormatOptions. |
||
Use the encoding method described in rfc2231. |
||
Use the encoding method described in rfc2047. |
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.