GMime.ContentDisposition¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
changed |
r |
||
disposition |
r |
disposition |
|
params |
r |
a |
|
parent_object |
r |
parent |
Class Details¶
- class GMime.ContentDisposition(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A data structure representing a Content-Disposition.
- classmethod new()¶
- Returns:
a new
GMime.ContentDispositionobject.- Return type:
Creates a new
GMime.ContentDispositionobject.
- classmethod parse(options, str)¶
- Parameters:
options (
GMime.ParserOptionsorNone) – aGMime.ParserOptionsorNonestr (
str) – Content-Disposition field value
- Returns:
a new
GMime.ContentDispositionobject.- Return type:
Parses the input string into a
GMime.ContentDispositionobject.
- encode(options)¶
- Parameters:
options (
GMime.FormatOptionsorNone) – aGMime.FormatOptionsorNone- Returns:
a new string containing the encoded header value.
- Return type:
Encodes the Content-Disposition header.
- get_disposition()¶
- Returns:
the disposition string which is probably one of
GMime.DISPOSITION_ATTACHMENTorGMime.DISPOSITION_INLINE.- Return type:
Gets the disposition or
Noneon fail.
- get_parameter(name)¶
- Parameters:
name (
str) – parameter name- Returns:
the value of the requested parameter or
Noneif the parameter is not set. If the parameter is set, the returned string will be in UTF-8.- Return type:
Gets the parameter value specified by name if it’s available.
- get_parameters()¶
- Returns:
the Content-Disposition’s parameter list.
- Return type:
Gets the Content-Disposition parameter list.
- is_attachment()¶
-
Determines if a Content-Disposition has a value of “attachment”.
- set_disposition(value)¶
- Parameters:
value (
str) – disposition value
Sets the disposition to value which may be one of
GMime.DISPOSITION_ATTACHMENTorGMime.DISPOSITION_INLINEor, by your choice, any other string which would indicate how the MIME part should be displayed by the MUA.