X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Flibcitadel.h;h=d7da488f10c7a7ab48dbc265924b7da184f96417;hb=91b321ff3cb15ca37b5530c9ec5c0f4007b54988;hp=7dd18e64cb351f465aaa9499a8db2ec41a8f1dcc;hpb=e2c97f4b0f5420b21f491d6e61dca580f8772d39;p=citadel.git diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index 7dd18e64c..d7da488f1 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -49,16 +49,16 @@ typedef enum AXLevel { }eUsrAxlvl; typedef enum __RoomNetCfg { - subpending, - unsubpending, - lastsent, /* Server internal use only */ - ignet_push_share, - listrecp, - digestrecp, - pop3client, - rssclient, - participate, - roommailalias, + subpending = 0, + unsubpending = 1, + lastsent = 2, /* Server internal use only */ + ignet_push_share = 3, + listrecp = 4, + digestrecp = 5, + pop3client = 6, + rssclient = 7, + participate = 8, + roommailalias = 9, maxRoomNetCfg } RoomNetCfg; @@ -108,7 +108,7 @@ typedef enum _room_views { #define BLOG_EUIDBUF_SIZE 40 #ifndef IsEmptyStr -#define IsEmptyStr(a) ((a)[0] == '\0') +#define IsEmptyStr(a) ( ( (a) == NULL ) || ((a)[0] == '\0') ) #endif @@ -339,12 +339,17 @@ void StrBuf_RFC822_2_Utf8(StrBuf *Target, void StrBuf_RFC822_to_Utf8(StrBuf *Target, const StrBuf *DecodeMe, const StrBuf* DefaultCharset, StrBuf *FoundCharset); typedef enum __eStreamType { - eBase64Decode + eBase64Encode, + eBase64Decode, + eZLibEncode, + eZLibDecode, + eEmtyCodec } 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); +typedef struct vStreamT vStreamT; +vStreamT *StrBufNewStreamContext(eStreamType type, const char **Err); +int StrBufDestroyStreamContext(eStreamType type, vStreamT **Stream, const char **Err); +int StrBufStreamTranscode(eStreamType type, IOBuffer *Target, IOBuffer *In, const char* pIn, long pInLen, vStreamT *Stream, int LastChunk, const char **Err); int StrBufDecodeBase64(StrBuf *Buf); int StrBufDecodeBase64To(const StrBuf *BufIn, StrBuf *BufOut);