source: network-game/server/DataAccess.h@ 5806dc2

Last change on this file since 5806dc2 was edfd1d0, checked in by dportnoy <dmp1488@…>, 12 years ago

Moved the Player class to the common directory, added a position to Player, added a new message type for sending player info, and made the server broadcast player positions everytime it receives and replies to a message

  • Property mode set to 100644
File size: 484 bytes
Line 
1#ifndef _DATA_ACCES_H
2#define _DATA_ACCESS_H
3
4#include <string>
5
6#include <mysql/mysql.h>
7
8#include "../common/Player.h"
9
10using namespace std;
11
12class DataAccess {
13public:
14 DataAccess();
15 ~DataAccess();
16
17 int insertPlayer(string username, string password);
18
19 Player *getPlayer(string username);
20 int printPlayers();
21
22 int insert(string table, string rows, string values);
23 MYSQL_RES *select(string table, string filter);
24
25private:
26 MYSQL *connection, mysql;
27};
28
29#endif
Note: See TracBrowser for help on using the repository browser.