Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

qpzuserdb Class Reference

#include <userdb.h>

List of all members.

Public Methods

 qpzuserdb (char *filename, Crypter *cry=0)
 ~qpzuserdb ()
int add (char *name, char *password)
int del (char *name)
void clear ()
int setpass (char *name, char *password)
int comparepass (const char *name, const char *password)
int getsize ()

Public Attributes

int save_on_delete

Private Methods

qpzuserfinduser (const char *n)
qpzusernewuser (char *n)
int setpass (qpzuser *u, char *p)
int load ()
int save ()
 qpzuserdb ()
 qpzuserdb (const qpzuserdb &)
qpzuserdb & operator= (const qpzuserdb &)

Private Attributes

qpzuserfirstuser
qpzuserlastuser
int entries
Cryptercry
char * dbfile


Constructor & Destructor Documentation

qpzuserdb::qpzuserdb char *    filename,
Crypter   cry = 0
 

Definition at line 9 of file userdb.cpp.

References dbfile, entries, firstuser, lastuser, load(), qpzuserdb::qpzuser::name, qpzuserdb::qpzuser::next, qpzuserdb::qpzuser::pass, qpzuserdb::qpzuser::prev, and save_on_delete.

qpzuserdb::~qpzuserdb  
 

Definition at line 25 of file userdb.cpp.

References dbfile, firstuser, qpzuserdb::qpzuser::name, qpzuserdb::qpzuser::next, qpzuserdb::qpzuser::pass, and save().

qpzuserdb::qpzuserdb   [private]
 

Definition at line 38 of file userdb.cpp.

qpzuserdb::qpzuserdb const qpzuserdb &    [private]
 

Definition at line 39 of file userdb.cpp.


Member Function Documentation

int qpzuserdb::add char *    name,
char *    password
 

Definition at line 42 of file userdb.cpp.

References newuser(), and setpass().

Referenced by main().

void qpzuserdb::clear  
 

int qpzuserdb::comparepass const char *    name,
const char *    password
 

Definition at line 83 of file userdb.cpp.

References b64decode(), cry, Crypter::buffer::data, finduser(), qpzuserdb::qpzuser::pass, Crypter::private_decrypt(), and Crypter::buffer::size.

Referenced by main(), and Master::verifyUserPswd().

int qpzuserdb::del char *    name
 

Definition at line 67 of file userdb.cpp.

References entries, finduser(), qpzuserdb::qpzuser::next, and qpzuserdb::qpzuser::prev.

Referenced by main().

qpzuserdb::qpzuser * qpzuserdb::finduser const char *    n [private]
 

Definition at line 119 of file userdb.cpp.

References firstuser, lastuser, qpzuserdb::qpzuser::name, and qpzuserdb::qpzuser::next.

Referenced by comparepass(), del(), newuser(), and setpass().

int qpzuserdb::getsize  
 

Definition at line 115 of file userdb.cpp.

References entries.

Referenced by main().

int qpzuserdb::load   [private]
 

Definition at line 161 of file userdb.cpp.

References dbfile, newuser(), and qpzuserdb::qpzuser::pass.

Referenced by qpzuserdb().

qpzuserdb::qpzuser * qpzuserdb::newuser char *    n [private]
 

Definition at line 51 of file userdb.cpp.

References entries, finduser(), lastuser, qpzuserdb::qpzuser::name, qpzuserdb::qpzuser::next, and qpzuserdb::qpzuser::prev.

Referenced by add(), and load().

qpzuserdb & qpzuserdb::operator= const qpzuserdb &    [private]
 

Definition at line 40 of file userdb.cpp.

int qpzuserdb::save   [private]
 

Definition at line 212 of file userdb.cpp.

References dbfile, firstuser, lastuser, qpzuserdb::qpzuser::name, qpzuserdb::qpzuser::next, and qpzuserdb::qpzuser::pass.

Referenced by ~qpzuserdb().

int qpzuserdb::setpass qpzuser   u,
char *    p
[private]
 

Definition at line 128 of file userdb.cpp.

References b64encode(), cry, Crypter::buffer::data, qpzuserdb::qpzuser::pass, Crypter::public_encrypt(), and Crypter::buffer::size.

int qpzuserdb::setpass char *    name,
char *    password
 

Definition at line 76 of file userdb.cpp.

References finduser().

Referenced by add(), and main().


Member Data Documentation

Crypter* qpzuserdb::cry [private]
 

Definition at line 28 of file userdb.h.

Referenced by comparepass(), and setpass().

char* qpzuserdb::dbfile [private]
 

Definition at line 29 of file userdb.h.

Referenced by load(), qpzuserdb(), save(), and ~qpzuserdb().

int qpzuserdb::entries [private]
 

Definition at line 27 of file userdb.h.

Referenced by del(), getsize(), newuser(), and qpzuserdb().

qpzuser* qpzuserdb::firstuser [private]
 

Definition at line 25 of file userdb.h.

Referenced by finduser(), qpzuserdb(), save(), and ~qpzuserdb().

qpzuser* qpzuserdb::lastuser [private]
 

Definition at line 26 of file userdb.h.

Referenced by finduser(), newuser(), qpzuserdb(), and save().

int qpzuserdb::save_on_delete
 

Definition at line 34 of file userdb.h.

Referenced by Master::checkingThread(), Master::Master(), and qpzuserdb().


The documentation for this class was generated from the following files:
Generated on Mon Nov 25 12:46:40 2002 for qadpz by doxygen1.2.18