Changeset 53643ca in network-game for server/DataAccess.h


Ignore:
Timestamp:
Jul 19, 2014, 12:32:33 AM (10 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
master
Children:
4c00935
Parents:
cdb0e98
Message:

Server loads user profile and game history info from the database, saves game history to the db after every game, and uses a lua settings file to load db settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/DataAccess.h

    rcdb0e98 r53643ca  
    1 #ifndef _DATA_ACCES_H
     1#ifndef _DATA_ACCESS_H
    22#define _DATA_ACCESS_H
    33
     
    1616   ~DataAccess();
    1717
    18    int insertPlayer(string username, string password, Player::PlayerClass playerClass);
    19    int updatePlayer(string username, string password);
    20 
    2118   Player* getPlayer(string username);
    2219   list<Player*>* getPlayers();
    2320   bool verifyPassword(string encrypted, string password);
     21   int insertPlayer(string username, string password, Player::PlayerClass playerClass);
     22   // this method needs to be more rebust. maybe pass in a player object amd
     23   // the method could use the player id to find the player and update any
     24   // attributes that changed
     25   int updatePlayer(string username, string password);
     26
     27   int* getPlayerRecord(int playerId);
     28   int** getPlayerGameHistory(int playerId, unsigned int& numGames);
     29   int saveGameHistory(int playerId, int team, int blueScore, int redScore);
    2430
    2531   int insert(string table, string rows, string values);
Note: See TracChangeset for help on using the changeset viewer.