mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-29 00:26:33 +03:00
Add an API to be able to pass information to the vio module.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
bec2c4a2ea
commit
68fdf56db7
4 changed files with 49 additions and 21 deletions
|
@ -937,3 +937,10 @@ int csync_set_iconv_codec(const char *from)
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int csync_set_module_property(CSYNC* ctx, const char* key, void* value)
|
||||
{
|
||||
return csync_vio_set_property(ctx, key, value);
|
||||
}
|
||||
|
||||
/* vim: set ts=8 sw=2 et cindent: */
|
||||
|
|
13
src/csync.h
13
src/csync.h
|
@ -513,6 +513,19 @@ const char *csync_get_status_string(CSYNC *ctx);
|
|||
int csync_set_iconv_codec(const char *from);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set a property to module
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
*
|
||||
* @param key The property key
|
||||
*
|
||||
* @param value An opaque pointer to the data.
|
||||
*
|
||||
* @return 0 on success, less than 0 if an error occured.
|
||||
*/
|
||||
int csync_set_module_property(CSYNC *ctx, const char *key, void *value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -586,3 +586,11 @@ char *csync_vio_get_status_string(CSYNC *ctx)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int csync_vio_set_property(CSYNC* ctx, const char* key, void* data)
|
||||
{
|
||||
int rc = -1;
|
||||
if(VIO_METHOD_HAS_FUNC(ctx->module.method, set_property))
|
||||
rc = ctx->module.method->set_property(key, data);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue