ConverterInputStream

Converter input stream implements #GInputStream and allows conversion of data of various types during reading.

As of GLib 2.34, #GConverterInputStream implements #GPollableInputStream.

Constructors

this
this(GConverterInputStream* gConverterInputStream, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(InputStream baseStream, ConverterIF converter)

Creates a new converter input stream for the @base_stream.

Members

Functions

getConverter
ConverterIF getConverter()

Gets the #GConverter that is used by @converter_stream.

getConverterInputStreamStruct
GConverterInputStream* getConverterInputStreamStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin PollableInputStreamT!(GConverterInputStream)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gConverterInputStream
GConverterInputStream* gConverterInputStream;

the main Gtk struct

Inherited Members

From FilterInputStream

gFilterInputStream
GFilterInputStream* gFilterInputStream;

the main Gtk struct

getFilterInputStreamStruct
GFilterInputStream* getFilterInputStreamStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
getBaseStream
InputStream getBaseStream()

Gets the base stream for the filter stream.

getCloseBaseStream
bool getCloseBaseStream()

Returns whether the base stream will be closed when @stream is closed.

setCloseBaseStream
void setCloseBaseStream(bool closeBase)

Sets whether the base stream will be closed when @stream is closed.

From PollableInputStreamIF

getPollableInputStreamStruct
GPollableInputStream* getPollableInputStreamStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

canPoll
bool canPoll()

Checks if @stream is actually pollable. Some classes may implement #GPollableInputStream but have only certain instances of that class be pollable. If this method returns %FALSE, then the behavior of other #GPollableInputStream methods is undefined.

createSource
Source createSource(Cancellable cancellable)

Creates a #GSource that triggers when @stream can be read, or @cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.

isReadable
bool isReadable()

Checks if @stream can be read.

readNonblocking
ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable)

Attempts to read up to @count bytes from @stream into @buffer, as with g_input_stream_read(). If @stream is not currently readable, this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_input_stream_create_source() to create a #GSource that will be triggered when @stream is readable.

Meta