SimpleIOStream

GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and #GOutputStream. This allows any pair of input and output streams to be used with #GIOStream methods.

This is useful when you obtained a #GInputStream and a #GOutputStream by other means, for instance creating them with platform specific methods as g_unix_input_stream_new() or g_win32_input_stream_new(), and you want to take advantage of the methods provided by #GIOStream.

Constructors

this
this(GSimpleIOStream* gSimpleIOStream, bool ownedRef)

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

this
this(InputStream inputStream, OutputStream outputStream)

Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream. See also #GIOStream.

Members

Functions

getSimpleIOStreamStruct
GSimpleIOStream* getSimpleIOStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gSimpleIOStream
GSimpleIOStream* gSimpleIOStream;

the main Gtk struct

Inherited Members

From IOStream

gIOStream
GIOStream* gIOStream;

the main Gtk struct

getIOStreamStruct
GIOStream* getIOStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
spliceFinish
bool spliceFinish(AsyncResultIF result)

Finishes an asynchronous io stream splice operation.

clearPending
void clearPending()

Clears the pending flag on @stream.

close
bool close(Cancellable cancellable)

Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.

closeAsync
void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_io_stream_close_finish() to get the result of the operation.

closeFinish
bool closeFinish(AsyncResultIF result)

Closes a stream.

getInputStream
InputStream getInputStream()

Gets the input stream for this object. This is used for reading.

getOutputStream
OutputStream getOutputStream()

Gets the output stream for this object. This is used for writing.

hasPending
bool hasPending()

Checks if a stream has pending actions.

isClosed
bool isClosed()

Checks if a stream is closed.

setPending
bool setPending()

Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error.

spliceAsync
void spliceAsync(IOStream stream2, GIOStreamSpliceFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously splice the output stream of @stream1 to the input stream of @stream2, and splice the output stream of @stream2 to the input stream of @stream1.

Meta

Since

2.44