Mirage.FilterStream

g GObject.GInterface GObject.GInterface Mirage.Contextual Mirage.Contextual GObject.GInterface->Mirage.Contextual Mirage.Stream Mirage.Stream GObject.GInterface->Mirage.Stream GObject.Object GObject.Object Mirage.Object Mirage.Object GObject.Object->Mirage.Object Mirage.Contextual->Mirage.Object Mirage.FilterStream Mirage.FilterStream Mirage.Object->Mirage.FilterStream Mirage.Stream->Mirage.FilterStream

Subclasses:

None

Methods

Inherited:

Mirage.Object (2), GObject.Object (37), Mirage.Contextual (8), Mirage.Stream (8)

Structs:

GObject.ObjectClass (5)

get_info ()

get_underlying_stream ()

open (stream, writable)

simplified_get_position ()

simplified_set_stream_length (length)

Virtual Methods

Inherited:

GObject.Object (7), Mirage.Contextual (2), Mirage.Stream (7)

do_open (stream, writable)

do_read (buffer, count)

do_seek (offset, type)

do_simplified_partial_read (buffer, count)

do_simplified_partial_write (buffer, count)

do_tell ()

do_write (buffer, count)

Properties

None

Signals

Inherited:

Mirage.Object (1), GObject.Object (1)

Fields

Inherited:

Mirage.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Mirage.Object

r

Class Details

class Mirage.FilterStream(**kwargs)
Bases:

Mirage.Object, Mirage.Stream

Abstract:

Yes

Structure:

Mirage.FilterStreamClass

All the fields in the Mirage.FilterStream structure are private to the Mirage.FilterStream implementation and should never be accessed directly.

get_info()
Returns:

a pointer to filter stream information structure. The structure belongs to object and therefore should not be modified.

Return type:

Mirage.FilterStreamInfo

Retrieves filter stream information.

get_underlying_stream()
Returns:

a pointer to filter stream’s underlying stream. The reference belongs to filter stream and should not be released.

Return type:

Mirage.Stream

Retrieves filter stream’s underlying stream.

open(stream, writable)
Parameters:
  • stream (Mirage.Stream) – an underlying stream

  • writable (bool) – a flag indicating whether the stream should be opened in read/write mode or not

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Opens stream on top of provided underlying stream.

simplified_get_position()
Returns:

position in the stream

Return type:

int

Retrieves position in the stream.

This function is intented for use in filter stream implementations that are based on the simplified interface. It should be used by the implementation’s simplified_partial_read function to determine position to read from without having to worry about position management and update.

simplified_set_stream_length(length)
Parameters:

length (int) – length of the stream

Sets size of the stream.

This function is intented for use in filter stream implementations that are based on the simplified interface. It should be used by the implementation to set the stream size during stream parsing; the set stream size is then used by the read function that is implemented by the simplified interface.

do_open(stream, writable) virtual
Parameters:
  • stream (Mirage.Stream) – an underlying stream

  • writable (bool) – a flag indicating whether the stream should be opened in read/write mode or not

Returns:

True on success, False on failure

Return type:

bool

Opens stream on top of provided underlying stream.

do_read(buffer, count) virtual
Parameters:
Return type:

int

reads data from stream

do_seek(offset, type) virtual
Parameters:
Return type:

bool

seeks to a location within stream

do_simplified_partial_read(buffer, count) virtual
Parameters:
Return type:

int

reads a chunk of requested data from stream (part of simplified interface)

do_simplified_partial_write(buffer, count) virtual
Parameters:
Return type:

int

writes a chunk of requested data to stream (part of simplified interface)

do_tell() virtual
Return type:

int

tells the current location within stream

do_write(buffer, count) virtual
Parameters:
Return type:

int

wrties data to stream