#include <LeakDatabase.hpp>
Public Member Functions | |
| LeakDatabase () | |
| void | ensureIdentity (const std::string &emailHash) |
| bool | isNewLeak (const std::string &emailHash, const LeakRecord &record) |
| void | storeLeak (const std::string &emailHash, const LeakRecord &record) |
Private Member Functions | |
| void | open () |
| void | initSchema () |
Private Attributes | |
| std::string | dbPath |
| void * | db |
| std::mutex | dbMutex |
Definition at line 27 of file LeakDatabase.hpp.
| LeakDatabase::LeakDatabase | ( | ) |
Definition at line 46 of file LeakDatabase.cpp.
References db, dbPath, initSchema(), and open().
| void LeakDatabase::ensureIdentity | ( | const std::string & | emailHash | ) |
Definition at line 100 of file LeakDatabase.cpp.
Referenced by LeakCheckWorker::run().
|
private |
Definition at line 81 of file LeakDatabase.cpp.
References db, dbMutex, and SCHEMA_SQL.
Referenced by LeakDatabase().
| bool LeakDatabase::isNewLeak | ( | const std::string & | emailHash, |
| const LeakRecord & | record ) |
Definition at line 126 of file LeakDatabase.cpp.
References LeakRecord::breachDate, LeakRecord::breachName, db, and dbMutex.
|
private |
Definition at line 66 of file LeakDatabase.cpp.
References _, db, dbMutex, and dbPath.
Referenced by LeakDatabase().
| void LeakDatabase::storeLeak | ( | const std::string & | emailHash, |
| const LeakRecord & | record ) |
Definition at line 161 of file LeakDatabase.cpp.
References LeakRecord::breachDate, LeakRecord::breachName, db, dbMutex, LeakRecord::description, LeakRecord::provider, and LeakRecord::severity.
|
private |
Definition at line 44 of file LeakDatabase.hpp.
Referenced by ensureIdentity(), initSchema(), isNewLeak(), LeakDatabase(), open(), and storeLeak().
|
private |
Definition at line 45 of file LeakDatabase.hpp.
Referenced by ensureIdentity(), initSchema(), isNewLeak(), open(), and storeLeak().
|
private |
Definition at line 43 of file LeakDatabase.hpp.
Referenced by LeakDatabase(), and open().