Last change
on this file since 109e8a3 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
|
Line | |
---|
1 | #ifndef _DATA_ACCES_H
|
---|
2 | #define _DATA_ACCESS_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | #include <list>
|
---|
6 |
|
---|
7 | #include <mysql/mysql.h>
|
---|
8 |
|
---|
9 | #include "../common/Player.h"
|
---|
10 |
|
---|
11 | using namespace std;
|
---|
12 |
|
---|
13 | class DataAccess {
|
---|
14 | public:
|
---|
15 | DataAccess();
|
---|
16 | ~DataAccess();
|
---|
17 |
|
---|
18 | int insertPlayer(string username, string password);
|
---|
19 | int updatePlayer(string username, string password);
|
---|
20 |
|
---|
21 | Player* getPlayer(string username);
|
---|
22 | list<Player*>* getPlayers();
|
---|
23 | bool verifyPassword(string encrypted, string password);
|
---|
24 |
|
---|
25 | int insert(string table, string rows, string values);
|
---|
26 | int update(string table, string values, string where);
|
---|
27 | MYSQL_RES *select(string table, string filter);
|
---|
28 |
|
---|
29 | private:
|
---|
30 | MYSQL *connection, mysql;
|
---|
31 | };
|
---|
32 |
|
---|
33 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.