Defines | |
| #define | CSYNC_CONF_DIR ".csync" |
| #define | CSYNC_CONF_FILE "csync.conf" |
| #define | CSYNC_EXCLUDE_FILE "csync_exclude.conf" |
| #define | CSYNC_LOCK_FILE "lock" |
| #define | CSYNC_LOG_FILE "csync_log.conf" |
| #define | CSYNC_STRINGIFY(s) CSYNC_TOSTRING(s) |
| #define | CSYNC_TOSTRING(s) #s |
| #define | CSYNC_VERSION(a, b, c) CSYNC_VERSION_DOT(a, b, c) |
| #define | CSYNC_VERSION_DOT(a, b, c) a ##.## b ##.## c |
| #define | CSYNC_VERSION_INT(a, b, c) ((a) << 16 | (b) << 8 | (c)) |
| #define | LIBCSYNC_VERSION |
| #define | LIBCSYNC_VERSION_INT |
| #define | LIBCSYNC_VERSION_MAJOR 0 |
| #define | LIBCSYNC_VERSION_MICRO 0 |
| #define | LIBCSYNC_VERSION_MINOR 42 |
Typedefs | |
| typedef struct csync_s | CSYNC |
| typedef int(* | csync_auth_callback )(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata) |
Functions | |
| int | csync_add_exclude_list (CSYNC *ctx, const char *path) |
| int | csync_create (CSYNC **csync, const char *local, const char *remote) |
| int | csync_destroy (CSYNC *ctx) |
| int | csync_disable_statedb (CSYNC *ctx) |
| int | csync_enable_statedb (CSYNC *ctx) |
| csync_auth_callback | csync_get_auth_callback (CSYNC *ctx) |
| const char * | csync_get_config_dir (CSYNC *ctx) |
| const char * | csync_get_statedb_file (CSYNC *ctx) |
| int | csync_get_status (CSYNC *ctx) |
| void * | csync_get_userdata (CSYNC *ctx) |
| int | csync_init (CSYNC *ctx) |
| int | csync_is_statedb_disabled (CSYNC *ctx) |
| int | csync_propagate (CSYNC *ctx) |
| int | csync_reconcile (CSYNC *ctx) |
| int | csync_remove_config_dir (CSYNC *ctx) |
| int | csync_set_auth_callback (CSYNC *ctx, csync_auth_callback cb) |
| int | csync_set_config_dir (CSYNC *ctx, const char *path) |
| int | csync_set_status (CSYNC *ctx, int status) |
| int | csync_set_userdata (CSYNC *ctx, void *userdata) |
| int | csync_update (CSYNC *ctx) |
| const char * | csync_version (int req_version) |
| #define CSYNC_VERSION_INT | ( | a, | |||
| b, | |||||
| c | ) | ((a) << 16 | (b) << 8 | (c)) |
| #define LIBCSYNC_VERSION |
Value:
| #define LIBCSYNC_VERSION_INT |
Value:
| typedef int(* csync_auth_callback)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata) |
| int csync_add_exclude_list | ( | CSYNC * | ctx, | |
| const char * | path | |||
| ) |
Add an additional exclude list.
| ctx | The context to add the exclude list. | |
| path | The path pointing to the file. |
| int csync_create | ( | CSYNC ** | csync, | |
| const char * | local, | |||
| const char * | remote | |||
| ) |
Allocate a csync context.
| csync | The context variable to allocate. |
| int csync_destroy | ( | CSYNC * | ctx | ) |
Destroy the csync context.
Writes the statedb, unlocks csync and frees the memory.
| ctx | The context to destroy. |
| int csync_disable_statedb | ( | CSYNC * | ctx | ) |
Disable the usage of the statedb.
It is enabled by default.
| ctx | The csync context. |
| int csync_enable_statedb | ( | CSYNC * | ctx | ) |
Enable the usage of the statedb.
It is enabled by default.
| ctx | The csync context. |
| csync_auth_callback csync_get_auth_callback | ( | CSYNC * | ctx | ) |
Get the authentication callback set.
| ctx | The csync context. |
| const char* csync_get_config_dir | ( | CSYNC * | ctx | ) |
Get the config directory.
| ctx | The csync context. |
| const char* csync_get_statedb_file | ( | CSYNC * | ctx | ) |
Get the path of the statedb file used.
| ctx | The csync context. |
| int csync_get_status | ( | CSYNC * | ctx | ) |
| void* csync_get_userdata | ( | CSYNC * | ctx | ) |
Get the userdata saved in the context.
| ctx | The csync context. |
| int csync_init | ( | CSYNC * | ctx | ) |
Initialize the file synchronizer.
This function loads the configuration, the statedb and locks the client.
| ctx | The context to initialize. |
| int csync_is_statedb_disabled | ( | CSYNC * | ctx | ) |
Check if the statedb usage is enabled.
| ctx | The csync context. |
| int csync_propagate | ( | CSYNC * | ctx | ) |
Propagation.
| ctx | The context to run the propagation on. |
| int csync_reconcile | ( | CSYNC * | ctx | ) |
Reconciliation.
| ctx | The context to run the reconciliation on. |
| int csync_remove_config_dir | ( | CSYNC * | ctx | ) |
Remove the complete config directory.
| ctx | The csync context. |
| int csync_set_auth_callback | ( | CSYNC * | ctx, | |
| csync_auth_callback | cb | |||
| ) |
Set the authentication callback.
| ctx | The csync context. | |
| cb | The authentication callback. |
| int csync_set_config_dir | ( | CSYNC * | ctx, | |
| const char * | path | |||
| ) |
Change the config directory.
| ctx | The csync context. | |
| path | The path to the new config directory. |
| int csync_set_status | ( | CSYNC * | ctx, | |
| int | status | |||
| ) |
| int csync_set_userdata | ( | CSYNC * | ctx, | |
| void * | userdata | |||
| ) |
Save userdata to the context which is passed to the auth callback function.
| ctx | The csync context. | |
| userdata | The userdata to be stored in the context. |
| int csync_update | ( | CSYNC * | ctx | ) |
Update detection.
| ctx | The context to run the update detection on. |
| const char* csync_version | ( | int | req_version | ) |
Check if csync is the required version or get the version string.
| req_version | The version required. |
if (csync_version(CSYNC_VERSION_INT(0,42,1)) == NULL) { fprintf(stderr, "libcsync version is too old!\n"); exit(1); } if (debug) { printf("csync %s\n", csync_version(0)); }
1.5.6