1
#ifndef __DOM_IO_BASE64STREAM_H__
2
#define __DOM_IO_BASE64STREAM_H__
5
* Phoebe DOM Implementation.
7
* Base64-enabled input and output streams
9
* This class allows easy encoding and decoding
10
* of Base64 data with a stream interface, hiding
11
* the implementation from the user.
13
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
18
* Copyright (C) 2006 Bob Jamison
20
* This library is free software; you can redistribute it and/or
21
* modify it under the terms of the GNU Lesser General Public
22
* License as published by the Free Software Foundation; either
23
* version 2.1 of the License, or (at your option) any later version.
25
* This library is distributed in the hope that it will be useful,
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
* Lesser General Public License for more details.
30
* You should have received a copy of the GNU Lesser General Public
31
* License along with this library; if not, write to the Free Software
32
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37
#include "domstream.h"
51
//#########################################################################
52
//# B A S E 6 4 I N P U T S T R E A M
53
//#########################################################################
56
* This class is for decoding a Base-64 encoded InputStream source
59
class Base64InputStream : public BasicInputStream
64
Base64InputStream(InputStream &sourceStream);
66
virtual ~Base64InputStream();
68
virtual int available();
84
}; // class Base64InputStream
89
//#########################################################################
90
//# B A S E 6 4 O U T P U T S T R E A M
91
//#########################################################################
94
* This class is for Base-64 encoding data going to the
95
* destination OutputStream
98
class Base64OutputStream : public BasicOutputStream
103
Base64OutputStream(OutputStream &destinationStream);
105
virtual ~Base64OutputStream();
107
virtual void close();
109
virtual void flush();
111
virtual void put(int ch);
114
* Sets the maximum line length for base64 output. If
115
* set to <=0, then there will be no line breaks;
117
virtual void setColumnWidth(int val)
118
{ columnWidth = val; }
128
unsigned long outBuf;
132
}; // class Base64OutputStream
146
#endif /* __INKSCAPE_IO_BASE64STREAM_H__ */