BASE64: add stream handler for base 64 decoding - make shure its not called for to...
[citadel.git] / libcitadel / lib / libcitadel.h
index dbe302f7b9e4a2a9420440f2e4d61b3244ea1749..7dd18e64cb351f465aaa9499a8db2ec41a8f1dcc 100644 (file)
@@ -28,7 +28,7 @@
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#define LIBCITADEL_VERSION_NUMBER      821
+#define LIBCITADEL_VERSION_NUMBER      829
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -100,6 +100,7 @@ typedef enum _room_views {
        VIEW_DRAFTS             = 9,    /* Drafts view */
        VIEW_BLOG               = 10,   /* Blog view */
        VIEW_QUEUE              = 11,   /* SMTP/... QUEUE rooms */
+       VIEW_WIKIMD             = 12,   /* Markdown Wiki view */
        VIEW_MAX,
        VIEW_JSON_LIST,
 } ROOM_VIEWS;
@@ -337,8 +338,18 @@ 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);
 StrBuf *StrBufSanitizeEmailRecipientVector(const StrBuf *Recp, 
                                           StrBuf *UserName, 
@@ -350,6 +361,7 @@ int StrBufSanitizeAscii(StrBuf *Buf, const char Mute);
 #define QU                     (3)
 void StrBufUrlescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
 void StrBufUrlescUPAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
+void StrBufXMLEscAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn, long PlainInLen, int OverrideLowChars);
 void StrBufHexescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
 void StrBufHexEscAppend(StrBuf *OutBuf, const StrBuf *In, const unsigned char *PlainIn, long PlainInLen);
 void StrBufBase64Append(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn, long PlainInLen, int linebreaks);