Document the propagation functions.

This commit is contained in:
Andreas Schneider 2009-05-25 12:58:34 +02:00
Родитель 778640f1e1
Коммит 460aa67dca
1 изменённых файлов: 41 добавлений и 0 удалений

Просмотреть файл

@ -23,10 +23,51 @@
#include <sys/types.h>
/**
* @file csync_reconcile.h
*
* @brief Propagation
*
* It uses the calculated records to apply them on the current replica. The
* propagator uses a two-phase-commit mechanism to simulate an atomic
* filesystem operation.
*
* In the first phase we copy the file to a temporary file on the opposite
* replica. This has the advantage that we can check if file which has been
* copied to the opposite replica has been transfered successfully. If the
* connection gets interrupted during the transfer we still have the original
* states of the file. This means no data will be lost.
*
* In the second phase the file on the opposite replica will be overwritten by
* the temporary file.
*
* After a successful propagation we have to merge the trees to reflect the
* current state of the filesystem tree. This updated tree will be written as a
* journal into the state database. It will be used during the update detection
* of the next synchronization. See above for a description of the state
* database during synchronization.
*
* @defgroup csyncPropagationInternals csync propagation internals
* @ingroup csyncInternalAPI
*
* @{
*/
#define C_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
#define C_DIR_MODE (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
/**
* @brief Propagate all files.
*
* @param ctx The csync context to use for propagation.
*
* @return 0 on success, < 0 on error.
*/
int csync_propagate_files(CSYNC *ctx);
/**
* }@
*/
#endif /* _CSYNC_PROPAGATE_H */
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */