]> code.citadel.org Git - citadel.git/blobdiff - citadel/citadel_ipc.h
* UIMG and UOPN require the client to specify a Mimetype now.
[citadel.git] / citadel / citadel_ipc.h
index 3e36ade4eafa2e007176f78e76998e4349b8a901..4254b6ef3f89b44fca14624f21962d17a38b3bf7 100644 (file)
@@ -9,7 +9,6 @@
 #define DEFAULT_PORT           "citadel"
 
 #include "sysdep.h"
-#include "server.h"
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #endif
@@ -19,6 +18,8 @@
 #include <openssl/rand.h>
 #endif
 
+#include "server.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -72,6 +73,11 @@ typedef struct _CtdlIPC {
        int uploading;
        /* Time the last command was sent to the server */
        time_t last_command_sent;
+       /* Our buffer for linebuffered read. */
+       char *Buf;
+       size_t BufSize;
+       size_t BufUsed;
+       char *BufPtr;
        /* Callback for update on whether the IPC is locked */
        void (*network_status_cb)(int state);
 } CtdlIPC;
@@ -255,7 +261,7 @@ int CtdlIPCImageDownload(CtdlIPC *ipc, const char *filename, void **buf,
                void (*progress_gauge_callback)(CtdlIPC*, unsigned long, unsigned long),
                char *cret);
 int CtdlIPCFileUpload(CtdlIPC *ipc, const char *save_as, const char *comment,
-               const char *path,
+               const char *path, 
                void (*progress_gauge_callback)(CtdlIPC*, unsigned long, unsigned long),
                char *cret);
 int CtdlIPCImageUpload(CtdlIPC *ipc, int for_real, const char *path,
@@ -324,7 +330,7 @@ int CtdlIPCSendListing(CtdlIPC *ipc, const char *listing);
 size_t CtdlIPCPartialRead(CtdlIPC *ipc, void **buf, size_t offset,
                size_t bytes, char *cret);
 int CtdlIPCEndUpload(CtdlIPC *ipc, int discard, char *cret);
-int CtdlIPCWriteUpload(CtdlIPC *ipc, const char *path,
+int CtdlIPCWriteUpload(CtdlIPC *ipc, FILE *uploadFP,
                void (*progress_gauge_callback)(CtdlIPC*, unsigned long, unsigned long),
                char *cret);
 int CtdlIPCEndDownload(CtdlIPC *ipc, char *cret);