## CamelMimeFilter

CamelMimeFilter

## Synopsis

    struct              CamelMimeFilter;
    CamelMimeFilter*    camel_mime_filter_new               (void);
    void                camel_mime_filter_filter            (CamelMimeFilter *filter,
                                                             char *in,
                                                             size_t len,
                                                             size_t prespace,
                                                             char **out,
                                                             size_t *outlen,
                                                             size_t *outprespace);
    void                camel_mime_filter_complete          (CamelMimeFilter *filter,
                                                             char *in,
                                                             size_t len,
                                                             size_t prespace,
                                                             char **out,
                                                             size_t *outlen,
                                                             size_t *outprespace);
    void                camel_mime_filter_reset             (CamelMimeFilter *filter);
    void                camel_mime_filter_backup            (CamelMimeFilter *filter,
                                                             const char *data,
                                                             size_t length);
    void                camel_mime_filter_set_size          (CamelMimeFilter *filter,
                                                             size_t size,
                                                             int keep);

## Description

## Details

### struct CamelMimeFilter

    struct CamelMimeFilter {
    	CamelObject parent;

    	struct _CamelMimeFilterPrivate *priv;

    	char *outreal;		/* real malloc'd buffer */
    	char *outbuf;		/* first 'writable' position allowed (outreal + outpre) */
    	char *outptr;
    	size_t outsize;
    	size_t outpre;		/* prespace of this buffer */

    	char *backbuf;
    	size_t backsize;
    	size_t backlen;		/* significant data there */
    };

### camel_mime_filter_new ()

    CamelMimeFilter*    camel_mime_filter_new               (void);

Returns : |

### camel_mime_filter_filter ()

    void                camel_mime_filter_filter            (CamelMimeFilter *filter,
                                                             char *in,
                                                             size_t len,
                                                             size_t prespace,
                                                             char **out,
                                                             size_t *outlen,
                                                             size_t *outprespace);

`filter` : |
`in` : |
`len` : |
`prespace` : |
`out` : |
`outlen` : |
`outprespace` : |

### camel_mime_filter_complete ()

    void                camel_mime_filter_complete          (CamelMimeFilter *filter,
                                                             char *in,
                                                             size_t len,
                                                             size_t prespace,
                                                             char **out,
                                                             size_t *outlen,
                                                             size_t *outprespace);

`filter` : |
`in` : |
`len` : |
`prespace` : |
`out` : |
`outlen` : |
`outprespace` : |

### camel_mime_filter_reset ()

    void                camel_mime_filter_reset             (CamelMimeFilter *filter);

`filter` : |

### camel_mime_filter_backup ()

    void                camel_mime_filter_backup            (CamelMimeFilter *filter,
                                                             const char *data,
                                                             size_t length);

`filter` : |
`data` : |
`length` : |

### camel_mime_filter_set_size ()

    void                camel_mime_filter_set_size          (CamelMimeFilter *filter,
                                                             size_t size,
                                                             int keep);

`filter` : |
`size` : |
`keep` : |