Last change
on this file since ace001a was aee0634, checked in by Dmitry Portnoy <dmp1488@…>, 10 years ago |
Remove DataAccess::getPlayers() since it isn't used
|
-
Property mode
set to
100644
|
File size:
850 bytes
|
Line | |
---|
1 | #ifndef _DATA_ACCESS_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 | Player* getPlayer(string username);
|
---|
19 | bool verifyPassword(string encrypted, string password);
|
---|
20 | int insertPlayer(string username, string password, Player::PlayerClass playerClass);
|
---|
21 | int updatePlayer(Player* player);
|
---|
22 |
|
---|
23 | int* getPlayerRecord(int playerId);
|
---|
24 | int** getPlayerGameHistory(int playerId, unsigned int& numGames);
|
---|
25 | int saveGameHistory(int playerId, int team, int blueScore, int redScore);
|
---|
26 |
|
---|
27 | int insert(string table, string rows, string values);
|
---|
28 | int update(string table, string values, string where);
|
---|
29 | MYSQL_RES *select(string table, string filter);
|
---|
30 |
|
---|
31 | private:
|
---|
32 | MYSQL *connection, mysql;
|
---|
33 | };
|
---|
34 |
|
---|
35 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.