Camel.Multipart¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.Multipart(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Camel.Multipart
object- Return type:
Create a new
Camel.Multipart
object.
- add_part(part)¶
- Parameters:
part (
Camel.MimePart
) – aCamel.MimePart
to add
Appends the
Camel.part
to the multipart object.
- construct_from_parser(parser)¶
- Parameters:
parser (
Camel.MimeParser
) – aCamel.MimeParser
object- Returns:
0 on success or -1 on fail
- Return type:
Construct a multipart from a parser.
- generate_preview(func, *user_data)¶
- Parameters:
func (
Camel.GeneratePreviewFunc
orNone
) – an optionalCamel.GeneratePreviewFunc
function, orNone
user_data (
object
orNone
) – user data for the func, orNone
- Returns:
Camel.part
's preview as a new string, orNone
, when cannot be generated. Free withGLib.free
(), when no longer needed.- Return type:
Generates preview of the self, to be used in the interface, read by the users.
The optional func can be used to override default preview generation function. If provided, it’s always called as the first try on the parts.
New in version 3.52.
- get_part(index)¶
- get_postface()¶
- Returns:
the postface text
- Return type:
Returns the postface text for self.
New in version 3.12.
- get_preface()¶
- Returns:
the preface text
- Return type:
Returns the preface text for self.
New in version 3.12.
- set_boundary(boundary)¶
-
Sets the message boundary for self to boundary. This should be a string which does not occur anywhere in any of self's subparts. If boundary is
None
, a randomly-generated boundary will be used.
- set_postface(postface)¶
- Parameters:
postface (
str
) – multipat postface
Set the postface text for this multipart. Will be written out after the last boundary of the multipart, and ignored by any MIME mail client.
Generally postface texts should not be sent with multipart messages.
- set_preface(preface)¶
- Parameters:
preface (
str
) – the multipart preface
Set the preface text for this multipart. Will be written out infront of the multipart. This text should only include US-ASCII strings, and be relatively short, and will be ignored by any MIME mail client.
- do_add_part(part) virtual¶
- Parameters:
part (
Camel.MimePart
) – aCamel.MimePart
to add
Appends the
Camel.part
to the multipart object.
- do_construct_from_parser(parser) virtual¶
- Parameters:
parser (
Camel.MimeParser
) – aCamel.MimeParser
object- Returns:
0 on success or -1 on fail
- Return type:
Construct a multipart from a parser.
- do_generate_preview(func, *user_data) virtual¶
- Parameters:
func (
Camel.GeneratePreviewFunc
orNone
) – an optionalCamel.GeneratePreviewFunc
function, orNone
user_data (
object
orNone
) – user data for the func, orNone
- Returns:
Camel.part
's preview as a new string, orNone
, when cannot be generated. Free withGLib.free
(), when no longer needed.- Return type:
Generates preview of the multipart, to be used in the interface, read by the users.
The optional func can be used to override default preview generation function. If provided, it’s always called as the first try on the parts.
New in version 3.52.
- do_get_part(index) virtual¶