|
doc
|
Data Structures | |
| struct | csync_progress_s |
| struct | csync_tree_walk_file_s |
Macros | |
| #define | CSYNC_CONF_DIR ".ocsync" |
| #define | CSYNC_CONF_FILE "ocsync.conf" |
| #define | CSYNC_EXCLUDE_FILE "ocsync_exclude.conf" |
| #define | CSYNC_LOCK_FILE ".csync.lock" |
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) |
| typedef enum csync_error_codes_e | CSYNC_ERROR_CODE |
| typedef void(* | csync_log_callback )(CSYNC *ctx, int verbosity, const char *function, const char *buffer, void *userdata) |
| typedef struct csync_progress_s | CSYNC_PROGRESS |
| typedef void(* | csync_progress_callback )(CSYNC_PROGRESS *progress, void *userdata) |
| typedef int | csync_treewalk_visit_func (TREE_WALK_FILE *, void *) |
| typedef struct csync_tree_walk_file_s | TREE_WALK_FILE |
Variables | |
| int64_t | csync_progress_s::curr_bytes |
| int64_t | csync_progress_s::current_file_no |
| int64_t | csync_progress_s::current_overall_bytes |
| const char * | csync_tree_walk_file_s::error_string |
| int64_t | csync_progress_s::file_size |
| gid_t | csync_tree_walk_file_s::gid |
| enum csync_instructions_e | csync_tree_walk_file_s::instruction |
| enum csync_notify_type_e | csync_progress_s::kind |
| const char * | csync_tree_walk_file_s::md5 |
| mode_t | csync_tree_walk_file_s::mode |
| time_t | csync_tree_walk_file_s::modtime |
| int64_t | csync_progress_s::overall_file_count |
| int64_t | csync_progress_s::overall_transmission_size |
| const char * | csync_progress_s::path |
| const char * | csync_tree_walk_file_s::path |
| const char * | csync_tree_walk_file_s::rename_path |
| enum csync_ftw_type_e | csync_tree_walk_file_s::type |
| uid_t | csync_tree_walk_file_s::uid |
| typedef int(* csync_auth_callback)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata) |
| typedef enum csync_error_codes_e CSYNC_ERROR_CODE |
| typedef void(* csync_log_callback)(CSYNC *ctx, int verbosity, const char *function, const char *buffer, void *userdata) |
| typedef struct csync_progress_s CSYNC_PROGRESS |
| typedef void(* csync_progress_callback)(CSYNC_PROGRESS *progress, void *userdata) |
| typedef int csync_treewalk_visit_func(TREE_WALK_FILE *,void *) |
| typedef struct csync_tree_walk_file_s TREE_WALK_FILE |
| enum csync_error_codes_e |
| enum csync_ftw_type_e |
| enum csync_instructions_e |
Instruction enum.
In the file traversal structure, it describes the csync state of a file.
| enum csync_notify_type_e |
| int csync_abort_requested | ( | CSYNC * | ctx | ) |
Checks for the abort flag, to be used from the modules.
| ctx | The csync context. |
| 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. |
| void csync_clear_exclude_list | ( | CSYNC * | ctx | ) |
Removes all items imported from exclude lists.
| ctx | The context to add the exclude list. |
| int csync_commit | ( | CSYNC * | ctx | ) |
Commit the sync results to journal.
| ctx | The context to commit. |
| 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_conflictcopys | ( | CSYNC * | ctx | ) |
Enable the creation of backup copys if files are changed on both sides.
| 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. |
| CSYNC_ERROR_CODE csync_get_error | ( | CSYNC * | ctx | ) |
Get the error code from the last operation.
| const char* csync_get_error_string | ( | CSYNC * | ctx | ) |
csync_get_error_string - return a string with error information
| ctx |
| bool csync_get_local_only | ( | CSYNC * | ctx | ) |
Retrieve the flag to tell csync that only a local run is intended.
| csync_log_callback csync_get_log_callback | ( | CSYNC * | ctx | ) |
Get the logging callback set.
| ctx | The csync context. |
| int csync_get_log_verbosity | ( | CSYNC * | ctx | ) |
Get the log verbosity.
| [in] | ctx | The csync context to ask for the log verbosity. |
| csync_progress_callback csync_get_progress_callback | ( | CSYNC * | ctx | ) |
| 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. |
| void csync_request_abort | ( | CSYNC * | ctx | ) |
Aborts the current sync run as soon as possible.
Can be called from another thread.
| ctx | The csync context. |
| void csync_resume | ( | CSYNC * | ctx | ) |
Clears the abort flag.
Can be called from another thread.
| 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_iconv_codec | ( | const char * | from | ) |
Set iconv source codec for filenames.
| from | Source codec. |
| int csync_set_local_only | ( | CSYNC * | ctx, |
| bool | local_only | ||
| ) |
Flag to tell csync that only a local run is intended.
Call before csync_init
| local_only | Bool flag to indicate local only mode. |
| int csync_set_log_callback | ( | CSYNC * | ctx, |
| csync_log_callback | cb | ||
| ) |
Set the logging callback.
| ctx | The csync context. |
| cb | The logging callback. |
| int csync_set_log_verbosity | ( | CSYNC * | ctx, |
| int | verbosity | ||
| ) |
Set the log verbosity.
| ctx | The csync context. | |
| [in] | verbosity | The log verbosity. |
| int csync_set_module_property | ( | CSYNC * | ctx, |
| const char * | key, | ||
| void * | value | ||
| ) |
Set a property to module.
| ctx | The csync context. |
| key | The property key |
| value | An opaque pointer to the data. |
| int csync_set_progress_callback | ( | CSYNC * | ctx, |
| csync_progress_callback | cb | ||
| ) |
Set a progress callback.
This callback reports about up- or download progress of a individual file as well as overall progress.
| 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. |
Example:
| 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.
| ctx | The csync context. |
| visitor | A callback function to handle the file info. |
| filter | A filter, built from or'ed csync_instructions_e |
| 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.
| ctx | The csync context. |
| visitor | A callback function to handle the file info. |
| filter | A filter, built from and'ed csync_instructions_e |
| enum csync_instructions_e csync_tree_walk_file_s::instruction |
| enum csync_notify_type_e csync_progress_s::kind |
| enum csync_ftw_type_e csync_tree_walk_file_s::type |
1.8.8