/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/* 
 *
 * Author : 
 *  Bertrand Guiheneuf <bertrand@helixcode.com>
 *
 * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
 *
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as 
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */


#ifndef CAMEL_STREAM_B64_H
#define CAMEL_STREAM_B64_H 1


#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus }*/

#include <gtk/gtk.h>
#include "camel-stream.h"


#define CAMEL_STREAM_B64_TYPE     (camel_stream_b64_get_type ())
#define CAMEL_STREAM_B64(obj)     (GTK_CHECK_CAST((obj), CAMEL_STREAM_B64_TYPE, CamelStreamB64))
#define CAMEL_STREAM_B64_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_B64_TYPE, CamelStreamB64Class))
#define CAMEL_IS_STREAM_B64(o)    (GTK_CHECK_TYPE((o), CAMEL_STREAM_B64_TYPE))


typedef enum {

	CAMEL_STREAM_B64_DECODER,
	CAMEL_STREAM_B64_ENCODER

} CamelStreamB64Mode;


/* private type */
typedef struct {

	guchar state;
	guchar keep;
 
} CamelStream64DecodeStatus;

typedef struct {

	guchar state;
	guchar keep;
	guchar end_state;  
	guchar line_length; 

} CamelStream64EncodeStatus;


typedef union {
	CamelStream64DecodeStatus decode_status;
	CamelStream64EncodeStatus encode_status;
} CamelStream64Status;

typedef struct 
{
	CamelStream parent_object;

	/* --  all these fields are private  -- */

	CamelStream *input_stream;      /* the stream we get the data from before co/de-coding them */ 
	CamelStreamB64Mode mode;        /* the stream code or decode in B64 depending on that flag  */
	gboolean eos;

	/* decoding status */
	CamelStream64Status status;

} CamelStreamB64;



typedef struct {
	CamelStreamClass parent_class;
	
	/* Virtual methods */	
	void     (*init_with_input_stream)       (CamelStreamB64 *stream_b64, CamelStream *input_stream);

} CamelStreamB64Class;






/* Standard Gtk function */
GtkType camel_stream_b64_get_type (void);




/* public methods */						
CamelStream *         camel_stream_b64_new_with_input_stream      (CamelStream *input_stream);

void                  camel_stream_b64_set_mode                   (CamelStreamB64 *stream_b64,
								   CamelStreamB64Mode mode);

/* utility function that writes the whole de/en-coded
   stream to an output stream */
void                  camel_stream_b64_write_to_stream            (CamelStreamB64 *stream, 
								   CamelStream *output_stream);


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* CAMEL_STREAM_B64_H */






</tr></table>
<div class='path'>path: <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/'>root</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits'>x11-toolkits</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin'>qwt5-designerplugin</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin/pkg-descr'>pkg-descr</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Koop Mast &lt;kwm@rainbow-runner.nl&gt;</td><td class='right'>2016-12-10 23:29:02 +0800</td></tr>
<tr><th>committer</th><td>Koop Mast &lt;kwm@rainbow-runner.nl&gt;</td><td class='right'>2016-12-10 23:29:02 +0800</td></tr>
<tr><th>commit</th><td colspan='2' class='sha1'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin/pkg-descr?id=b1001d70f01d51c768db3a1e8e00cd1b7a245440'>b1001d70f01d51c768db3a1e8e00cd1b7a245440</a> (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/patch/x11-toolkits/qwt5-designerplugin/pkg-descr?id=b1001d70f01d51c768db3a1e8e00cd1b7a245440'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='sha1'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/tree/'>7268e086efcba602ca5f14534bce6f7075c92810</a> /<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/tree/x11-toolkits/qwt5-designerplugin/pkg-descr'>x11-toolkits/qwt5-designerplugin/pkg-descr</a></td></tr>
<tr><th>parent</th><td colspan='2' class='sha1'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin/pkg-descr?id=2c467c5afbd45537746e9d808e5e92481c8d28b9'>2c467c5afbd45537746e9d808e5e92481c8d28b9</a> (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/diff/x11-toolkits/qwt5-designerplugin/pkg-descr?id2=2c467c5afbd45537746e9d808e5e92481c8d28b9'>diff</a>)</td></tr><tr><th>parent</th><td colspan='2' class='sha1'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin/pkg-descr?id=43ae45671e24ac2b498ed0e5af2e3d27383b4320'>43ae45671e24ac2b498ed0e5af2e3d27383b4320</a> (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/diff/x11-toolkits/qwt5-designerplugin/pkg-descr?id2=43ae45671e24ac2b498ed0e5af2e3d27383b4320'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='sha1'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/snapshot/freebsd-ports-graphics-mesa-next.tar.gz'>freebsd-ports-graphics-mesa-next.tar.gz</a><br/><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/snapshot/freebsd-ports-graphics-mesa-next.tar.zst'>freebsd-ports-graphics-mesa-next.tar.zst</a><br/><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/snapshot/freebsd-ports-graphics-mesa-next.zip'>freebsd-ports-graphics-mesa-next.zip</a><br/></td></tr></table>
<div class='commit-subject'>Merge branch 'master' into mesa-next<span class='decoration'><a class='deco' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/x11-toolkits/qwt5-designerplugin/pkg-descr?id=b1001d70f01d51c768db3a1e8e00cd1b7a245440'>HEAD</a><a class='branch-deco' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/x11-toolkits/qwt5-designerplugin/pkg-descr'>mesa-next</a></span></div><div class='commit-msg'></div><div class='diffstat-header'><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/diff/'>Diffstat</a> (limited to 'x11-toolkits/qwt5-designerplugin/pkg-descr')</div><table summary='diffstat' class='diffstat'>