signon
8.42
|
#include <credentialsdb_p.h>
Public Member Functions | |
MetaDataDB (const QString &name) | |
bool | createTables () |
bool | updateDB (int version) |
QStringList | methods (const quint32 id, const QString &securityToken=QString()) |
quint32 | insertMethod (const QString &method, bool *ok=0) |
quint32 | methodId (const QString &method) |
SignonIdentityInfo | identity (const quint32 id) |
QList< SignonIdentityInfo > | identities (const QMap< QString, QString > &filter) |
quint32 | updateIdentity (const SignonIdentityInfo &info) |
bool | removeIdentity (const quint32 id) |
bool | clear () |
QStringList | accessControlList (const quint32 identityId) |
QStringList | ownerList (const quint32 identityId) |
bool | addReference (const quint32 id, const QString &token, const QString &reference) |
bool | removeReference (const quint32 id, const QString &token, const QString &reference=QString()) |
QStringList | references (const quint32 id, const QString &token=QString()) |
![]() | |
SqlDatabase (const QString &hostname, const QString &connectionName, int version) | |
Constructs a SqlDatabase object using the given hostname. | |
virtual | ~SqlDatabase () |
Destroys the SqlDatabase object, closing the database connection. | |
bool | init () |
Connects to the DB and if necessary creates the tables. | |
bool | connect () |
Creates the database connection. | |
void | disconnect () |
Destroys the database connection. | |
bool | startTransaction () |
bool | commit () |
void | rollback () |
bool | connected () |
void | setDatabaseName (const QString &databaseName) |
Sets the database name. | |
void | setUsername (const QString &username) |
Sets the username for the database connection. | |
void | setPassword (const QString &password) |
Sets the password for the database connection. | |
QString | databaseName () const |
QString | username () const |
QString | password () const |
QSqlQuery | newQuery () const |
QSqlQuery | exec (const QString &query) |
Executes a specific database query. | |
QSqlQuery | exec (QSqlQuery &query) |
Executes a specific database query. | |
bool | transactionalExec (const QStringList &queryList) |
Executes a specific database set of queryes (INSERTs, UPDATEs, DELETEs) in a transaction context (No nested transactions supported - sqlite reasons). | |
bool | hasTables () const |
SignOn::CredentialsDBError | lastError () const |
bool | errorOccurred () const |
void | clearError () |
QString | connectionName () const |
Friends | |
class | ::TestDatabase |
Additional Inherited Members | |
![]() | |
static QStringList | supportedDrivers () |
static QString | errorInfo (const QSqlError &error) |
Serializes a SQL error into a string. | |
![]() | |
QStringList | queryList (const QString &query_str) |
QStringList | queryList (QSqlQuery &query) |
void | setLastError (const QSqlError &sqlError) |
![]() | |
int | m_version |
QSqlDatabase | m_database |
Definition at line 246 of file credentialsdb_p.h.
|
inline |
Definition at line 250 of file credentialsdb_p.h.
QStringList SignonDaemonNS::MetaDataDB::accessControlList | ( | const quint32 | identityId | ) |
Definition at line 1007 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::queryList().
Referenced by SignonDaemonNS::CredentialsDB::accessControlList().
bool SignonDaemonNS::MetaDataDB::addReference | ( | const quint32 | id, |
const QString & | token, | ||
const QString & | reference | ||
) |
Definition at line 1023 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), SignonDaemonNS::SqlDatabase::rollback(), S, SignonDaemonNS::SqlDatabase::startTransaction(), and TRACE.
Referenced by SignonDaemonNS::CredentialsDB::addReference().
|
virtual |
Implements SignonDaemonNS::SqlDatabase.
Definition at line 991 of file credentialsdb.cpp.
References TRACE, and SignonDaemonNS::SqlDatabase::transactionalExec().
Referenced by SignonDaemonNS::CredentialsDB::clear().
|
virtual |
Implements SignonDaemonNS::SqlDatabase.
Definition at line 376 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::lastError(), and TRACE.
Referenced by updateDB().
QList< SignonIdentityInfo > SignonDaemonNS::MetaDataDB::identities | ( | const QMap< QString, QString > & | filter | ) |
Definition at line 789 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), identity(), and TRACE.
Referenced by SignonDaemonNS::CredentialsDB::credentials().
SignonIdentityInfo SignonDaemonNS::MetaDataDB::identity | ( | const quint32 | id | ) |
Definition at line 716 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::exec(), methods(), SignonDaemonNS::SqlDatabase::queryList(), SignonDaemonNS::RememberPassword, SignonDaemonNS::SignonIdentityInfo::setUserNameSecret(), TRACE, SignonDaemonNS::SqlDatabase::username(), SignonDaemonNS::UserNameIsSecret, and SignonDaemonNS::Validated.
Referenced by SignonDaemonNS::CredentialsDB::checkPassword(), SignonDaemonNS::CredentialsDB::credentials(), and identities().
quint32 SignonDaemonNS::MetaDataDB::insertMethod | ( | const QString & | method, |
bool * | ok = 0 |
||
) |
Definition at line 1163 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), and S.
Referenced by SignonDaemonNS::CredentialsDB::storeData().
quint32 SignonDaemonNS::MetaDataDB::methodId | ( | const QString & | method | ) |
Definition at line 700 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), S, and TRACE.
Referenced by SignonDaemonNS::CredentialsDB::loadData(), SignonDaemonNS::CredentialsDB::removeData(), and SignonDaemonNS::CredentialsDB::storeData().
QStringList SignonDaemonNS::MetaDataDB::methods | ( | const quint32 | id, |
const QString & | securityToken = QString() |
||
) |
Definition at line 677 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::newQuery(), SignonDaemonNS::SqlDatabase::queryList(), and S.
Referenced by identity(), and SignonDaemonNS::CredentialsDB::methods().
QStringList SignonDaemonNS::MetaDataDB::ownerList | ( | const quint32 | identityId | ) |
Definition at line 1015 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::queryList().
Referenced by SignonDaemonNS::CredentialsDB::ownerList().
QStringList SignonDaemonNS::MetaDataDB::references | ( | const quint32 | id, |
const QString & | token = QString() |
||
) |
Definition at line 1120 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::newQuery(), SignonDaemonNS::SqlDatabase::queryList(), and S.
Referenced by SignonDaemonNS::CredentialsDB::references(), and removeReference().
bool SignonDaemonNS::MetaDataDB::removeIdentity | ( | const quint32 | id | ) |
Definition at line 974 of file credentialsdb.cpp.
References TRACE, and SignonDaemonNS::SqlDatabase::transactionalExec().
Referenced by SignonDaemonNS::CredentialsDB::removeCredentials().
bool SignonDaemonNS::MetaDataDB::removeReference | ( | const quint32 | id, |
const QString & | token, | ||
const QString & | reference = QString() |
||
) |
Definition at line 1070 of file credentialsdb.cpp.
References SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), references(), SignonDaemonNS::SqlDatabase::rollback(), S, SignonDaemonNS::SqlDatabase::startTransaction(), and TRACE.
Referenced by SignonDaemonNS::CredentialsDB::removeReference().
|
virtual |
Reimplemented from SignonDaemonNS::SqlDatabase.
Definition at line 626 of file credentialsdb.cpp.
References BLAME, SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::connect(), SignonDaemonNS::SqlDatabase::connectionName(), createTables(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::lastError(), SignonDaemonNS::SqlDatabase::m_database, SignonDaemonNS::SqlDatabase::m_version, SignonDaemonNS::SqlDatabase::rollback(), S, and TRACE.
quint32 SignonDaemonNS::MetaDataDB::updateIdentity | ( | const SignonIdentityInfo & | info | ) |
Definition at line 819 of file credentialsdb.cpp.
References SignonDaemonNS::SignonIdentityInfo::accessControlList(), SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SignonIdentityInfo::id(), SignonDaemonNS::SignonIdentityInfo::isNew(), SignonDaemonNS::SignonIdentityInfo::methods(), SignonDaemonNS::SqlDatabase::newQuery(), SignonDaemonNS::SignonIdentityInfo::ownerList(), SignonDaemonNS::SignonIdentityInfo::realms(), SignonDaemonNS::SqlDatabase::rollback(), S, SignonDaemonNS::SqlDatabase::startTransaction(), and TRACE.
Referenced by SignonDaemonNS::CredentialsDB::updateCredentials().
|
friend |
Definition at line 248 of file credentialsdb_p.h.