## GMimeStreamPipe GMimeStreamPipe — A low-level pipe stream |

## Functions

GMimeStream * | g_mime_stream_pipe_new ()
gboolean | g_mime_stream_pipe_get_owner ()
void | g_mime_stream_pipe_set_owner ()

## Types and Values

struct | GMimeStreamPipe

## Description

A simple GMimeStream implementation that sits on top of low-level POSIX pipes.

## Functions

### g_mime_stream_pipe_new ()

    GMimeStream *
    g_mime_stream_pipe_new (int fd);

Creates a new GMimeStreamPipe object around `fd` .

#### Parameters

fd | a pipe descriptor |

#### Returns

a stream using `fd` .

### g_mime_stream_pipe_get_owner ()

    gboolean
    g_mime_stream_pipe_get_owner (GMimeStreamPipe *stream);

Gets whether or not `stream` owns the backend pipe descriptor.

#### Parameters

stream | a GMimeStreamPipe |

#### Returns

`TRUE` if `stream` owns the backend pipe descriptor or `FALSE` otherwise.

### g_mime_stream_pipe_set_owner ()

    void
    g_mime_stream_pipe_set_owner (GMimeStreamPipe *stream,
                                  gboolean owner);

Sets whether or not `stream` owns the backend pipe descriptor.

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

#### Parameters

stream | a GMimeStreamPipe |
owner | owner |

## Types and Values

### struct GMimeStreamPipe

    struct GMimeStreamPipe {
    	GMimeStream parent_object;

    	gboolean owner;
    	gboolean eos;
    	int fd;
    };

A GMimeStream wrapper around pipes.

#### Members

GMimeStream `parent_object`; | parent GMimeStream |
gboolean `owner`; | `TRUE` if this stream owns `fd` |
gboolean `eos`; | `TRUE` if end-of-stream |
int `fd`; | pipe descriptor |

## See Also

GMimeStream