/* Delete temp files having ctime older than this. */
#define DBOX_TMP_DELETE_SECS (36*60*60)
+/* Flag specifies if the message should be in primary or alternative storage */
+#define DBOX_INDEX_FLAG_ALT MAIL_INDEX_MAIL_FLAG_BACKEND
+
struct dbox_storage_vfuncs {
/* dbox file has zero references now. it should be either freed or
left open in case it's accessed again soon */
#define SDBOX_MAIL_FILE_PREFIX "u."
#define SDBOX_MAIL_FILE_FORMAT SDBOX_MAIL_FILE_PREFIX"%u"
-/* Flag specifies if the message should be in primary or alternative storage */
-#define SDBOX_INDEX_FLAG_ALT MAIL_INDEX_MAIL_FLAG_BACKEND
-
#define SDBOX_INDEX_HEADER_MIN_SIZE (sizeof(uint32_t))
struct sdbox_index_header {
uint32_t oldv1_highest_maildir_uid;
if (sync_rec->type == MAIL_INDEX_SYNC_TYPE_EXPUNGE)
entry->type = SDBOX_SYNC_ENTRY_TYPE_EXPUNGE;
- else if ((sync_rec->add_flags & SDBOX_INDEX_FLAG_ALT) != 0)
+ else if ((sync_rec->add_flags & DBOX_INDEX_FLAG_ALT) != 0)
entry->type = SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT;
else
entry->type = SDBOX_SYNC_ENTRY_TYPE_MOVE_FROM_ALT;
/* we're interested */
} else if (sync_rec->type == MAIL_INDEX_SYNC_TYPE_FLAGS) {
/* we care only about alt flag changes */
- if ((sync_rec->add_flags & SDBOX_INDEX_FLAG_ALT) == 0 &&
- (sync_rec->remove_flags & SDBOX_INDEX_FLAG_ALT) == 0)
+ if ((sync_rec->add_flags & DBOX_INDEX_FLAG_ALT) == 0 &&
+ (sync_rec->remove_flags & DBOX_INDEX_FLAG_ALT) == 0)
return 1;
} else {
/* not interested */