#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, void *message, size_t length); 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, int bind_func_param, const char *logic); const char *col_name; const void *value; intptr_t bind_func; int bind_func_param; const char *logic; } sql_filter_builder; sqlite3_stmt* create_sql_filtered_query(const char *sql, sql_filter_builder **filters); int open_tcp_connection(char* host, char* port); int migrate_sql(); } #endif //EMGAUWA_CORE_HELPERS_H