GMimeStreamGIO

GMimeStreamGIO — A wrapper for GLib's GIO streams

Functions

Types and Values

Description

A simple GMimeStream implementation that sits on top of GLib's GIO input and output streams.

Functions

g_mime_stream_gio_new ()

GMimeStream *
g_mime_stream_gio_new (GFile *file);

Creates a new GMimeStreamGIO wrapper around a GFile object.

Parameters

file

a GFile

 

Returns

a stream using file .

[transfer full]

g_mime_stream_gio_new_with_bounds ()

GMimeStream *
g_mime_stream_gio_new_with_bounds (GFile *file,
                                   gint64 start,
                                   gint64 end);

Creates a new GMimeStreamGIO stream around a GFile with bounds start and end .

Parameters

file

a GFile

 

start

start boundary

 

end

end boundary

 

Returns

a stream using file with bounds start and end .

[transfer full]

g_mime_stream_gio_get_owner ()

gboolean
g_mime_stream_gio_get_owner (GMimeStreamGIO *stream);

Gets whether or not stream owns the backend GFile.

Parameters

stream

a GMimeStreamGIO stream

 

Returns

TRUE if stream owns the backend GFile or FALSE otherwise.

g_mime_stream_gio_set_owner ()

void
g_mime_stream_gio_set_owner (GMimeStreamGIO *stream,
                             gboolean owner);

Sets whether or not stream owns the backend GIO pointer.

Note: owner should be TRUE if the stream should close() the backend file descriptor when destroyed or FALSE otherwise.

Parameters

stream

a GMimeStreamGIO stream

 

owner

TRUE if this stream should own the GFile or FALSE otherwise

 

Types and Values

struct GMimeStreamGIO

struct GMimeStreamGIO {
	GMimeStream parent_object;

	GOutputStream *ostream;
	GInputStream *istream;
	GFile *file;

	gboolean owner;
	gboolean eos;
};

A GMimeStream wrapper around GLib's GIO streams.

Members

GMimeStream parent_object;

parent GMimeStream

 

GOutputStream *ostream;

a GOutputStream

 

GInputStream *istream;

a GInputStream

 

GFile *file;

a GFile

 

gboolean owner;

TRUE if this stream owns the GFile or FALSE otherwise

 

gboolean eos;

TRUE if the end of the stream has been reached or FALSE otherwise

 

See Also

GMimeStream