GMimeStreamCat

GMimeStreamCat — A concatenated stream

Functions

Types and Values

Description

A GMimeStream which chains together any number of other streams.

Reads fill the requested buffer across child-stream boundaries without seeking or resetting the children. Sources are read from their current positions and are retained by reference. Explicit seek and reset operations still require the affected children to support repositioning.

Functions

g_mime_stream_cat_new ()

GMimeStream *
g_mime_stream_cat_new (void);

Creates a new GMimeStreamCat object.

Returns

a new GMimeStreamCat stream.


g_mime_stream_cat_add_source ()

int
g_mime_stream_cat_add_source (GMimeStreamCat *cat,
                              GMimeStream *source);

Adds a reference to source to the cat without seeking or resetting it. Reading starts at the source's current position. Adding a source after end-of-stream makes that source available to subsequent reads. Close and finalization release the retained references without explicitly flushing or closing the sources. Flush output explicitly before closing.

Parameters

cat

a GMimeStreamCat

 

source

a source stream

 

Returns

0 on success or -1 on fail.

Types and Values

GMimeStreamCat

typedef struct _GMimeStreamCat GMimeStreamCat;

A concatenation of other GMimeStream objects.

See Also

GMimeStream