GIOFuncs

A table of functions used to handle different types of #GIOChannel in a generic way.

Members

Variables

ioClose
GIOStatus function(GIOChannel* channel, GError** _err) ioClose;

closes the channel. This is called from glib.iochannel.IOChannel.close after flushing the buffers.

ioCreateWatch
GSource* function(GIOChannel* channel, GIOCondition condition) ioCreateWatch;

creates a watch on the channel. This call corresponds directly to glib.global.ioCreateWatch.

ioFree
void function(GIOChannel* channel) ioFree;

called from glib.iochannel.IOChannel.unref when the channel needs to be freed. This function must free the memory associated with the channel, including freeing the #GIOChannel structure itself. The channel buffers have been flushed and possibly @io_close has been called by the time this function is called.

ioGetFlags
GIOFlags function(GIOChannel* channel) ioGetFlags;

gets the #GIOFlags for the channel. This function need only return the G_IO_FLAG_APPEND and G_IO_FLAG_NONBLOCK flags; glib.iochannel.IOChannel.getFlags automatically adds the others as appropriate.

ioRead
GIOStatus function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead, GError** _err) ioRead;

reads raw bytes from the channel. This is called from various functions such as glib.iochannel.IOChannel.readChars to read raw bytes from the channel. Encoding and buffering issues are dealt with at a higher level.

ioSeek
GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** _err) ioSeek;

seeks the channel. This is called from glib.iochannel.IOChannel.seek on channels that support it.

ioSetFlags
GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** _err) ioSetFlags;

sets the #GIOFlags on the channel. This is called from glib.iochannel.IOChannel.setFlags with all flags except for G_IO_FLAG_APPEND and G_IO_FLAG_NONBLOCK masked out.

ioWrite
GIOStatus function(GIOChannel* channel, const(char)* buf, size_t count, size_t* bytesWritten, GError** _err) ioWrite;

writes raw bytes to the channel. This is called from various functions such as glib.iochannel.IOChannel.writeChars to write raw bytes to the channel. Encoding and buffering issues are dealt with at a higher level.