csync.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _CSYNC_H
00034 #define _CSYNC_H
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041
00042
00043 #define CSYNC_VERSION_MAJOR 0
00044 #define CSYNC_VERSION_MINOR 42
00045 #define CSYNC_VERSION_PATCH 0
00046 #define CSYNC_VERSION_STRING "csync version 0.42.0 rc3"
00047
00048
00049
00050
00051 #define CSYNC_CONF_DIR ".csync"
00052 #define CSYNC_CONF_FILE "csync.conf"
00053 #define CSYNC_LOG_FILE "csync_log.conf"
00054 #define CSYNC_EXCLUDE_FILE "csync_exclude.conf"
00055 #define CSYNC_LOCK_FILE "lock"
00056
00057 typedef int (*csync_auth_callback) (const char *prompt, char *buf, size_t len, int echo, int verify);
00058
00059
00060
00061
00062 typedef struct csync_s CSYNC;
00063
00064
00065
00066
00067
00068
00069
00070
00071 int csync_create(CSYNC **csync, const char *local, const char *remote);
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 int csync_init(CSYNC *ctx);
00083
00084
00085
00086
00087
00088
00089
00090
00091 int csync_update(CSYNC *ctx);
00092
00093
00094
00095
00096
00097
00098
00099
00100 int csync_reconcile(CSYNC *ctx);
00101
00102
00103
00104
00105
00106
00107
00108
00109 int csync_propagate(CSYNC *ctx);
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 int csync_destroy(CSYNC *ctx);
00121
00122
00123
00124
00125
00126
00127 const char *csync_version(void);
00128
00129 int csync_add_exclude_list(CSYNC *ctx, const char *path);
00130 char *csync_get_config_dir(CSYNC *ctx);
00131 int csync_set_config_dir(CSYNC *ctx, const char *path);
00132 int csync_remove_config_dir(CSYNC *ctx);
00133 int csync_enable_statedb(CSYNC *ctx);
00134 int csync_disable_statedb(CSYNC *ctx);
00135 int csync_is_statedb_disabled(CSYNC *ctx);
00136 csync_auth_callback csync_get_auth_callback(CSYNC *ctx);
00137 int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb);
00138 char *csync_get_statedb_file(CSYNC *ctx);
00139 int csync_get_status(CSYNC *ctx);
00140 int csync_set_status(CSYNC *ctx, int status);
00141
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145
00146
00147
00148
00149 #endif
00150