BASE64: add stream handler for base 64 decoding - make shure its not called for to...
[citadel.git] / libcitadel / lib / libcitadel.h
index bd7c8da9ccf2be13e1bd6389a784e7a6f4652220..7dd18e64cb351f465aaa9499a8db2ec41a8f1dcc 100644 (file)
@@ -338,7 +338,16 @@ void StrBuf_RFC822_2_Utf8(StrBuf *Target,
 /* deprecated old version: */
 void StrBuf_RFC822_to_Utf8(StrBuf *Target, const StrBuf *DecodeMe, const StrBuf* DefaultCharset, StrBuf *FoundCharset);
 
+typedef enum __eStreamType {
+       eBase64Decode
+} eStreamType;
+
+void *StrBufNewStreamContext(eStreamType type);
+void StrBufDestroyStreamContext(eStreamType type, void **Stream);
+void StrBufStreamDecodeTo(StrBuf *Target, const StrBuf *In, const char* pIn, long pInLen, void *Stream);
+
 int StrBufDecodeBase64(StrBuf *Buf);
+int StrBufDecodeBase64To(const StrBuf *BufIn, StrBuf *BufOut);
 int StrBufDecodeHex(StrBuf *Buf);
 StrBuf *StrBufRFC2047encodeMessage(const StrBuf *EncodeMe);
 int StrBufRFC2047encode(StrBuf **target, const StrBuf *source);