signon 8.54

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends | List of all members
SignonDaemonNS::MetaDataDB Class Reference

`#include <credentialsdb_p.h>`

Inheritance diagram for SignonDaemonNS::MetaDataDB:
[legend]
Collaboration diagram for SignonDaemonNS::MetaDataDB:
[legend]

## 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())
Public Member Functions inherited from SignonDaemonNS::SqlDatabase
| SqlDatabase (const QString &hostname, const QString &connectionName, int version)
| Constructs a SqlDatabase object using the given hostname. More...
virtual | ~SqlDatabase ()
| Destroys the SqlDatabase object, closing the database connection. More...
bool | init ()
| Connects to the DB and if necessary creates the tables. More...
bool | connect ()
| Creates the database connection. More...
void | disconnect ()
| Destroys the database connection. More...
bool | startTransaction ()
bool | commit ()
void | rollback ()
bool | connected ()
void | setDatabaseName (const QString &databaseName)
| Sets the database name. More...
void | setUsername (const QString &username)
| Sets the username for the database connection. More...
void | setPassword (const QString &password)
| Sets the password for the database connection. More...
QString | databaseName () const
QString | username () const
QString | password () const
QSqlQuery | newQuery () const
QSqlQuery | exec (const QString &query)
| Executes a specific database query. More...
QSqlQuery | exec (QSqlQuery &query)
| Executes a specific database query. More...
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). More...
bool | hasTables () const
SignOn::CredentialsDBError | lastError () const
bool | errorOccurred () const
void | clearError ()
QString | connectionName () const

## Friends
class | ::TestDatabase

## Additional Inherited Members
Static Public Member Functions inherited from SignonDaemonNS::SqlDatabase
static QStringList | supportedDrivers ()
static QString | errorInfo (const QSqlError &error)
| Serializes a SQL error into a string. More...
Protected Member Functions inherited from SignonDaemonNS::SqlDatabase
QStringList | queryList (const QString &query_str)
QStringList | queryList (QSqlQuery &query)
void | setLastError (const QSqlError &sqlError)
Protected Attributes inherited from SignonDaemonNS::SqlDatabase
int | m_version
QSqlDatabase | m_database

## Detailed Description

Definition at line 246 of file credentialsdb_p.h.

## Constructor & Destructor Documentation

SignonDaemonNS::MetaDataDB::MetaDataDB | ( | const QString & | name | ) |
| inline

Definition at line 250 of file credentialsdb_p.h.

## Member Function Documentation

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

bool SignonDaemonNS::MetaDataDB::clear | ( |  | ) |
| virtual

Implements SignonDaemonNS::SqlDatabase.

Definition at line 991 of file credentialsdb.cpp.

References TRACE, and SignonDaemonNS::SqlDatabase::transactionalExec().

Referenced by SignonDaemonNS::CredentialsDB::clear().

bool SignonDaemonNS::MetaDataDB::createTables | ( |  | ) |
| 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().

bool SignonDaemonNS::MetaDataDB::updateDB | ( | int | version | ) |
| 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, TRACE, and SignonDaemonNS::SqlDatabase::updateDB().

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

## Friends And Related Function Documentation

friend class ::TestDatabase
| friend

Definition at line 248 of file credentialsdb_p.h.

The documentation for this class was generated from the following files:

- src/signond/credentialsdb_p.h
- src/signond/credentialsdb.cpp