#ifndef PLAYER_H #define PLAYER_H #include #include #include #include #include "connection.h" class Player : public boost::enable_shared_from_this { public: typedef boost::shared_ptr p; static p create(Connection::p c, boost::function f); private: Connection::p connection; boost::function lobby_callback; std::string nick_; Player(Connection::p c, boost::function f); //! Start communicating. void start(); //! Handle login. void handle_login(Message::p msg); public: //! Return player's nick. std::string nick(); }; #endif