]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.h
* Temporary hack to ig_tcp_server() to listen on an arbitrary port if the
[citadel.git] / citadel / msgbase.h
index 9932911ea9ccb278bc669a3b1e57d0235f929feb..51e104ff99c3e7b80aa2d56faff2452f85cf8b9f 100644 (file)
  */
 #define SM_VERIFY_GOODNESS     1       /* Verify this is a real msg number */
 #define SM_DO_REPL_CHECK       2       /* Perform replication checks */
+#define SM_DONT_BUMP_REF       3       /* Don't bump reference count
+                                          (use with extreme care!!!!!!) */
+
+
+/*
+ * Possible return codes from CtdlOutputMsg()
+ */
+enum {
+       om_ok,
+       om_not_logged_in,
+       om_no_such_msg,
+       om_mime_error
+};
+       
 
 
 struct ma_info {
@@ -36,7 +50,6 @@ void help_subst (char *strbuf, char *source, char *dest);
 void do_help_subst (char *buffer);
 void memfmout (int width, char *mptr, char subst);
 void output_mime_parts(char *);
-void output_message (char *, int, int);
 void cmd_msg0 (char *cmdbuf);
 void cmd_msg2 (char *cmdbuf);
 void cmd_msg3 (char *cmdbuf);
@@ -73,3 +86,10 @@ int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int flags);
 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist);
 char *CtdlGetSysConfig(char *sysconfname);
 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
+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? */
+               FILE *outfp,
+               int outsock,
+               int crlf);