diff options
Diffstat (limited to 'src/dbase.h')
-rw-r--r-- | src/dbase.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/dbase.h b/src/dbase.h index df64927..c7a98ee 100644 --- a/src/dbase.h +++ b/src/dbase.h @@ -30,6 +30,7 @@ #define KBS_DBASE_H #include "msg.h" +#include "rexp.h" /* ---------------------------------------- TYPES */ @@ -41,9 +42,10 @@ typedef struct Domain Domain; /* ---------------------------------------- INTERFACES */ -/* Add a new domain and define the regular expression that defines it +/* Add a new domain and define the regular expression that defines it. + re will be freed by the database when closed. */ -Domain *DBNewDomain(const char *regexp); +Domain *DBNewDomain(RE_Expression name); /* Define the default mode for a domain @@ -56,14 +58,16 @@ void DBDefault(Domain *domain, int block); void DBBlockUser(Domain *domain, const char *username); -/* Add an allowable subject for a domain +/* Add an allowable subject for a domain. + re will be freed by the database when closed. */ -void DBAllowSubject(Domain *domain, const char *regexp); +void DBAllowSubject(Domain *domain, RE_Expression re); -/* Adds a disallowed subject for a domain +/* Adds a disallowed subject for a domain. + re will be freed by the database when closed. */ -void DBBlockSubject(Domain *domain, const char *regexp); +void DBBlockSubject(Domain *domain, RE_Expression re); /* Adds a trusted username @@ -81,6 +85,16 @@ void DBTrustedDomain(const char *domain); int DBBlockMessage(const POP3Message *msg); +/* Returns reason for last block if message is to be blocked. +*/ +const char *DBBlockReason(void); + + +/* Free up memory allocated to database. +*/ +void DBClose(void); + + #endif /* END OF FILE */ |