Files
MuditaOS/module-db/Interface/BaseInterface.hpp
RobertPiet 54bb1d4a7f [EGD-4343] use new settings in ServiceAudio (#997)
* [EGD-4343] ServiceAudio moved to new settings
2020-12-04 14:10:44 +01:00

61 lines
1.4 KiB
C++

// Copyright (c) 2017-2020, 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
{
SMS,
SMSThread,
SMSTemplate,
Contact,
Alarms,
Notes,
Calllog,
CountryCodes,
Notifications,
Events,
};
};
}; // namespace db
constexpr const char *c_str(enum db::Interface::Name db)
{
switch (db) {
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::Alarms:
return "Alarms";
case db::Interface::Name::Notes:
return "Notes";
case db::Interface::Name::Calllog:
return "Callog";
case db::Interface::Name::CountryCodes:
return "CountryCodes";
case db::Interface::Name::Notifications:
return "Notifications";
case db::Interface::Name::Events:
return "Events";
};
return "";
}