37 #include <sys/types.h>
39 #include "csync_version.h"
48 #define CSYNC_CONF_DIR ".ocsync"
49 #define CSYNC_CONF_FILE "ocsync.conf"
50 #define CSYNC_EXCLUDE_FILE "ocsync_exclude.conf"
51 #define CSYNC_LOCK_FILE ".csync.lock"
190 int echo,
int verify,
void *
userdata);
194 const char *
function,
void(* csync_log_callback)(CSYNC *ctx, int verbosity, const char *function, const char *buffer, void *userdata)
csync_auth_callback csync_get_auth_callback(CSYNC *ctx)
Get the authentication callback set.
csync_instructions_e
Instruction enum.
int csync_get_status(CSYNC *ctx)
int csync_is_statedb_disabled(CSYNC *ctx)
Check if the statedb usage is enabled.
void csync_clear_exclude_list(CSYNC *ctx)
Removes all items imported from exclude lists.
int64_t current_overall_bytes
int64_t overall_file_count
int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb)
Set the authentication callback.
csync_log_callback csync_get_log_callback(CSYNC *ctx)
Get the logging callback set.
const char * csync_get_statedb_file(CSYNC *ctx)
Get the path of the statedb file used.
const char * csync_get_error_string(CSYNC *ctx)
csync_get_error_string - return a string with error information
CSync File Traversal structure.
int csync_set_status(CSYNC *ctx, int status)
int csync_treewalk_visit_func(TREE_WALK_FILE *, void *)
const char * error_string
int64_t overall_transmission_size
int csync_get_log_verbosity(CSYNC *ctx)
Get the log verbosity.
int csync_set_log_callback(CSYNC *ctx, csync_log_callback cb)
Set the logging callback.
CSYNC_ERROR_CODE csync_get_error(CSYNC *ctx)
Get the error code from the last operation.
int csync_propagate(CSYNC *ctx)
Propagation.
struct csync_s::@3 remote
enum csync_instructions_e instruction
int csync_abort_requested(CSYNC *ctx)
Checks for the abort flag, to be used from the modules.
void csync_resume(CSYNC *ctx)
Clears the abort flag.
int csync_reconcile(CSYNC *ctx)
Reconciliation.
int csync_set_local_only(CSYNC *ctx, bool local_only)
Flag to tell csync that only a local run is intended.
int csync_set_module_property(CSYNC *ctx, const char *key, void *value)
Set a property to module.
int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter)
Walk the local file tree and call a visitor function for each file.
int csync_init(CSYNC *ctx)
Initialize the file synchronizer.
bool csync_get_local_only(CSYNC *ctx)
Retrieve the flag to tell csync that only a local run is intended.
int csync_disable_statedb(CSYNC *ctx)
Disable the usage of the statedb.
int csync_set_userdata(CSYNC *ctx, void *userdata)
Save userdata to the context which is passed to the auth callback function.
int csync_update(CSYNC *ctx)
Update detection.
int csync_add_exclude_list(CSYNC *ctx, const char *path)
Add an additional exclude list.
enum csync_ftw_type_e type
int(* csync_auth_callback)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata)
int csync_create(CSYNC **csync, const char *local, const char *remote)
Allocate a csync context.
int csync_set_config_dir(CSYNC *ctx, const char *path)
Change the config directory.
int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter)
Walk the remote file tree and call a visitor function for each file.
int csync_set_progress_callback(CSYNC *ctx, csync_progress_callback cb)
Set a progress callback.
int csync_enable_conflictcopys(CSYNC *ctx)
Enable the creation of backup copys if files are changed on both sides.
int csync_commit(CSYNC *ctx)
Commit the sync results to journal.
void * csync_get_userdata(CSYNC *ctx)
Get the userdata saved in the context.
enum csync_notify_type_e kind
enum csync_error_codes_e CSYNC_ERROR_CODE
int csync_set_iconv_codec(const char *from)
Set iconv source codec for filenames.
int csync_set_log_verbosity(CSYNC *ctx, int verbosity)
Set the log verbosity.
int csync_destroy(CSYNC *ctx)
Destroy the csync context.
int csync_remove_config_dir(CSYNC *ctx)
Remove the complete config directory.
void(* csync_progress_callback)(CSYNC_PROGRESS *progress, void *userdata)
Callback definition for file progress callback.
int csync_enable_statedb(CSYNC *ctx)
Enable the usage of the statedb.
csync_progress_callback csync_get_progress_callback(CSYNC *ctx)
void csync_request_abort(CSYNC *ctx)
Aborts the current sync run as soon as possible.
const char * csync_get_config_dir(CSYNC *ctx)
Get the config directory.
const char * csync_version(int req_version)
Check if csync is the required version or get the version string.