mail-transaction-log.h revision 94aa90d2d17a7aebcda5a4193a62e80ddbb169b7
/* since we'll expunge mails based on data read from transaction log, try to avoid the possibility of corrupted transaction log expunging messages. this value is ORed to the actual MAIL_TRANSACTION_EXPUNGE flag. if it's not present, assume corrupted log. */ /* Mailbox synchronization noticed this change. */ array of { uint32_t uid1, uid2; } /* unsigned char data[]; */ /* old extension: set ext_id. don't set name. new extension: ext_id = (uint32_t)-1. give name. */ /* unsigned char name[]; */ /* these are set for the last ext_intro */ /* unsigned char data[]; */ /* unsigned char data[]; */ /* Open the transaction log. Returns 1 if ok, 0 if file doesn't exist or it's is corrupted, -1 if there was some I/O error. */ /* Create, or recreate, the transaction log. Returns 0 if ok, -1 if error. */ /* Close all the open transactions log files. */ /* Notify of indexid change */ /* Returns the file seq/offset where the mailbox is currently synced at. Since the log is rotated only when mailbox is fully synced, the sequence points always to the latest file. This function doesn't actually find the latest sync position, so you'll need to use eg. log_view_set() before /* Set the current mailbox sync position. file_seq must always be the latest log file's sequence. The offset written automatically to the log when other transactions are being written. */ /* Set view boundaries. Returns -1 if error, 0 if files are lost, 1 if ok. reset_r=TRUE if the whole index should be reset before applying any /* Clear the view. Keep oldest_file_seq log referenced so we don't get /* Read next transaction record from current position. The position is updated. Returns -1 if error, 0 if we're at end of the view, 1 if ok. */ /* Seek to given position within view. Must be inside the view's range. */ /* Returns the position of the record returned previously with mail_transaction_log_view_next() */ /* Returns TRUE if we're at the end of the view window. */ /* Marks the log file in current position to be corrupted. */ /* Write data to transaction log. This is atomic operation. Sequences in updates[] and expunges[] are relative to given view, they're modified to real ones. If nothing is written, log_file_seq_r and log_file_offset_r /* Lock transaction log for index synchronization. Log cannot be read or written to while it's locked. Returns end offset. */ /* Returns the current head. Works only when log is locked. */ /* Returns TRUE if given seq/offset is current head log's rotate point. */ /* Move currently opened log head file to memory (called by mail_index_move_to_memory()) */