6 * @author Krishnakumar B <kitty@cs.wustl.edu>
8 * XML_Codecs is a generic wrapper for various encoding and decoding
9 * mechanisms used in ACEXML. Currently it includes support for handling
10 * Base64 content transfer-encoding of ACEXML_Chars.
13 #ifndef _ACEXML_XML_CODECS_H
14 #define _ACEXML_XML_CODECS_H
16 #include /**/ "ace/pre.h"
17 #include "ACEXML/common/ACEXML_Export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ACEXML/common/XML_Types.h"
24 #include "ace/Codecs.h"
27 * @class ACEXML_Base64
29 * @brief Encode/Decode a stream of ACEXML_Chars according to Base64 encoding.
31 * This class provides methods to encode or decode a stream of ACEXML_Chars
32 * to/from Base64 encoding. It doesn't convert the input stream to a
33 * canonical form before encoding.
35 class ACEXML_Export ACEXML_Base64
: public ACE_Base64
40 * Encodes a stream of octets to Base64 data
42 * @param input Binary data in ACEXML_Char stream.
43 * @param output_len Length of the encoded Base64 ACEXML_Char stream.
44 * @return Encoded Base64 data in ACEXML_Char stream or NULL if input data
48 static ACEXML_Char
* encode (const ACEXML_Char
* input
,
51 * Decodes a stream of Base64 to octets data
53 * @param input Encoded Base64 data in ACEXML_Char stream.
54 * @param output_len Length of the binary ACEXML_Char stream.
55 * @return Binary data in ACEXML_Char stream or NULL if input data cannot
58 static ACEXML_Char
* decode (const ACEXML_Char
* input
,
65 #include /**/ "ace/post.h"
67 #endif /* _ACEXML_XML_CODECS_H */