diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-04 00:48:52 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-04 00:48:52 +0200 |
commit | da402ffcbe7e9a616bab83739b7294ce9f5e79c4 (patch) | |
tree | 8e85cd3f72a1cfa5b1600461b687917423eb2c9d /eurephiadm/client_context.c | |
parent | 2dcc5b5da4291e0cb4fb9fce6134dc836e92c344 (diff) | |
download | eurephia-da402ffcbe7e9a616bab83739b7294ce9f5e79c4.tar.gz eurephia-da402ffcbe7e9a616bab83739b7294ce9f5e79c4.tar.xz eurephia-da402ffcbe7e9a616bab83739b7294ce9f5e79c4.zip |
Added doxygen comments for the main eurephiadm parts
Diffstat (limited to 'eurephiadm/client_context.c')
-rw-r--r-- | eurephiadm/client_context.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/eurephiadm/client_context.c b/eurephiadm/client_context.c index ebf4371..040e9d6 100644 --- a/eurephiadm/client_context.c +++ b/eurephiadm/client_context.c @@ -19,6 +19,15 @@ * */ +/** + * @file client_context.c + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2008-12-01 + * + * @brief Functions for working with eurephiaCTX outside the openvpn plug-in + * + */ + #include <stdio.h> #include <string.h> #include <assert.h> @@ -30,6 +39,16 @@ #include <eurephiadb.h> +/** + * Initialises a new eurephiaCTX. This function also initialises the database driver, which must + * be configured in the configuration. + * + * @param log FILE pointer where to put log data + * @param loglevel Set the log level (verbosity) + * @param cfg eurephiaVALUES pointer to the configuration + * + * @return Returns a pointer to a eurephiaCTX, otherwise NULL. + */ eurephiaCTX *eurephiaCTX_init(FILE *log, const int loglevel, eurephiaVALUES *cfg) { eurephiaCTX *ctx = NULL; char *dbdriver = NULL, *logfile = NULL; @@ -86,6 +105,13 @@ eurephiaCTX *eurephiaCTX_init(FILE *log, const int loglevel, eurephiaVALUES *cfg return ctx; } + +/** + * Takes care of tearing down a eurephiaCTX in a proper way. It will disconnect from the + * database and unload the database driver if needed. + * + * @param ctx eurephiaCTX to take down. + */ void eurephiaCTX_destroy(eurephiaCTX *ctx) { if( ctx == NULL ) { return; |