source: network-game/server/DataAccess.h@ 88cdae2

Last change on this file since 88cdae2 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
RevLine 
[36082e8]1#ifndef _DATA_ACCES_H
2#define _DATA_ACCESS_H
3
[59061f6]4#include <string>
5
6#include <mysql/mysql.h>
7
[edfd1d0]8#include "../common/Player.h"
[59061f6]9
10using namespace std;
11
[36082e8]12class DataAccess {
13public:
14 DataAccess();
15 ~DataAccess();
16
[59061f6]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;
[36082e8]27};
28
29#endif
Note: See TracBrowser for help on using the repository browser.