core-legacy/models/controller_dbo.h
2019-07-22 22:06:13 +02:00

46 lines
743 B
C++

#ifndef EMGAUWA_CORE_controller_DBO_H
#define EMGAUWA_CORE_controller_DBO_H
#include <string>
#include <sqlite3.h>
#include <json/value.h>
#include <helpers.h>
class controller_dbo
{
public:
char id[33];
char name[128];
char ip[17];
bool active;
int port;
int relay_count;
bool
update();
bool
insert();
bool
remove();
Json::Value
to_json();
static void
free_list(controller_dbo **controllers_list);
static controller_dbo**
get_by_simple(const char *key, const void *value, intptr_t bind_func);
static controller_dbo**
get_by(helpers::sql_filter_builder **filters);
static controller_dbo**
get_all();
};
#endif //EMGAUWA_CORE_controller_DBO_H