IMAP->msgids = NULL;
IMAP->num_msgs = 0;
}
+ if (IMAP->flags != NULL) {
+ phree(IMAP->flags);
+ IMAP->flags = NULL;
+ }
}
IMAP->msgids = reallok(IMAP->msgids,
IMAP->num_msgs * sizeof(long));
}
+ if (IMAP->flags == NULL) {
+ IMAP->flags = mallok(IMAP->num_msgs * sizeof(long));
+ }
+ else {
+ IMAP->flags = reallok(IMAP->flags,
+ IMAP->num_msgs * sizeof(long));
+ }
IMAP->msgids[IMAP->num_msgs - 1] = msgnum;
+ IMAP->flags[IMAP->num_msgs - 1] = 0;
}
int readonly; /* mailbox is open read only */
int num_msgs; /* Number of messages being mapped */
long *msgids;
+ unsigned int *flags;
};
+/* Flags for the above struct. Note that some of these are for internal use,
+ * and are not to be reported to IMAP clients.
+ */
+#define IMAP_ANSWERED 1
+#define IMAP_FLAGGED 2
+#define IMAP_DELETED 4
+#define IMAP_DRAFT 8
+#define IMAP_SEEN 16
+#define IMAP_FETCHED 32 /* internal */
+
+
#define IMAP ((struct citimap *)CtdlGetUserData(SYM_IMAP))