* configure.in
[claws.git] / src / procmsg.h
index 8c729b0c7e02f2f8a1c376cfdfbd3ce5f22b6cf5..eddd6a20335b5209b7b4a6b70d9f19140236042c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #ifndef __PROCMSG_H__
 #define __PROCMSG_H__
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <glib.h>
 #include <stdio.h>
 #include <time.h>
@@ -30,6 +34,7 @@ typedef struct _MsgInfo               MsgInfo;
 typedef struct _MsgFlags       MsgFlags;
 
 #include "folder.h"
+#include "procmime.h"
 
 typedef enum
 {
@@ -65,6 +70,8 @@ typedef enum
 #define MSG_CLABEL_BROWN       MSG_CLABEL_7
 
        MSG_IGNORE_THREAD   = 1 << 10,   /* ignore threads */
+       MSG_LOCKED          = 1 << 11,   /* msg is locked  */
+       MSG_RETRCPT_PENDING = 1 << 12,   /* return receipt pending */
 
        /* RESERVED */
        MSG_RESERVED_CLAWS  = 1 << 30,  /* for sylpheed-claws */
@@ -84,14 +91,12 @@ typedef enum
        MSG_IMAP        = 1 << 19,
        MSG_NEWS        = 1 << 20,
 
-       MSG_FILTERING   = 1 << 25,      /* claws: re/set by filtering */
-
        MSG_MIME        = 1 << 29,
 
        MSG_CACHED      = 1 << 31
 } MsgTmpFlags;
 
-#define MSG_CACHED_FLAG_MASK   (MSG_MIME)
+#define MSG_CACHED_FLAG_MASK   (MSG_MIME | MSG_ENCRYPTED)
 
 #define MSG_SET_FLAGS(msg, flags)      { (msg) |= (flags); }
 #define MSG_UNSET_FLAGS(msg, flags)    { (msg) &= ~(flags); }
@@ -109,6 +114,7 @@ typedef enum
 #define MSG_IS_MARKED(msg)             (((msg).perm_flags & MSG_MARKED) != 0)
 #define MSG_IS_DELETED(msg)            (((msg).perm_flags & MSG_DELETED) != 0)
 #define MSG_IS_REPLIED(msg)            (((msg).perm_flags & MSG_REPLIED) != 0)
+#define MSG_IS_LOCKED(msg)             (((msg).perm_flags & MSG_LOCKED) != 0)
 #define MSG_IS_FORWARDED(msg)          (((msg).perm_flags & MSG_FORWARDED) != 0)
 
 #define MSG_GET_COLORLABEL(msg)                (((msg).perm_flags & MSG_CLABEL_FLAG_MASK))
@@ -116,6 +122,9 @@ typedef enum
 #define MSG_SET_COLORLABEL_VALUE(msg, val) \
        MSG_SET_PERM_FLAGS(msg, ((((guint)(val)) & 7) << MSG_CLABEL_SBIT))
 
+#define MSG_COLORLABEL_TO_FLAGS(val) ((((guint)(val)) & 7) << MSG_CLABEL_SBIT)
+#define MSG_COLORLABEL_FROM_FLAGS(val) (val >> MSG_CLABEL_SBIT)
+
 #define MSG_IS_MOVE(msg)               (((msg).tmp_flags & MSG_MOVE) != 0)
 #define MSG_IS_COPY(msg)               (((msg).tmp_flags & MSG_COPY) != 0)
 
@@ -130,7 +139,7 @@ typedef enum
 /* Claws related flags */
 #define MSG_IS_REALLY_DELETED(msg)     (((msg).perm_flags & MSG_REALLY_DELETED) != 0)
 #define MSG_IS_IGNORE_THREAD(msg)      (((msg).perm_flags & MSG_IGNORE_THREAD) != 0)
-#define MSG_IS_FILTERING(msg)          (((msg).tmp_flags  & MSG_FILTERING) != 0)
+#define MSG_IS_RETRCPT_PENDING(msg)    (((msg).perm_flags & MSG_RETRCPT_PENDING) != 0)
 
 
 #define WRITE_CACHE_DATA_INT(n, fp) \
@@ -213,7 +222,10 @@ void       procmsg_write_flags             (MsgInfo        *msginfo,
 void   procmsg_get_mark_sum            (const gchar    *folder,
                                         gint           *new,
                                         gint           *unread,
-                                        gint           *total);
+                                        gint           *total,
+                                        gint           *min,
+                                        gint           *max,
+                                        gint            first);
 FILE   *procmsg_open_mark_file         (const gchar    *folder,
                                         gboolean        append);
 
@@ -225,6 +237,10 @@ void       procmsg_copy_messages           (GSList         *mlist);
 gchar  *procmsg_get_message_file_path  (MsgInfo        *msginfo);
 gchar  *procmsg_get_message_file       (MsgInfo        *msginfo);
 FILE   *procmsg_open_message           (MsgInfo        *msginfo);
+#if USE_GPGME
+FILE   *procmsg_open_message_decrypted (MsgInfo        *msginfo,
+                                        MimeInfo      **mimeinfo);
+#endif
 gboolean procmsg_msg_exist             (MsgInfo        *msginfo);
 
 void   procmsg_empty_trash             (void);
@@ -237,5 +253,13 @@ void        procmsg_msginfo_free           (MsgInfo        *msginfo);
 
 gint procmsg_cmp_msgnum_for_sort       (gconstpointer   a,
                                         gconstpointer   b);
+gint procmsg_send_message_queue                (const gchar *file);
+
+void procmsg_msginfo_set_flags         (MsgInfo *msginfo,
+                                        MsgPermFlags perm_flags,
+                                         MsgTmpFlags tmp_flags);
+void procmsg_msginfo_unset_flags       (MsgInfo *msginfo,
+                                        MsgPermFlags perm_flags,
+                                         MsgTmpFlags tmp_flags);
 
 #endif /* __PROCMSG_H__ */