MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / createDatabase

Method createDatabase

src/database/DatabaseThreadWorker.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 bool DatabaseThreadWorker::createDatabase(QString const& filename, openmittsu::protocol::ContactId const& selfContact, openmittsu::crypto::KeyPair const& selfLongTermKeyPair, QString const& password, QDir const& mediaStorageLocation) {
46 std::shared_ptr<openmittsu::database::Database> newDatabase = std::make_shared<openmittsu::database::SimpleDatabase>(filename, selfContact, selfLongTermKeyPair, password, mediaStorageLocation);
47 if (newDatabase) {
48 m_database = newDatabase;
49 return true;
50 } else {
51 LOGGER()->warn("Failed to create database!");
52 return false;
53 }
54 }
55
56 bool DatabaseThreadWorker::hasDatabase() const {
57 return m_database != nullptr;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected