ConverterOutputStream

Converter output stream implements #GOutputStream and allows conversion of data of various types during reading.

As of GLib 2.34, #GConverterOutputStream implements #GPollableOutputStream.

Constructors

this
this(GConverterOutputStream* gConverterOutputStream, bool ownedRef)

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

this
this(OutputStream baseStream, ConverterIF converter)

Creates a new converter output stream for the @base_stream.

Members

Functions

getConverter
ConverterIF getConverter()

Gets the #GConverter that is used by @converter_stream.

getConverterOutputStreamStruct
GConverterOutputStream* getConverterOutputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Mixins

__anonymous
mixin PollableOutputStreamT!(GConverterOutputStream)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gConverterOutputStream
GConverterOutputStream* gConverterOutputStream;

the main Gtk struct

Inherited Members

From FilterOutputStream

gFilterOutputStream
GFilterOutputStream* gFilterOutputStream;

the main Gtk struct

getFilterOutputStreamStruct
GFilterOutputStream* getFilterOutputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getBaseStream
OutputStream 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 PollableOutputStreamIF

getPollableOutputStreamStruct
GPollableOutputStream* getPollableOutputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
canPoll
bool canPoll()

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

createSource
Source createSource(Cancellable cancellable)

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

isWritable
bool isWritable()

Checks if @stream can be written.

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

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

Meta