diff options
Diffstat (limited to 'database/sqlite/administration/blacklist.c')
-rw-r--r-- | database/sqlite/administration/blacklist.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/database/sqlite/administration/blacklist.c b/database/sqlite/administration/blacklist.c index 7719ccc..12130c3 100644 --- a/database/sqlite/administration/blacklist.c +++ b/database/sqlite/administration/blacklist.c @@ -1,6 +1,6 @@ /* blacklist.c -- Functions for processing openvpn_blacklist 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/blacklist.c + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2009-05-09 + * + * @brief Functions for administering the blacklist table + * + */ + #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 blacklist table + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap containing the search query + * + * @return Returns a valid eurephia XML document on success, otherwise NULL + */ xmlDoc *blacklist_list(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *doc = NULL; @@ -104,6 +121,14 @@ xmlDoc *blacklist_list(eurephiaCTX *ctx, eDBfieldMap *fmap) { } +/** + * Internal function. Registers a new entry in the blacklist. + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap containing the entry to be registered + * + * @return Returns an eurephia ResultMsg XML document, with success message or an error message + */ xmlDoc *blacklist_add(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *ret = NULL; @@ -127,6 +152,15 @@ xmlDoc *blacklist_add(eurephiaCTX *ctx, eDBfieldMap *fmap) { return ret; } + +/** + * Internal function. Deletes an entry from the blacklist + * + * @param ctx eurephiaCTX + * @param fmap eDBfieldMap containing the entry to be deleted + * + * @return Returns an eurephia ResultMsg XML document, with success message or an error message + */ xmlDoc *blacklist_delete(eurephiaCTX *ctx, eDBfieldMap *fmap) { dbresult *res = NULL; xmlDoc *ret = NULL; |