]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/libcitadel.h
* libcitadel internal version number is now 7.80
[citadel.git] / libcitadel / lib / libcitadel.h
index dbacca2d48a1d351858f7c94385b5f44851613c3..d89995833bd97cdae305f68c9d25a5a63e19dad2 100644 (file)
@@ -15,7 +15,7 @@
 #include <time.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#define LIBCITADEL_VERSION_NUMBER      770
+#define LIBCITADEL_VERSION_NUMBER      780
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -24,7 +24,6 @@
 #define SIZ    4096
 #endif
 
-#define strof(a) #a
 
 /* Logging levels - correspond to syslog(3) */
 enum LogLevel {
@@ -74,7 +73,8 @@ typedef enum __GPEXWhichPolicy {
        roompolicy,
        floorpolicy,
        sitepolicy,
-       mailboxespolicy
+       mailboxespolicy,
+       maxpolicy
 }GPEXWhichPolicy;
 
 /*
@@ -97,6 +97,7 @@ typedef enum __GPEXWhichPolicy {
 #define IsEmptyStr(a) ((a)[0] == '\0')
 #endif
 
+
 /*
  * another word to indicate n/a for a pointer if NULL already has a "meaning"
  */
@@ -250,6 +251,8 @@ void the_mime_parser(char *partnum,
 
 typedef struct StrBuf StrBuf;
 
+#define strof(a) #a
+#define CStrOf(a) #a, sizeof(#a) - 1
 typedef struct _ConstStr {
        const char *Key;
        long len;
@@ -275,6 +278,7 @@ const char *ChrPtr(const StrBuf *Str);
 int StrLength(const StrBuf *Str);
 #define SKEY(a) ChrPtr(a), StrLength(a)
 long StrBufPeek(StrBuf *Buf, const char* ptr, long nThChar, char PeekValue);
+long StrBufPook(StrBuf *Buf, const char* ptr, long nThChar, long nChars, char PookValue);
 
 int StrBufTCP_read_line(StrBuf *buf, int *fd, int append, const char **Error);
 int StrBufReadBLOB(StrBuf *Buf, int *fd, int append, long nBytes, const char **Error);
@@ -303,6 +307,7 @@ int StrBufTCP_read_buffered_line_fast(StrBuf *Line,
                                      const char **Error);
 
 int StrBufSipLine(StrBuf *LineBuf, StrBuf *Buf, const char **Ptr);
+int StrBufReplaceToken(StrBuf *Buf, long where, long HowLong, const char *Repl, long ReplLen);
 int StrBufExtract_token(StrBuf *dest, const StrBuf *Source, int parmnum, char separator);
 int StrBufSub(StrBuf *dest, const StrBuf *Source, unsigned long Offset, size_t nChars);
 
@@ -333,6 +338,7 @@ void StrBufCutLeft(StrBuf *Buf, int nChars);
 void StrBufCutRight(StrBuf *Buf, int nChars);
 void StrBufCutAt(StrBuf *Buf, int AfternChars, const char *At);
 void StrBufTrim(StrBuf *Buf);
+void StrBufStripAllBut(StrBuf *Buf, char leftboundary, char rightboundary);
 void StrBufUpCase(StrBuf *Buf);
 void StrBufLowerCase(StrBuf *Buf);
 void StrBufStripSlashes(StrBuf *Dir, int RemoveTrailingSlash);