X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Flibcitadel.h;h=d8f246da43f9214dadb9b6a77de5bb7c6463bc6c;hb=19fb2763b48d73c87bf6852d29e84353fd941842;hp=cba677a5d0f9763fbe4b4d06d3dca455468da3a9;hpb=a9876b7a9950d597b18716250fcd39856efa3153;p=citadel.git diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index cba677a5d..d8f246da4 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -28,7 +28,7 @@ #include #include -#define LIBCITADEL_VERSION_NUMBER 829 +#define LIBCITADEL_VERSION_NUMBER 901 /* * Here's a bunch of stupid magic to make the MIME parser portable. @@ -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 @@ -346,9 +346,10 @@ typedef enum __eStreamType { eEmtyCodec } eStreamType; -void *StrBufNewStreamContext(eStreamType type); -void StrBufDestroyStreamContext(eStreamType type, void **Stream); -int StrBufStreamTranscode(eStreamType type, IOBuffer *Target, IOBuffer *In, const char* pIn, long pInLen, void *Stream, int LastChunk); +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); @@ -444,7 +445,6 @@ char *memreadline(char *start, char *buf, int maxlen); char *memreadlinelen(char *start, char *buf, int maxlen, int *retlen); const char *cmemreadline(const char *start, char *buf, int maxlen); const char *cmemreadlinelen(const char *start, char *buf, int maxlen, int *retlen); -#define IsEmptyStr(a) ((a)[0] == '\0') #define num_parms(source) num_tokens(source,(char)'|') int stripout(char *str, char leftboundary, char rightboundary); long stripallbut(char *str, char leftboundary, char rightboundary); @@ -483,7 +483,7 @@ struct vCard { struct vCard *vcard_new(void); -void vcard_add_prop(struct vCard *v, char *propname, char *propvalue); +void vcard_add_prop(struct vCard *v, const char *propname, const char *propvalue); struct vCard *vcard_load(char *vtext); struct vCard *VCardLoad(StrBuf *vbtext); @@ -512,7 +512,7 @@ typedef const char *(*PrintHashContent)(void * Data); typedef int (*CompareFunc)(const void* Item1, const void*Item2); typedef long (*HashFunc)(const char *Str, long Len); typedef void (*TransitionFunc) (void *Item1, void *Item2, int Odd); -typedef void (*PrintHashDataFunc) (const char *Key, void *Item, int Odd); +typedef const char* (*PrintHashDataFunc) (const char *Key, void *Item, int Odd); long Flathash(const char *str, long len); long lFlathash(const char *str, long len); @@ -529,6 +529,7 @@ int GetHash(HashList *Hash, const char *HKey, long HKLen, void **Data); void Put(HashList *Hash, const char *HKey, long HKLen, void *Data, DeleteHashDataFunc DeleteIt); int GetKey(HashList *Hash, char *HKey, long HKLen, void **Data); int GetHashKeys(HashList *Hash, char ***List); +const char *dbg_PrintStrBufPayload(const char *Key, void *Item, int Odd); int dbg_PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second); int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry); HashPos *GetNewHashPos(const HashList *Hash, int StepWidth);