libQuotient
A Qt library for building matrix clients
|
#include <database.h>
Public Member Functions | |
Database (const QString &userId, const QString &deviceId, PicklingKey &&picklingKey) | |
int | version () |
void | transaction () |
void | commit () |
QSqlQuery | execute (const QString &queryString) |
void | execute (QSqlQuery &query) |
QSqlDatabase | database () const |
QSqlQuery | prepareQuery (const QString &queryString) const |
void | storeOlmAccount (const QOlmAccount &olmAccount) |
std::optional< OlmErrorCode > | setupOlmAccount (QOlmAccount &olmAccount) |
void | clear () |
void | saveOlmSession (const QByteArray &senderKey, const QOlmSession &session, const QDateTime ×tamp) |
std::unordered_map< QByteArray, std::vector< QOlmSession > > | loadOlmSessions () |
std::unordered_map< QByteArray, QOlmInboundGroupSession > | loadMegolmSessions (const QString &roomId) |
void | saveMegolmSession (const QString &roomId, const QOlmInboundGroupSession &session, const QByteArray &senderKey, const QByteArray &senderClaimedEdKey) |
void | addGroupSessionIndexRecord (const QString &roomId, const QString &sessionId, uint32_t index, const QString &eventId, qint64 ts) |
std::pair< QString, qint64 > | groupSessionIndexRecord (const QString &roomId, const QString &sessionId, qint64 index) |
void | clearRoomData (const QString &roomId) |
void | setOlmSessionLastReceived (const QByteArray &sessionId, const QDateTime ×tamp) |
std::optional< QOlmOutboundGroupSession > | loadCurrentOutboundMegolmSession (const QString &roomId) |
void | saveCurrentOutboundMegolmSession (const QString &roomId, const QOlmOutboundGroupSession &session) |
void | updateOlmSession (const QByteArray &senderKey, const QOlmSession &session) |
QMultiHash< QString, QString > | devicesWithoutKey (const QString &roomId, QMultiHash< QString, QString > devices, const QByteArray &sessionId) |
void | setDevicesReceivedKey (const QString &roomId, const QVector< std::tuple< QString, QString, QString >> &devices, const QByteArray &sessionId, uint32_t index) |
bool | isSessionVerified (const QString &edKey) |
void | setSessionVerified (const QString &edKeyId) |
void | setMasterKeyVerified (const QString &masterKey) |
QString | edKeyForKeyId (const QString &userId, const QString &edKeyId) |
void | storeEncrypted (const QString &name, const QByteArray &key) |
QByteArray | loadEncrypted (const QString &name) |
QString | userSigningPublicKey () |
QString | selfSigningPublicKey () |
QString | edKeyForMegolmSession (const QString &sessionId) |
QString | senderKeyForMegolmSession (const QString &sessionId) |
Definition at line 21 of file database.h.
Quotient::Database::Database | ( | const QString & | userId, |
const QString & | deviceId, | ||
PicklingKey && | picklingKey | ||
) |
void Quotient::Database::addGroupSessionIndexRecord | ( | const QString & | roomId, |
const QString & | sessionId, | ||
uint32_t | index, | ||
const QString & | eventId, | ||
qint64 | ts | ||
) |
void Quotient::Database::clear | ( | ) |
void Quotient::Database::clearRoomData | ( | const QString & | roomId | ) |
void Quotient::Database::commit | ( | ) |
QSqlDatabase Quotient::Database::database | ( | ) | const |
QMultiHash<QString, QString> Quotient::Database::devicesWithoutKey | ( | const QString & | roomId, |
QMultiHash< QString, QString > | devices, | ||
const QByteArray & | sessionId | ||
) |
QString Quotient::Database::edKeyForKeyId | ( | const QString & | userId, |
const QString & | edKeyId | ||
) |
QString Quotient::Database::edKeyForMegolmSession | ( | const QString & | sessionId | ) |
QSqlQuery Quotient::Database::execute | ( | const QString & | queryString | ) |
void Quotient::Database::execute | ( | QSqlQuery & | query | ) |
std::pair<QString, qint64> Quotient::Database::groupSessionIndexRecord | ( | const QString & | roomId, |
const QString & | sessionId, | ||
qint64 | index | ||
) |
bool Quotient::Database::isSessionVerified | ( | const QString & | edKey | ) |
std::optional<QOlmOutboundGroupSession> Quotient::Database::loadCurrentOutboundMegolmSession | ( | const QString & | roomId | ) |
QByteArray Quotient::Database::loadEncrypted | ( | const QString & | name | ) |
std::unordered_map<QByteArray, QOlmInboundGroupSession> Quotient::Database::loadMegolmSessions | ( | const QString & | roomId | ) |
std::unordered_map<QByteArray, std::vector<QOlmSession> > Quotient::Database::loadOlmSessions | ( | ) |
QSqlQuery Quotient::Database::prepareQuery | ( | const QString & | queryString | ) | const |
void Quotient::Database::saveCurrentOutboundMegolmSession | ( | const QString & | roomId, |
const QOlmOutboundGroupSession & | session | ||
) |
void Quotient::Database::saveMegolmSession | ( | const QString & | roomId, |
const QOlmInboundGroupSession & | session, | ||
const QByteArray & | senderKey, | ||
const QByteArray & | senderClaimedEdKey | ||
) |
void Quotient::Database::saveOlmSession | ( | const QByteArray & | senderKey, |
const QOlmSession & | session, | ||
const QDateTime & | timestamp | ||
) |
QString Quotient::Database::selfSigningPublicKey | ( | ) |
QString Quotient::Database::senderKeyForMegolmSession | ( | const QString & | sessionId | ) |
void Quotient::Database::setDevicesReceivedKey | ( | const QString & | roomId, |
const QVector< std::tuple< QString, QString, QString >> & | devices, | ||
const QByteArray & | sessionId, | ||
uint32_t | index | ||
) |
void Quotient::Database::setMasterKeyVerified | ( | const QString & | masterKey | ) |
void Quotient::Database::setOlmSessionLastReceived | ( | const QByteArray & | sessionId, |
const QDateTime & | timestamp | ||
) |
void Quotient::Database::setSessionVerified | ( | const QString & | edKeyId | ) |
std::optional<OlmErrorCode> Quotient::Database::setupOlmAccount | ( | QOlmAccount & | olmAccount | ) |
void Quotient::Database::storeEncrypted | ( | const QString & | name, |
const QByteArray & | key | ||
) |
void Quotient::Database::storeOlmAccount | ( | const QOlmAccount & | olmAccount | ) |
void Quotient::Database::transaction | ( | ) |
void Quotient::Database::updateOlmSession | ( | const QByteArray & | senderKey, |
const QOlmSession & | session | ||
) |
QString Quotient::Database::userSigningPublicKey | ( | ) |
int Quotient::Database::version | ( | ) |