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::SecretsDB Class Reference

`#include <default-secrets-storage.h>`

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

## Public Member Functions
| SecretsDB (const QString &name)
bool | createTables ()
bool | clear ()
bool | updateCredentials (const quint32 id, const QString &username, const QString &password)
bool | removeCredentials (const quint32 id)
bool | loadCredentials (const quint32 id, QString &username, QString &password)
QVariantMap | loadData (quint32 id, quint32 method)
bool | storeData (quint32 id, quint32 method, const QVariantMap &data)
bool | removeData (quint32 id, quint32 method)
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...
virtual bool | updateDB (int version)
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 41 of file default-secrets-storage.h.

## Constructor & Destructor Documentation

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

Definition at line 45 of file default-secrets-storage.h.

## Member Function Documentation

bool SecretsDB::clear | ( |  | ) |
| virtual

Implements SignonDaemonNS::SqlDatabase.

Definition at line 77 of file default-secrets-storage.cpp.

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

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

bool SecretsDB::createTables | ( |  | ) |
| virtual

Implements SignonDaemonNS::SqlDatabase.

Definition at line 39 of file default-secrets-storage.cpp.

References SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::lastError(), and TRACE.

bool SecretsDB::loadCredentials | ( | const quint32 | id,
|  | QString & | username,
|  | QString & | password
| ) |  |

Definition at line 130 of file default-secrets-storage.cpp.

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

Referenced by SignonDaemonNS::DefaultSecretsStorage::loadCredentials().

QVariantMap SecretsDB::loadData | ( | quint32 | id,
|  | quint32 | method
| ) |  |

Definition at line 150 of file default-secrets-storage.cpp.

References SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), S, and TRACE.

Referenced by SignonDaemonNS::DefaultSecretsStorage::loadData().

bool SecretsDB::removeCredentials | ( | const quint32 | id | ) |

Definition at line 117 of file default-secrets-storage.cpp.

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

Referenced by SignonDaemonNS::DefaultSecretsStorage::removeCredentials().

bool SecretsDB::removeData | ( | quint32 | id,
|  | quint32 | method
| ) |  |

Definition at line 245 of file default-secrets-storage.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::DefaultSecretsStorage::removeData().

bool SecretsDB::storeData | ( | quint32 | id,
|  | quint32 | method,
|  | const QVariantMap & | data
| ) |  |

Definition at line 175 of file default-secrets-storage.cpp.

References BLAME, SignonDaemonNS::SqlDatabase::commit(), SignonDaemonNS::SqlDatabase::errorOccurred(), SignonDaemonNS::SqlDatabase::exec(), SignonDaemonNS::SqlDatabase::newQuery(), SignonDaemonNS::SqlDatabase::rollback(), S, SSO_MAX_TOKEN_STORAGE, SignonDaemonNS::SqlDatabase::startTransaction(), and TRACE.

Referenced by SignonDaemonNS::DefaultSecretsStorage::storeData().

bool SecretsDB::updateCredentials | ( | const quint32 | id,
|  | const QString & | username,
|  | const QString & | password
| ) |  |

Definition at line 88 of file default-secrets-storage.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::DefaultSecretsStorage::updateCredentials().

## Friends And Related Function Documentation

friend class ::TestDatabase
| friend

Definition at line 43 of file default-secrets-storage.h.

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

- src/signond/default-secrets-storage.h
- src/signond/default-secrets-storage.cpp