#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 paging_level;
int supports_qnop;
int supports_ldap;
+ int newuser_disabled;
};
/* This class is responsible for the server connection */
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;
long RRtotal; /* Total number of messages in room */
char RRinfoupdated; /* Nonzero if info was updated */
unsigned RRflags; /* Various flags (see LKRN) */
+ unsigned RRflags2; /* Various flags (see LKRN) */
long RRhighest; /* Highest message number in room */
long RRlastread; /* Highest message user has read */
char RRismailbox; /* Is this room a mailbox room? */
char *cret);
int CtdlIPCGetRoomAide(CtdlIPC *ipc, char *cret);
int CtdlIPCSetRoomAide(CtdlIPC *ipc, const char *username, char *cret);
-int CtdlIPCPostMessage(CtdlIPC *ipc, int flag, const struct ctdlipcmessage *mr,
- char *cret);
+int CtdlIPCPostMessage(CtdlIPC *ipc, int flag, int *subject_required,
+ const struct ctdlipcmessage *mr,
+ char *cret);
int CtdlIPCRoomInfo(CtdlIPC *ipc, char **iret, char *cret);
int CtdlIPCDeleteMessage(CtdlIPC *ipc, long msgnum, char *cret);
int CtdlIPCMoveMessage(CtdlIPC *ipc, int copy, long msgnum,
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);