-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql.h
29 lines (23 loc) · 797 Bytes
/
sql.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#if !defined(SQL_H)
#define SQL_H
#include <inttypes.h>
typedef enum {
SQL_THREAD_NOT_CONNECTED = 0, // No attempt to connect has been made
SQL_THREAD_CONNECTING,
SQL_THREAD_CONNECTED,
SQL_THREAD_DISCONNECTED, // We were previously connected to the SQL server, but we've been disconnected
SQL_THREAD_QUERY_EXECUTING,
SQL_THREAD_ERROR
} sql_thread_status_type;
typedef struct _sql_thread_params_type {
char *mysql_host;
char *mysql_username;
char *mysql_password;
int mysql_port;
char *mysql_db_name;
char *card_name;
uint64_t card_id;
} sql_thread_params_type;
extern volatile sql_thread_status_type sql_thread_status;
void *sql_thread_main(void *arg);
#endif // !defined(SQL_H)