From d7309c4ff948ffba7fb20e34acbd6ae4582fdd8a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 24 Jun 2008 13:36:27 +0200 Subject: [PATCH] Rename the callback function. --- modules/csync_dummy.c | 2 +- modules/csync_smb.c | 4 ++-- src/csync.c | 4 ++-- src/csync.h | 9 ++++++--- src/csync_private.h | 2 +- src/vio/csync_vio_method.h | 2 +- src/vio/csync_vio_module.h | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/csync_dummy.c b/modules/csync_dummy.c index e452b5bab2..b2197e0731 100644 --- a/modules/csync_dummy.c +++ b/modules/csync_dummy.c @@ -193,7 +193,7 @@ csync_vio_method_t _method = { .utimes = _utimes }; -csync_vio_method_t *vio_module_init(const char *method_name, const char *args, csync_module_auth_callback cb) { +csync_vio_method_t *vio_module_init(const char *method_name, const char *args, csync_auth_callback cb) { DEBUG_DUMMY(("csync_dummy - method_name: %s\n", method_name)); DEBUG_DUMMY(("csync_dummy - args: %s\n", args)); diff --git a/modules/csync_smb.c b/modules/csync_smb.c index dfb7258956..b890b06014 100644 --- a/modules/csync_smb.c +++ b/modules/csync_smb.c @@ -35,7 +35,7 @@ #endif SMBCCTX *smb_context = NULL; -csync_module_auth_callback auth_cb = NULL; +csync_auth_callback auth_cb = NULL; /* Do we build against Samba 3.2 */ #ifdef DEPRECATED_SMBC_INTERFACE @@ -483,7 +483,7 @@ csync_vio_method_t _method = { }; csync_vio_method_t *vio_module_init(const char *method_name, const char *args, - csync_module_auth_callback cb) { + csync_auth_callback cb) { smb_context = smbc_new_context(); DEBUG_SMB(("csync_smb - method_name: %s\n", method_name)); diff --git a/src/csync.c b/src/csync.c index ec0af008aa..14748cd602 100644 --- a/src/csync.c +++ b/src/csync.c @@ -591,7 +591,7 @@ int csync_remove_config_dir(CSYNC *ctx) { return 0; } -int csync_set_module_auth_callback(CSYNC *ctx, csync_module_auth_callback cb) { +int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb) { if (ctx == NULL || cb == NULL) { return -1; } @@ -614,7 +614,7 @@ char *csync_get_journal_file(CSYNC *ctx) { return c_strdup(ctx->journal.file); } -csync_module_auth_callback csync_get_module_auth_callback(CSYNC *ctx) { +csync_auth_callback csync_get_auth_callback(CSYNC *ctx) { if (ctx == NULL) { return NULL; } diff --git a/src/csync.h b/src/csync.h index a8c3a451de..3ea53b2d24 100644 --- a/src/csync.h +++ b/src/csync.h @@ -55,7 +55,7 @@ extern "C" { #define CSYNC_JOURNAL_FILE "csync_journal.db" #define CSYNC_LOCK_FILE "lock" -typedef void (*csync_module_auth_callback) (char *usr, size_t usrlen, char *pwd, size_t pwlen); +typedef void (*csync_auth_callback) (char *usr, size_t usrlen, char *pwd, size_t pwlen); /** * csync handle @@ -131,8 +131,11 @@ int csync_add_exclude_list(CSYNC *ctx, const char *path); char *csync_get_config_dir(CSYNC *ctx); int csync_set_config_dir(CSYNC *ctx, const char *path); int csync_remove_config_dir(CSYNC *ctx); -csync_module_auth_callback csync_get_module_auth_callback(CSYNC *ctx); -int csync_set_module_auth_callback(CSYNC *ctx, csync_module_auth_callback cb); +int csync_enable_journal(CSYNC *ctx); +int csync_disable_journal(CSYNC *ctx); +int csync_is_journal_disabled(CSYNC *ctx); +csync_auth_callback csync_get_auth_callback(CSYNC *ctx); +int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb); char *csync_get_journal_file(CSYNC *ctx); int csync_get_status(CSYNC *ctx); int csync_set_status(CSYNC *ctx, int status); diff --git a/src/csync_private.h b/src/csync_private.h index 5dc307f417..9c30d982fe 100644 --- a/src/csync_private.h +++ b/src/csync_private.h @@ -75,7 +75,7 @@ enum csync_replica_e { * @brief csync public structure */ struct csync_s { - csync_module_auth_callback auth_callback; + csync_auth_callback auth_callback; c_strlist_t *excludes; struct { diff --git a/src/vio/csync_vio_method.h b/src/vio/csync_vio_method.h index e07e329c16..8e9997aed3 100644 --- a/src/vio/csync_vio_method.h +++ b/src/vio/csync_vio_method.h @@ -35,7 +35,7 @@ typedef struct csync_vio_method_s csync_vio_method_t; -typedef csync_vio_method_t *(*csync_vio_method_init_fn)(const char *method_name, const char *config_args, csync_module_auth_callback cb); +typedef csync_vio_method_t *(*csync_vio_method_init_fn)(const char *method_name, const char *config_args, csync_auth_callback cb); typedef void (*csync_vio_method_finish_fn)(csync_vio_method_t *method); typedef csync_vio_method_handle_t *(*csync_method_open_fn)(const char *durl, int flags, mode_t mode); diff --git a/src/vio/csync_vio_module.h b/src/vio/csync_vio_module.h index 903090b414..212f806889 100644 --- a/src/vio/csync_vio_module.h +++ b/src/vio/csync_vio_module.h @@ -26,7 +26,7 @@ #include "vio/csync_vio_method.h" extern csync_vio_method_t *vio_module_init (const char *method_name, - const char *args, csync_module_auth_callback cb); + const char *args, csync_auth_callback cb); extern void vio_module_shutdown(csync_vio_method_t *method); #endif /* _CSYNC_VIO_MODULE_H */