Top | ![]() |
![]() |
![]() |
![]() |
A GMimeParserOptions is used to pass various options to GMimeParser and all of the various other parser functions in GMime.
GMimeParserOptions *
g_mime_parser_options_new (void
);
Creates a new set of GMimeParserOptions.
void
g_mime_parser_options_free (GMimeParserOptions *options
);
Frees a set of GMimeParserOptions.
GMimeParserOptions *
g_mime_parser_options_clone (GMimeParserOptions *options
);
Clones a GMimeParserOptions.
GMimeParserOptions *
g_mime_parser_options_get_default (void
);
Gets the default parser options.
GMimeRfcComplianceMode
g_mime_parser_options_get_address_compliance_mode
(GMimeParserOptions *options
);
Gets the compliance mode that should be used when parsing rfc822 addresses.
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the address parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
void g_mime_parser_options_set_address_compliance_mode (GMimeParserOptions *options
,GMimeRfcComplianceMode mode
);
Sets the compliance mode that should be used when parsing rfc822 addresses.
In general, you'll probably want this value to be GMIME_RFC_COMPLIANCE_LOOSE (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the address parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
GMimeRfcComplianceMode
g_mime_parser_options_get_parameter_compliance_mode
(GMimeParserOptions *options
);
Gets the compliance mode that should be used when parsing Content-Type and Content-Disposition parameters.
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
void g_mime_parser_options_set_parameter_compliance_mode (GMimeParserOptions *options
,GMimeRfcComplianceMode mode
);
Sets the compliance mode that should be used when parsing Content-Type and Content-Disposition parameters.
In general, you'll probably want this value to be GMIME_RFC_COMPLIANCE_LOOSE (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
GMimeRfcComplianceMode
g_mime_parser_options_get_rfc2047_compliance_mode
(GMimeParserOptions *options
);
Gets the compliance mode that should be used when parsing rfc2047 encoded words.
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the rfc2047 parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
void g_mime_parser_options_set_rfc2047_compliance_mode (GMimeParserOptions *options
,GMimeRfcComplianceMode mode
);
Sets the compliance mode that should be used when parsing rfc2047 encoded words.
In general, you'll probably want this value to be GMIME_RFC_COMPLIANCE_LOOSE (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal in what it accepts. Setting it to GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to deal with garbage input.
const char **
g_mime_parser_options_get_fallback_charsets
(GMimeParserOptions *options
);
Gets the fallback charsets to try when decoding 8-bit headers.
void g_mime_parser_options_set_fallback_charsets (GMimeParserOptions *options
,const char **charsets
);
Sets the fallback charsets to try when decoding 8-bit headers.
Note: It is recommended that the list of charsets start with utf-8 and end with iso-8859-1.
typedef struct _GMimeParserOptions GMimeParserOptions;
A set of parser options used by GMimeParser and various other parsing functions.