4 #if defined(_WIN32) || defined(__WIN32__)
9 #include <mysql/mysql.h>
11 #include "../ui/qt/ScoreRecord.h"
13 #define CONN_CONFIG_FILE "conn_config"
16 # define byte unsigned char
22 const char * server_name
;
23 const char * user_name
;
25 const char * db_passwd
;
28 char ** table_data
; // name col1 col2 col3 ...
35 struct conn_data
* c_data
;
43 int insertScore(const char * name
,int score
,byte difficulty
);
44 /** Loads top 10 results (of given level) from database.
45 * @param difficulty Game level for which to load data.
46 * @param recList List to store results.
47 * @return True on success, false if loading fails. */
48 bool getTop10(byte difficulty
, std::list
<ScoreRecord
> &recList
);
49 void writeConfig(void);
50 void loadConfig(void);