GMime.PartIter¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GMime.PartIter¶
A MIME part iterator.
- classmethod new(toplevel)¶
- Parameters:
toplevel (
GMime.Object
) – aGMime.Object
to use as the toplevel- Returns:
a newly allocated
GMime.PartIter
which should be freed usingGMime.PartIter.free
() when finished with it.- Return type:
Creates a new
GMime.PartIter
for iterating over toplevel's subparts.
- clone()¶
- Returns:
a new
GMime.PartIter
that is identical to self.- Return type:
Clones the self, including its current state.
- free()¶
Frees the memory allocated by
GMime.PartIter.new
().
- get_current()¶
- Returns:
the current
GMime.Object
orNone
if the state of self is invalid.- Return type:
Gets the
GMime.Object
at the currentGMime.PartIter
position.
- get_parent()¶
- Returns:
the parent
GMime.Object
orNone
if the state of self is invalid.- Return type:
Gets the parent of the
GMime.Object
at the currentGMime.PartIter
position.
- get_path()¶
- Returns:
a newly allocated string representation of the path to the
GMime.Object
at the currentGMime.PartIter
position.- Return type:
Gets the path of the current
GMime.Object
in the MIME structure used to initialize self.
- get_toplevel()¶
- Returns:
the toplevel
GMime.Object
.- Return type:
Gets the toplevel
GMime.Object
used to initialize self.
- is_valid()¶
-
Checks that the current state of self is valid.
- jump_to(path)¶
- Parameters:
path (
str
) – a string representing the path to jump to- Returns:
True
if theGMime.Object
specified by path exists orFalse
otherwise.- Return type:
Updates the state of self to point to the
GMime.Object
specified by path.
- next()¶
-
Advances to the next part in the MIME structure used to initialize self.
- prev()¶
-
Rewinds to the previous part in the MIME structure used to initialize self.
- remove()¶
-
Removes the
GMime.Object
at the current position from its parent. If successful, self is advanced to the next position (since the current position will become invalid).
- replace(replacement)¶
- Parameters:
replacement (
GMime.Object
) – aGMime.Object
- Returns:
True
if the part at the current position was replaced orFalse
otherwise.- Return type:
Replaces the
GMime.Object
at the current position with replacement.
- reset()¶
Resets the state of self to its initial state.