Removed the chunked-io stuff from libcitadel. Nothing was using it and it isn't...
[citadel.git] / libcitadel / lib / libcitadel.h
index 70e9857c53291b9de6f7e525351e5eeb9da06ce4..46709311c0131e5ec97ed1cae8f135f503064087 100644 (file)
@@ -28,7 +28,7 @@
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#define LIBCITADEL_VERSION_NUMBER      916
+#define LIBCITADEL_VERSION_NUMBER      921
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -254,28 +254,6 @@ typedef struct _file_buffer {
        int nBlobBytesWanted;
 } IOBuffer;
 
-
-typedef struct __fd_iobuffer {
-       IOBuffer *IOB;
-       int OtherFD;
-       int SplicePipe[2];
-       int PipeSize;
-       long TotalSendSize;
-       loff_t TotalSentAlready;
-       loff_t TotalReadAlready;
-       long ChunkSize;
-       long ChunkSendRemain;
-       StrBuf *ChunkBuffer; /* just used if we don't have sendfile */
-} FDIOBuffer;
-
-
-void FDIOBufferInit(FDIOBuffer *FDB, IOBuffer *IO, int FD, long TotalSendSize);
-void FDIOBufferDelete(FDIOBuffer *FDB);
-int FileSendChunked(FDIOBuffer *FDB, const char **Err);
-int FileRecvChunked(FDIOBuffer *FDB, const char **Err);
-int FileMoveChunked(FDIOBuffer *FDB, const char **Err);
-eReadState WriteIOBAlreadyRead(FDIOBuffer *FDB, const char **Error);
-
 long StrBuf_read_one_chunk_callback (int fd, short event, IOBuffer *FB);
 int StrBuf_write_one_chunk_callback(int fd, short event, IOBuffer *FB);
 
@@ -463,7 +441,7 @@ char *rfc2047encode(const char *line, long length);
 int is_msg_in_mset(const char *mset, long msgnum);
 int pattern2(char *search, char *patn);
 void stripltlen(char *, int *);
-char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth, int do_citaformat);
+char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth);
 void LoadEntityList(char *FileName);
 
 
@@ -613,7 +591,11 @@ JsonValue *NewJsonNumber(const char *Key, long keylen, long Number);
 
 JsonValue *NewJsonBigNumber(const char *Key, long keylen, double Number);
 
-JsonValue *NewJsonString(const char *Key, long keylen, StrBuf *CopyMe);
+enum {
+       NEWJSONSTRING_COPYBUF,          // make a copy of the StrBuf, source is left alone
+       NEWJSONSTRING_SMASHBUF          // smash the source StrBuf, the json object now owns that memory
+};
+JsonValue *NewJsonString(const char *Key, long keylen, StrBuf *CopyMe, int copy_or_smash);
 
 JsonValue *NewJsonPlainString(const char *Key, long keylen, const char *CopyMe, long len);