Callbacks¶
|
|
|
|
|
|
|
|
|
Details¶
- GMime.HeaderRawValueFormatter(header, options, value, charset)¶
- Parameters:
header (
GMime.Header
) – aGMime.Header
options (
GMime.FormatOptions
) – aGMime.FormatOptions
value (
str
) – an unencoded header valuecharset (
str
) – a charset
- Returns:
the encoded and formatted raw header value.
- Return type:
Function callback for encoding and formatting a header value.
- GMime.ObjectForeachFunc(parent, part, *user_data)¶
- Parameters:
parent (
GMime.Object
) – parentGMime.Object
part (
GMime.Object
) – aGMime.Object
The function signature for a callback to
GMime.Message.foreach
() andGMime.Multipart.foreach
().
- GMime.ParserHeaderRegexFunc(parser, header, value, offset, *user_data)¶
- Parameters:
parser (
GMime.Parser
) – TheGMime.Parser
object.header (
str
) – The header field matched.value (
str
) – The header field value.offset (
int
) – The header field offset.user_data (
object
orNone
) – The user-supplied callback data.
Function signature for the callback to g_mime_parser_set_header_regex().
- GMime.ParserWarningFunc(offset, errcode, item, *user_data)¶
- Parameters:
offset (
int
) – parser offset where the issue has been detected, or -1 if it is unknownerrcode (
GMime.ParserWarning
) – aGMime.ParserWarning
item (
str
) – a NUL-terminated string containing the value causing the issue, may beNone
The function signature for a callback to
GMime.ParserOptions.set_warning_callback
().
- GMime.PasswordRequestFunc(ctx, user_id, prompt, reprompt, response)¶
- Parameters:
ctx (
GMime.CryptoContext
) – theGMime.CryptoContext
making the requestuser_id (
str
) – the user_id of the password being requestedprompt (
str
) – a string containing some helpful context for the promptreprompt (
bool
) –True
if this password request is a reprompt due to a previously bad password responseresponse (
GMime.Stream
) – a stream for the application to write the password to (followed by a newline ‘\n’ character)
- Returns:
- Return type:
A password request callback allowing a
GMime.CryptoContext
to prompt the user for a password for a given key.