diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-01-15 08:42:58 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-01-15 08:42:58 +0000 |
commit | 4463ed43c3de45b41291c59770e1380651423471 (patch) | |
tree | f93d32ef1186b1df203e9fc7b1a434ea9a585cb2 /libsylph/imap.h | |
parent | 18dada4c482c17bec614b8e0dca44cd2408e9922 (diff) |
save color labels on IMAP server using custom keywords (partially compatible with Thunderbird).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2433 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/imap.h')
-rw-r--r-- | libsylph/imap.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libsylph/imap.h b/libsylph/imap.h index e8aa762b..81211b53 100644 --- a/libsylph/imap.h +++ b/libsylph/imap.h @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2007 Hiroyuki Yamamoto + * Copyright (C) 1999-2010 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -93,7 +93,10 @@ typedef enum IMAP_FLAG_ANSWERED = 1 << 1, IMAP_FLAG_FLAGGED = 1 << 2, IMAP_FLAG_DELETED = 1 << 3, - IMAP_FLAG_DRAFT = 1 << 4 + IMAP_FLAG_DRAFT = 1 << 4, + + /* color label keywords : 1 << 7 ... 1 << 9 + compatible with procmsg.h: MSG_CLABEL* macros */ } IMAPFlags; #define IMAP_IS_SEEN(flags) ((flags & IMAP_FLAG_SEEN) != 0) @@ -102,6 +105,12 @@ typedef enum #define IMAP_IS_DELETED(flags) ((flags & IMAP_FLAG_DELETED) != 0) #define IMAP_IS_DRAFT(flags) ((flags & IMAP_FLAG_DRAFT) != 0) +#define IMAP_GET_COLORLABEL(flags) (flags & (7 << MSG_CLABEL_SBIT)) +#define IMAP_GET_COLORLABEL_VALUE(flags) \ + (IMAP_GET_COLORLABEL(flags) >> MSG_CLABEL_SBIT) +#define IMAP_SET_COLORLABEL_VALUE(flags, v) \ + ((flags) |= ((v & 7) << MSG_CLABEL_SBIT)) + FolderClass *imap_get_class (void); gint imap_msg_set_perm_flags (MsgInfo *msginfo, @@ -113,4 +122,7 @@ gint imap_msg_list_set_perm_flags (GSList *msglist, gint imap_msg_list_unset_perm_flags (GSList *msglist, MsgPermFlags flags); +gint imap_msg_list_set_colorlabel_flags (GSList *msglist, + guint color); + #endif /* __IMAP_H__ */ |