Removed the old CtdlSaveMsgPointerInRoom() API. Everything now
[citadel.git] / citadel / msgbase.h
index ead3bbf2daa89115a382ae0f42d9232ccd5e641a..fc0219e314ccc47815a9ab18d07faaabc2d82b3c 100644 (file)
@@ -31,8 +31,11 @@ enum {
 
 struct ma_info {
        int is_ma;              /* Set to 1 if we are using this stuff */
+       int freeze;             /* Freeze the replacement chain because we're
+                                * digging through a subsection */
        int did_print;          /* One alternative has been displayed */
-       char chosen_part[SIZ];  /* Which part of a m/a did we choose? */
+       char chosen_part[128];  /* Which part of a m/a did we choose? */
+       int use_fo_hooks;       /* Use fixed output hooks */
 };
 
 
@@ -76,7 +79,7 @@ void cmd_msgs (char *cmdbuf);
 void cmd_isme (char *cmdbuf);
 void help_subst (char *strbuf, char *source, char *dest);
 void do_help_subst (char *buffer);
-void memfmout (int width, char *mptr, char subst, char *nl);
+void memfmout (char *mptr, char subst, char *nl);
 void output_mime_parts(char *);
 void cmd_msg0 (char *cmdbuf);
 void cmd_msg2 (char *cmdbuf);
@@ -101,7 +104,7 @@ int CtdlForEachMessage(int mode, long ref,
                        struct CtdlMessage *compare,
                         void (*CallBack) (long, void *),
                        void *userdata);
-int CtdlDeleteMessages(char *, long, char *, int);
+int CtdlDeleteMessages(char *, long *, int, char *, int);
 void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
                        int, int, unsigned int);
 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
@@ -109,6 +112,8 @@ void CtdlFreeMessage(struct CtdlMessage *msg);
 void serialize_message(struct ser_ret *, struct CtdlMessage *);
 int is_valid_message(struct CtdlMessage *);
 void ReplicationChecks(struct CtdlMessage *);
+int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
+                               int do_repl_check, struct CtdlMessage *supplied_msg);
 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist, int crlf);
 char *CtdlGetSysConfig(char *sysconfname);
@@ -117,14 +122,16 @@ int CtdlOutputMsg(long msg_num,           /* message number (local) to fetch */
                int mode,               /* how would you like that message? */
                int headers_only,       /* eschew the message body? */
                int do_proto,           /* do Citadel protocol responses? */
-               int crlf);
+               int crlf,               /* 0=LF, 1=CRLF */
+               char *section           /* output a message/rfc822 section */
+);
 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
-               long,
                int mode,               /* how would you like that message? */
                int headers_only,       /* eschew the message body? */
                int do_proto,           /* do Citadel protocol responses? */
-               int crlf);
-int CtdlCopyMsgToRoom(long msgnum, char *dest);
+               int crlf                /* 0=LF, 1=CRLF */
+);
+int CtdlCopyMsgsToRoom(long *msgnum, int num_msgs, char *dest);
 int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n);
 
@@ -134,7 +141,8 @@ enum {
        ctdlsetseen_seen,
        ctdlsetseen_answered
 };
-void CtdlSetSeen(long target_msgnum, int target_setting, int which_set,
+void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
+                int target_setting, int which_set,
                struct ctdluser *which_user, struct ctdlroom *which_room);
 void CtdlGetSeen(char *buf, int which_set);
 
@@ -148,6 +156,7 @@ struct CtdlMessage *CtdlMakeMessage(
         int format_type,                /* variformat, plain text, MIME... */
         char *fake_name,                /* who we're masquerading as */
         char *subject,                  /* Subject (optional) */
+       char *supplied_euid,            /* ...or NULL if this is irrelevant */
         char *preformatted_text         /* ...or NULL to read text from client */
 );
 int CtdlCheckInternetMailPermission(struct ctdluser *who);