Camel.MimePart¶
| Subclasses: | Camel.MimeMessage | 
|---|
Methods¶
| Inherited: | Camel.Medium (8), Camel.DataWrapper (31), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| construct_content_from_parser(mp, cancellable) | |
| construct_from_parser(parser, io_priority, cancellable, callback, *user_data) | |
| construct_from_parser_finish(result) | |
| construct_from_parser_sync(parser, cancellable) | |
| get_content_disposition() | |
| get_content_id() | |
| get_content_languages() | |
| get_content_location() | |
| get_content_md5() | |
| get_content_type() | |
| get_description() | |
| get_disposition() | |
| get_encoding() | |
| get_filename() | |
| set_content(data, type) | |
| set_content_id(contentid) | |
| set_content_languages(content_languages) | |
| set_content_location(location) | |
| set_content_md5(md5sum) | |
| set_content_type(content_type) | |
| set_description(description) | |
| set_disposition(disposition) | |
| set_encoding(encoding) | |
| set_filename(filename) | 
Virtual Methods¶
| Inherited: | Camel.Medium (8), Camel.DataWrapper (11), GObject.Object (7) | 
|---|
| do_construct_from_parser_sync(parser, cancellable) | 
Properties¶
| Inherited: | Camel.Medium (1) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| content-id | str | r/w/en | |
| content-md5 | str | r/w/en | |
| description | str | r/w/en | |
| disposition | str | r/w/en | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Camel.MimePart(**kwargs)¶
- Bases: - Camel.Medium- Abstract: - No - Structure: - Camel.MimePartClass- 
classmethod new()¶
- Returns: - a new - Camel.MimePart- Return type: - Camel.MimePart- Create a new MIME - Camel.part.
 - 
construct_content_from_parser(mp, cancellable)¶
- Parameters: - mp (Camel.MimeParser) – aCamel.MimeParser
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - whether succeeded - Return type: - Constructs the contnet of self from the given mime parser. - New in version 2.24. 
- mp (
 - 
construct_from_parser(parser, io_priority, cancellable, callback, *user_data)¶
- Parameters: - parser (Camel.MimeParser) – aCamel.MimeParser
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously constructs a MIME - Camel.partfrom a parser.- When the operation is finished, callback will be called. You can then call - Camel.MimePart.construct_from_parser_finish() to get the result of the operation.- New in version 3.0. 
- parser (
 - 
construct_from_parser_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Finishes the operation started with - Camel.MimePart.construct_from_parser().- New in version 3.0. 
 - 
construct_from_parser_sync(parser, cancellable)¶
- Parameters: - parser (Camel.MimeParser) – aCamel.MimeParser
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - Constructs a MIME - Camel.partfrom a parser.- New in version 3.0. 
- parser (
 - 
get_content_disposition()¶
- Returns: - the disposition structure - Return type: - Camel.ContentDisposition- Get the disposition of the MIME - Camel.partas a structure. Returned pointer is owned by self.- New in version 2.30. 
 - 
get_content_id()¶
- Returns: - the content-id field of the MIME - Camel.part- Return type: - str- Get the content-id field of a MIME - Camel.part.
 - 
get_content_languages()¶
- Returns: - a - GLib.Listof languages- Return type: - [ - str]- Get the Content-Languages set on the MIME - Camel.part.
 - 
get_content_location()¶
- Returns: - the content-location field of a MIME - Camel.part- Return type: - str- Get the content-location field of a MIME - Camel.part.
 - 
get_content_md5()¶
- Returns: - the content-md5 field of the MIME - Camel.part- Return type: - str- Get the content-md5 field of the MIME - Camel.part.
 - 
get_content_type()¶
- Returns: - the parsed - Camel.ContentTypeof the MIME- Camel.part- Return type: - Camel.ContentType- Get the Content-Type of a MIME - Camel.part.
 - 
get_description()¶
- Returns: - the description - Return type: - str- Get the description of the MIME - Camel.part.
 - 
get_disposition()¶
- Returns: - the disposition - Return type: - str- Get the disposition of the MIME - Camel.part.
 - 
get_encoding()¶
- Returns: - a - Camel.TransferEncoding- Return type: - Camel.TransferEncoding- Get the Content-Transfer-Encoding of a MIME - Camel.part.
 - 
get_filename()¶
- Returns: - the filename of the MIME - Camel.part- Return type: - str- Get the filename of a MIME - Camel.part.
 - 
set_content(data, type)¶
- Parameters: - Utility function used to set the content of a mime - Camel.partobject to be the provided data. If length is 0, this routine can be used as a way to remove old content (in which case data and type are ignored and may be- None).
 - 
set_content_id(contentid)¶
- Parameters: - contentid ( - str) – content id- Set the content-id field on a MIME - Camel.part.
 - 
set_content_languages(content_languages)¶
- Parameters: - content_languages ([ - str]) – list of languages- Set the Content-Languages field of a MIME - Camel.part.
 - 
set_content_location(location)¶
- Parameters: - location ( - str) – the content-location value of the MIME- Camel.part- Set the content-location field of the MIME - Camel.part.
 - 
set_content_md5(md5sum)¶
- Parameters: - md5sum ( - str) – the md5sum of the MIME- Camel.part- Set the content-md5 field of the MIME - Camel.part.
 - 
set_content_type(content_type)¶
- Parameters: - content_type ( - str) – content-type string- Set the content-type on a MIME - Camel.part.
 - 
set_description(description)¶
- Parameters: - description ( - str) – description of the MIME- Camel.part- Set a description on the MIME - Camel.part.
 - 
set_disposition(disposition)¶
- Parameters: - disposition ( - str) – disposition of the MIME- Camel.part- Set a disposition on the MIME - Camel.part.
 - 
set_encoding(encoding)¶
- Parameters: - encoding ( - Camel.TransferEncoding) – a- Camel.TransferEncoding- Set the Content-Transfer-Encoding to use on a MIME - Camel.part.
 - 
set_filename(filename)¶
- Parameters: - filename ( - str) – filename given to the MIME- Camel.part- Set the filename on a MIME - Camel.part.
 - 
do_construct_from_parser_sync(parser, cancellable) virtual¶
- Parameters: - parser (Camel.MimeParser) – aCamel.MimeParser
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Return type: - Constructs a MIME - Camel.partfrom a parser.- New in version 3.0. 
- parser (
 
- 
classmethod 
Property Details¶
- 
Camel.MimePart.props.content_id¶
- Name: - content-id- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY
- 
Camel.MimePart.props.content_md5¶
- Name: - content-md5- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY