Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
cavoke::server::controllers::StateController Class Reference
Inheritance diagram for cavoke::server::controllers::StateController:
[legend]

Public Member Functions

 StateController (std::shared_ptr< model::GamesStorage > mGamesStorage, std::shared_ptr< model::GameLogicManager > mGameLogicManager, std::shared_ptr< model::GameStateStorage > mGameStateStorage, std::shared_ptr< model::SessionsStorage > mParticipationStorage)
 
METHOD_LIST_BEGIN ADD_METHOD_TO (StateController::send_move, "/play/{session_id}/send_move", drogon::Post, "AuthFilter")
 
 ADD_METHOD_TO (StateController::get_state, "/play/{session_id}/get_state", drogon::Get, "AuthFilter")
 

Protected Member Functions

void send_move (const drogon::HttpRequestPtr &req, std::function< void(const drogon::HttpResponsePtr &)> &&callback, const std::string &session_id)
 
void get_state (const drogon::HttpRequestPtr &req, std::function< void(const drogon::HttpResponsePtr &)> &&callback, const std::string &session_id)
 

Detailed Description

Definition at line 12 of file state_controller.h.

Constructor & Destructor Documentation

◆ StateController()

cavoke::server::controllers::StateController::StateController ( std::shared_ptr< model::GamesStorage mGamesStorage,
std::shared_ptr< model::GameLogicManager mGameLogicManager,
std::shared_ptr< model::GameStateStorage mGameStateStorage,
std::shared_ptr< model::SessionsStorage mParticipationStorage 
)

Definition at line 155 of file state_controller.cpp.

Member Function Documentation

◆ get_state()

void cavoke::server::controllers::StateController::get_state ( const drogon::HttpRequestPtr &  req,
std::function< void(const drogon::HttpResponsePtr &)> &&  callback,
const std::string &  session_id 
)
protected

Definition at line 92 of file state_controller.cpp.

◆ send_move()

void cavoke::server::controllers::StateController::send_move ( const drogon::HttpRequestPtr &  req,
std::function< void(const drogon::HttpResponsePtr &)> &&  callback,
const std::string &  session_id 
)
protected

Definition at line 8 of file state_controller.cpp.


The documentation for this class was generated from the following files: