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.ContentDisposition
object.- Return type:
Creates a new
GMime.ContentDisposition
object.
- classmethod parse(options, str)¶
- Parameters:
options (
GMime.ParserOptions
orNone
) – aGMime.ParserOptions
orNone
str (
str
) – Content-Disposition field value
- Returns:
a new
GMime.ContentDisposition
object.- Return type:
Parses the input string into a
GMime.ContentDisposition
object.
- encode(options)¶
- Parameters:
options (
GMime.FormatOptions
orNone
) – aGMime.FormatOptions
orNone
- 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_ATTACHMENT
orGMime.DISPOSITION_INLINE
.- Return type:
Gets the disposition or
None
on fail.
- get_parameter(name)¶
- Parameters:
name (
str
) – parameter name- Returns:
the value of the requested parameter or
None
if 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_ATTACHMENT
orGMime.DISPOSITION_INLINE
or, by your choice, any other string which would indicate how the MIME part should be displayed by the MUA.