source: network-game/server/DataAccess.h@ 05051c7

Last change on this file since 05051c7 was b128109, checked in by dportnoy <dmp1488@…>, 12 years ago

Added MSG_TYPE_PLAYER_MOVE, which allows players to tell the server where they want to move

  • Property mode set to 100644
File size: 681 bytes
RevLine 
[36082e8]1#ifndef _DATA_ACCES_H
2#define _DATA_ACCESS_H
3
[59061f6]4#include <string>
[b128109]5#include <list>
[59061f6]6
7#include <mysql/mysql.h>
8
[edfd1d0]9#include "../common/Player.h"
[59061f6]10
11using namespace std;
12
[36082e8]13class DataAccess {
14public:
15 DataAccess();
16 ~DataAccess();
17
[59061f6]18 int insertPlayer(string username, string password);
[b128109]19 int updatePlayer(string username, string password);
[59061f6]20
[b128109]21 Player* getPlayer(string username);
22 list<Player*>* getPlayers();
23 bool verifyPassword(string encrypted, string password);
[59061f6]24
25 int insert(string table, string rows, string values);
[b128109]26 int update(string table, string values, string where);
[59061f6]27 MYSQL_RES *select(string table, string filter);
28
29private:
30 MYSQL *connection, mysql;
[36082e8]31};
32
33#endif
Note: See TracBrowser for help on using the repository browser.