#include <DbPsql.h>
Inheritance diagram for DbPsql:

Public Member Functions | |
| ~DbPsql () | |
| Destructor. | |
| DbPsql (Logger *log, const char *dbname, const char *dbuser, const char *dbpass) | |
| Constructor. | |
| int | addUserAccount (UserAccount *account) |
| Add a user account. | |
| void | delUserAccount (int id) |
| Remove a user account. | |
| bool | accountIdExists (int id) |
| verify if account exists | |
| void | modUserAccount (int id, char *field, char *value) |
| Modify a field in a user accounts table. | |
| void | modUserAccount (int id, char *field, int value) |
| modify an int field | |
| bool | fetchAccountInfo (int id, UserAccount *account) |
| Fetch an account from the database by id number. | |
| int | findUserAccountIdFromFqdn (const char *fqdn) |
| Get the account id number from an fqdn. | |
| unsigned long | fetchAcctAddr (int id) |
| Retrive the IP address of an account. | |
| void | getActiveAccounts () |
| TODO. | |
| void | addDnsRecord (int id, const char *dname, DnsRecordType type, const char *data) |
| Add a DNS record. | |
| void | delDnsRecords (int id) |
| Remove all DNS records. | |
| void | delDnsRecord (int id, const char *dname, DnsRecordType type, const char *data) |
| Remove a DNS record. | |
| void | listDnsRecords (int id, std::vector< DnsRecord > &dnsRecordList) |
| List all DNS records to stdout. | |
| int | getNbOfDnsRecords (int accountId, DnsRecordType type) |
| Return the number of DNS records for an account. | |
| int | pruneActiveAccount (void(*func)(int, unsigned long, time_t)) |
| Run a function on all active hosts. | |
Protected Member Functions | |
| int | allocateUserAccountId () |
| Get an account ID for a new account. | |
Protected Attributes | |
| PgDatabase * | pg |
| PSQL database object (libpq++). | |
1.4.4