dsync-worker.h revision cd611ca82b8b8a61736d21a8a0de58cfd53bc9b6
/* Set this worker as read-only. All attempted changes are ignored. */ /* If any function returns with "waiting for more data", the given callback gets called when more data is available. */ /* Returns TRUE if command queue is full and caller should stop sending /* The given callback gets called when more commands can be queued. */ /* Try to flush command queue. Returns 1 if all flushed, 0 if something is still in queue, -1 if failed. */ /* Iterate though all mailboxes */ /* Get the next available mailbox. Returns 1 if ok, 0 if waiting for more data, -1 if there are no more mailboxes. */ /* Finish mailbox iteration. Returns 0 if ok, -1 if iteration failed. */ /* Iterate though all subscriptions */ /* Get the next subscription. Returns 1 if ok, 0 if waiting for more data, -1 if there are no more subscriptions. */ /* Like _iter_next(), but list known recent unsubscriptions. */ /* Finish subscription iteration. Returns 0 if ok, -1 if iteration failed. */ /* Iterate through all messages in given mailboxes. The mailboxes are iterated /* Get the next available message. Also returns all expunged messages from the end of mailbox (if next_uid-1 message exists, nothing is returned). mailbox_idx_r contains the mailbox's index in mailboxes[] array given to _iter_init(). Returns 1 if ok, 0 if waiting for more data, -1 if there /* Finish message iteration. Returns 0 if ok, -1 if iteration failed. */ /* Create mailbox with given name, GUID and UIDVALIDITY. */ /* Delete mailbox's directory. Fail if it would also delete mailbox. */ /* Change a mailbox and its childrens' name. The name is taken from the given dsync_box (applying name_sep if necessary). */ /* Find mailbox with given GUID and make sure its uid_next and highest_modseq are up to date (but don't shrink them). */ /* The following message syncing functions access the this selected mailbox. */ /* Update message's metadata (flags, keywords, modseq). */ /* Change message's UID. */ /* Expunge given message. */ /* Copy given message. */ /* Save given message from the given input stream. Once saving is finished, the given callback is called and the stream is destroyed. */ /* Cancel any pending saves */ /* Get message data for saving. The callback is called once when the static data has been received. The whole message may not have been downloaded yet, so the caller must read the input stream until it returns EOF and then /* Call the callback once all the pending commands are finished. */ /* Returns TRUE if some commands have failed. */ /* Returns TRUE if some UID or modseq changes didn't get assigned as