Files
MuditaOS/module-db/Interface/BaseInterface.hpp
Mateusz Piesta 0a9846e4a8 [MOS-694] Move DB initialization from OS to build scripts
* Switched to DB initialization at compile time
* Organized and cleaned up db files directories(not finished completely)
* Fixed DB related unit tests
* Minor improvements to CMake
* Small fixes for GCC12 build
2023-01-19 16:41:56 +01:00

61 lines
1.4 KiB
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <memory>
namespace db
{
class Query;
class QueryResult;
class Interface
{
public:
virtual std::unique_ptr<db::QueryResult> runQuery(std::shared_ptr<db::Query> query);
enum class Name
{
AlarmEvents,
SMS,
SMSThread,
SMSTemplate,
Contact,
Notes,
Calllog,
Notifications,
Quotes,
MultimediaFiles
};
};
}; // namespace db
constexpr const char *c_str(enum db::Interface::Name db)
{
switch (db) {
case db::Interface::Name::AlarmEvents:
return "AlarmEvents";
case db::Interface::Name::SMS:
return "SMS";
case db::Interface::Name::SMSThread:
return "SMSThread";
case db::Interface::Name::SMSTemplate:
return "SMSTemplate";
case db::Interface::Name::Contact:
return "Contact";
case db::Interface::Name::Notes:
return "Notes";
case db::Interface::Name::Calllog:
return "Callog";
case db::Interface::Name::Notifications:
return "Notifications";
case db::Interface::Name::Quotes:
return "Quotes";
case db::Interface::Name::MultimediaFiles:
return "MultimediaFiles";
};
return "";
}