#define DEFAULT_PORT "citadel"
#include "sysdep.h"
-#include "server.h"
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
#include <openssl/rand.h>
#endif
+#include "server.h"
+
#ifdef __cplusplus
extern "C" {
#endif
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;
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,
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);