mail-transaction-log-private.h revision 4bc96ba6f1d67a90a75fa131bcd2cd508ea5a05a
#ifndef __MAIL_TRANSACTION_LOG_VIEW_H
#define __MAIL_TRANSACTION_LOG_VIEW_H
#include "file-dotlock.h"
#include "mail-transaction-log.h"
/* Rotate when log is older than ROTATE_TIME and larger than MIN_SIZE */
/* If log is larger than MAX_SIZE, rotate regardless of the time */
struct mail_transaction_log_file {
struct mail_transaction_log *log;
struct mail_transaction_log_file *next;
/* refcount=0 is a valid state. files start that way, and they're
freed only when mail_transaction_logs_clean() is called. */
int refcount;
char *filepath;
int fd;
void *mmap_base;
struct mail_transaction_log_header hdr;
unsigned int locked:1;
};
struct mail_transaction_log {
struct mail_index *index;
struct mail_transaction_log_view *views;
/* files is a linked list of all the opened log files. the list is
sorted by the log file sequence, so that transaction views can use
them easily. head contains a pointer to the newest log file. */
unsigned int dotlock_count;
};
void
const char *fmt, ...)
struct mail_transaction_log_file *
const char *path);
struct mail_transaction_log_file *
struct mail_transaction_log_file *
const char *path);
struct mail_transaction_log_file *
const char *path);
bool head, bool ignore_estale);
void
struct mail_transaction_log_file **file_r);
#endif