diff options
Diffstat (limited to 'database/sqlite/administration/attempts.c')
-rw-r--r-- | database/sqlite/administration/attempts.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/database/sqlite/administration/attempts.c b/database/sqlite/administration/attempts.c index 8518e28..e1e5d19 100644 --- a/database/sqlite/administration/attempts.c +++ b/database/sqlite/administration/attempts.c @@ -1,6 +1,6 @@ /* attempts.c -- Functions for processing openvpn_attempts records * - * GPLv2 only - Copyright (C) 2008, 2009 + * GPLv2 only - Copyright (C) 2009 * David Sommerseth <dazo@users.sourceforge.net> * * This program is free software; you can redistribute it and/or @@ -19,6 +19,15 @@ * */ +/** + * @file sqlite/administration/attempts.c + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2009-04-09 + * + * @brief Functions for processing attempts entries in the database + * + */ + #include <string.h> #include <unistd.h> #include <assert.h> @@ -47,6 +56,14 @@ #include "../sqlite.h" +/** + * Internal function. Retrieves a list of all registered entries in the attempts table + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap containing the search query + * + * @return Returns a valid eurephia XML document on success, otherwise NULL + */ xmlDoc *attempts_list(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *doc = NULL; @@ -105,6 +122,15 @@ xmlDoc *attempts_list(eurephiaCTX *ctx, eDBfieldMap *fmap) { } + +/** + * Internal function. Resets the attempts counter for one or more entries in the database + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap defining which records to reset the attempts counter on + * + * @return Returns a valid eurephia XML document on success, otherwise NULL + */ xmlDoc *attempts_reset(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *ret = NULL; @@ -131,6 +157,15 @@ xmlDoc *attempts_reset(eurephiaCTX *ctx, eDBfieldMap *fmap) { return ret; } + +/** + * Internal function. Deletes an entry from the attempts log + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap containing the entry/entries to delete + * + * @return Returns a valid eurephia XML document on success, otherwise NULL + */ xmlDoc *attempts_delete(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *ret = NULL; |