]> 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 ba37904dddc71aaea32594cf120266b59243093c..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
@@ -46,6 +47,7 @@ struct CtdlServInfo {
        int paging_level;
        int supports_qnop;
        int supports_ldap;
+       int newuser_disabled;
 };
 
 /* This class is responsible for the server connection */
@@ -71,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;
@@ -92,6 +99,7 @@ struct ctdlipcroom {
        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? */
@@ -212,8 +220,9 @@ int CtdlIPCSetRoomAttributes(CtdlIPC *ipc, int forget, struct ctdlroom *qret,
                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,
@@ -231,7 +240,7 @@ int CtdlIPCValidateUser(CtdlIPC *ipc, const char *username, int axlevel,
                char *cret);
 int CtdlIPCSetRoomInfo(CtdlIPC *ipc, int for_real, const char *info,
                char *cret);
-int CtdlIPCUserListing(CtdlIPC *ipc, char **list, char *cret);
+int CtdlIPCUserListing(CtdlIPC *ipc, char *searchstring, char **list, char *cret);
 int CtdlIPCSetRegistration(CtdlIPC *ipc, const char *info, char *cret);
 int CtdlIPCMiscCheck(CtdlIPC *ipc, struct ctdlipcmisc *chek, char *cret);
 int CtdlIPCDeleteFile(CtdlIPC *ipc, const char *filename, char *cret);
@@ -252,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,
@@ -321,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);