]> 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 2ebea61e5fee65a9eb40181aabd44744fc1f1836..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
@@ -39,13 +40,14 @@ struct CtdlServInfo {
        char fqdn[64];
        char software[64];
        int rev_level;
-       char bbs_city[64];
+       char site_location[64];
        char sysadm[64];
        char moreprompt[256];
        int ok_floors;
        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? */
@@ -140,8 +148,8 @@ struct ctdlipcfile {
        char description[80];           /* Description on server */
        FILE *local_fd;                 /* Open file on client */
        size_t size;                    /* Size of file in octets */
-       int upload:1;                   /* uploading? 0 if downloading */
-       int complete:1;                 /* Transfer has finished? */
+       unsigned int upload:1;          /* uploading? 0 if downloading */
+       unsigned int complete:1;        /* Transfer has finished? */
 };
 
 
@@ -157,7 +165,7 @@ enum RoomList {
        SubscribedRoomsWithNoNewMessages,
        UnsubscribedRooms,
        AllAccessibleRooms,
-       AllPublicRooms,
+       AllPublicRooms
 };
 #define AllFloors -1
 enum MessageList {
@@ -167,18 +175,18 @@ enum MessageList {
        LastMessages,
        FirstMessages,
        MessagesGreaterThan,
-       MessagesLessThan,
+       MessagesLessThan
 };
 enum MessageDirection {
        ReadReverse = -1,
-       ReadForward = 1,
+       ReadForward = 1
 };
 
 /* Shared Diffie-Hellman parameters */
 #define DH_P           "1A74527AEE4EE2568E85D4FB2E65E18C9394B9C80C42507D7A6A0DBE9A9A54B05A9A96800C34C7AA5297095B69C88901EEFD127F969DCA26A54C0E0B5C5473EBAEB00957D2633ECAE3835775425DE66C0DE6D024DBB17445E06E6B0C78415E589B8814F08531D02FD43778451E7685541079CFFB79EF0D26EFEEBBB69D1E80383"
 #define DH_G           "2"
 #define DH_L           1024
-#define CIT_CIPHERS    "ALL:RC4+RSA:+SSLv2:!MD5:@STRENGTH"     /* see ciphers(1) */
+#define CIT_CIPHERS    "ALL:RC4+RSA:+SSLv2:+TLSv1:!MD5:@STRENGTH"      /* see ciphers(1) */
 
 int CtdlIPCNoop(CtdlIPC *ipc);
 int CtdlIPCEcho(CtdlIPC *ipc, const char *arg, char *cret);
@@ -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);