Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

DbPsql Class Reference

Class derived from Db implementing support for the Postgresql Database. More...

#include <DbPsql.h>

Inheritance diagram for DbPsql:

Db List of all members.

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++).

Detailed Description

Class derived from Db implementing support for the Postgresql Database.


The documentation for this class was generated from the following files:
Generated on Tue Sep 13 01:32:47 2005 for DDT Project by  doxygen 1.4.4