#ifndef EMGAUWA_CORE_HELPERS_H #define EMGAUWA_CORE_HELPERS_H #include #include #include #include namespace helpers { int bind_tcp_server(const char *addr, const char *port, int max_client_backlog); int get_server_port(int fd); int send_udp_broadcast(const char *addr, uint16_t port, const char* message); period_list* parse_periods(Json::Value periods_json); typedef struct sql_filter_builder { sql_filter_builder(const char *col_name, const void *value, intptr_t bind_func, const char *logic); const char *col_name; const void *value; intptr_t bind_func; const char *logic; } sql_filter_builder; sqlite3_stmt* create_sql_filtered_query(const char *sql, sql_filter_builder **filters); } #endif //EMGAUWA_CORE_HELPERS_H