GMime.DataWrapper¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
encoding |
r |
the encoding of the content |
|
parent_object |
r |
parent |
|
stream |
r |
content stream |
Class Details¶
- class GMime.DataWrapper(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A wrapper for a stream which may be encoded.
- classmethod new()¶
- Returns:
a new data wrapper object.
- Return type:
Creates a new
GMime.DataWrapper
object.
- classmethod new_with_stream(stream, encoding)¶
- Parameters:
stream (
GMime.Stream
) – aGMime.Stream
encoding (
GMime.ContentEncoding
) – stream’s encoding
- Returns:
a data wrapper around stream. Since the wrapper owns its own reference on the stream, caller is responsible for unrefing its own copy.
- Return type:
Creates a new
GMime.DataWrapper
object around stream.
- get_encoding()¶
- Returns:
the encoding type of the internal stream.
- Return type:
Gets the encoding type of the stream wrapped by self.
- get_stream()¶
- Returns:
a reference to the internal stream.
- Return type:
Gets a reference to the stream wrapped by self.
- set_encoding(encoding)¶
- Parameters:
encoding (
GMime.ContentEncoding
) – encoding
Sets the encoding type of the internal stream.
- set_stream(stream)¶
- Parameters:
stream (
GMime.Stream
) – aGMime.Stream
Replaces the wrapper’s internal stream with stream. Don’t forget, if stream is not of the same encoding as the old stream, you’ll want to call
GMime.DataWrapper.set_encoding
() as well.Note: caller is responsible for its own reference on stream.
- write_to_stream(stream)¶
- Parameters:
stream (
GMime.Stream
) – output stream- Returns:
the number of bytes written or %-1 on failure.
- Return type:
Writes the raw (decoded) data to the output stream.
- do_write_to_stream(stream) virtual¶
- Parameters:
stream (
GMime.Stream
) – output stream- Returns:
the number of bytes written or %-1 on failure.
- Return type:
Writes the raw (decoded) data to the output stream.