[dovecot-cvs] dovecot/src/lib-imap imap-util.c, 1.12,
1.13 imap-util.h, 1.10, 1.11
cras at dovecot.org
cras at dovecot.org
Sun Dec 26 11:12:43 EET 2004
- Previous message: [dovecot-cvs]
dovecot/src/imap cmd-append.c, 1.49, 1.50 cmd-store.c,
1.27, 1.28 commands-util.c, 1.37, 1.38 commands-util.h, 1.17,
1.18 imap-fetch.c, 1.32, 1.33 imap-fetch.h, 1.11,
1.12 imap-sync.c, 1.5, 1.6
- Next message: [dovecot-cvs] dovecot/src/lib-mail mail-types.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv26125/lib-imap
Modified Files:
imap-util.c imap-util.h
Log Message:
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Index: imap-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-util.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- imap-util.c 12 Jul 2004 11:35:51 -0000 1.12
+++ imap-util.c 26 Dec 2004 09:12:40 -0000 1.13
@@ -5,30 +5,31 @@
#include "mail-types.h"
#include "imap-util.h"
-void imap_write_flags(string_t *dest, const struct mail_full_flags *flags)
+void imap_write_flags(string_t *dest, enum mail_flags flags,
+ const char *const *keywords)
{
- unsigned int i;
size_t size;
size = str_len(dest);
- if ((flags->flags & MAIL_ANSWERED) != 0)
+ if ((flags & MAIL_ANSWERED) != 0)
str_append(dest, "\\Answered ");
- if ((flags->flags & MAIL_FLAGGED) != 0)
+ if ((flags & MAIL_FLAGGED) != 0)
str_append(dest, "\\Flagged ");
- if ((flags->flags & MAIL_DELETED) != 0)
+ if ((flags & MAIL_DELETED) != 0)
str_append(dest, "\\Deleted ");
- if ((flags->flags & MAIL_SEEN) != 0)
+ if ((flags & MAIL_SEEN) != 0)
str_append(dest, "\\Seen ");
- if ((flags->flags & MAIL_DRAFT) != 0)
+ if ((flags & MAIL_DRAFT) != 0)
str_append(dest, "\\Draft ");
- if ((flags->flags & MAIL_RECENT) != 0)
+ if ((flags & MAIL_RECENT) != 0)
str_append(dest, "\\Recent ");
- if (flags->keywords_count > 0) {
+ if (keywords != NULL) {
/* we have keywords too */
- for (i = 0; i < flags->keywords_count; i++) {
- str_append(dest, flags->keywords[i]);
+ while (*keywords != NULL) {
+ str_append(dest, *keywords);
str_append_c(dest, ' ');
+ keywords++;
}
}
Index: imap-util.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-util.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- imap-util.h 12 Jul 2004 11:35:51 -0000 1.10
+++ imap-util.h 26 Dec 2004 09:12:40 -0000 1.11
@@ -1,9 +1,8 @@
#ifndef __IMAP_UTIL_H
#define __IMAP_UTIL_H
-struct mail_full_flags;
-
-/* Return flags as a space separated string. */
-void imap_write_flags(string_t *dest, const struct mail_full_flags *flags);
+/* Write flags as a space separated string. */
+void imap_write_flags(string_t *dest, enum mail_flags flags,
+ const char *const *keywords);
#endif
- Previous message: [dovecot-cvs]
dovecot/src/imap cmd-append.c, 1.49, 1.50 cmd-store.c,
1.27, 1.28 commands-util.c, 1.37, 1.38 commands-util.h, 1.17,
1.18 imap-fetch.c, 1.32, 1.33 imap-fetch.h, 1.11,
1.12 imap-sync.c, 1.5, 1.6
- Next message: [dovecot-cvs] dovecot/src/lib-mail mail-types.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list