index 955180f0872daad53cd3ac4714bd278d2bcd52f0..bdebe7d1f9f0d3ba70222893ee73b810cec55b7a 100644 (file)
#ifndef SDB_FRONTEND_CONNECTION_H
#define SDB_FRONTEND_CONNECTION_H 1
+#include "frontend/proto.h"
#include "utils/strbuf.h"
#include <inttypes.h>
extern "C" {
#endif
-/* status codes returned to a client */
-typedef enum {
- CONNECTION_OK = 0,
- CONNECTION_ERROR
-} sdb_conn_status_t;
-
-/* accepted commands / state of the connection */
-typedef enum {
- /* connection handling */
- CONNECTION_IDLE = 0,
- CONNECTION_PING,
- CONNECTION_STARTUP,
-
- /* querying */
- CONNECTION_LIST,
-} sdb_conn_state_t;
-
typedef struct sdb_conn sdb_conn_t;
/*
int
sdb_connection_ping(sdb_conn_t *conn);
+/*
+ * sdb_fe_parse:
+ * Parse the query text specified in 'query'.
+ */
+int
+sdb_fe_parse(const char *query);
+
/*
* session handling
*/