## CamelOfflineJournal CamelOfflineJournal |

## Synopsis

                        CamelOfflineJournal;
                        CamelOfflineJournalEntry;
    void                camel_offline_journal_construct     (CamelOfflineJournal *journal,
                                                             struct _CamelFolder *folder,
                                                             const char *filename);
    void                camel_offline_journal_set_filename  (CamelOfflineJournal *journal,
                                                             const char *filename);
    int                 camel_offline_journal_write         (CamelOfflineJournal *journal,
                                                             CamelException *ex);
    int                 camel_offline_journal_replay        (CamelOfflineJournal *journal,
                                                             CamelException *ex);

## Description

## Details

### CamelOfflineJournal

    typedef struct {
    	CamelObject parent_object;

    	struct _CamelFolder *folder;
    	char *filename;
    	EDList queue;
    } CamelOfflineJournal;

### CamelOfflineJournalEntry

    typedef struct _CamelOfflineJournalEntry CamelOfflineJournalEntry;

### camel_offline_journal_construct ()

    void                camel_offline_journal_construct     (CamelOfflineJournal *journal,
                                                             struct _CamelFolder *folder,
                                                             const char *filename);

Constructs a journal object.

`journal` : | a CamelOfflineJournal object
`folder` : | a CamelFolder object
`filename` : | a filename to save/load the journal

### camel_offline_journal_set_filename ()

    void                camel_offline_journal_set_filename  (CamelOfflineJournal *journal,
                                                             const char *filename);

Set the filename where the journal should load/save from.

`journal` : | a CamelOfflineJournal object
`filename` : | a filename to load/save the journal to

### camel_offline_journal_write ()

    int                 camel_offline_journal_write         (CamelOfflineJournal *journal,
                                                             CamelException *ex);

Save the journal to disk.

`journal` : | a CamelOfflineJournal object
`ex` : | a CamelException
Returns : | %0 on success or `-1` on fail

### camel_offline_journal_replay ()

    int                 camel_offline_journal_replay        (CamelOfflineJournal *journal,
                                                             CamelException *ex);

Replay all entries in the journal.

`journal` : | a CamelOfflineJournal object
`ex` : | a CamelException
Returns : | %0 on success (no entry failed to replay) or `-1` on fail