19#ifndef HEADER_CURRENT_ONLINE_USER_HPP
20#define HEADER_CURRENT_ONLINE_USER_HPP
22#include "config/player_profile.hpp"
23#include "utils/synchronised.hpp"
52 const irr::core::stringw &info);
55 const std::string &action,
56 const std::string &url_path =
"")
const;
77 const std::string&
getToken()
const {
return m_token; }
80 virtual void requestSignIn(
const irr::core::stringw &username,
81 const irr::core::stringw &password);
Class that represents an online registered user.
Definition: online_player_profile.hpp:42
virtual void signOut(bool success, const XMLNode *input, const irr::core::stringw &info)
Callback once the logout event has been processed.
Definition: online_player_profile.cpp:322
OnlineProfile * getProfile() const
Returns a pointer to the profile associated with the current user.
Definition: online_player_profile.hpp:89
virtual void signIn(bool success, const XMLNode *input)
Checks the server respond after a login attempt.
Definition: online_player_profile.cpp:223
virtual void requestPoll() const
Sends a request to the server to see if any new information is available.
Definition: online_player_profile.cpp:359
PlayerProfile::OnlineState getOnlineState() const
The online state of the player (i.e.
Definition: online_player_profile.hpp:70
virtual void requestSavedSession()
Request a login using the saved credentials of the user.
Definition: online_player_profile.cpp:114
const std::string & getToken() const
Returns the session token of the signed in user.
Definition: online_player_profile.hpp:77
virtual void setUserDetails(std::shared_ptr< HTTPRequest > request, const std::string &action, const std::string &url_path="") const
Adds the login credential to a http request.
Definition: online_player_profile.cpp:74
virtual void requestSignIn(const irr::core::stringw &username, const irr::core::stringw &password)
Create a signin request.
Definition: online_player_profile.cpp:135
virtual uint32_t getOnlineId() const
Definition: online_player_profile.cpp:569
virtual bool isLoggedIn() const
Returns if this user is logged in.
Definition: online_player_profile.hpp:62
virtual void requestSignOut()
Requests a sign out from the server.
Definition: online_player_profile.cpp:280
PlayerProfile::OnlineState m_online_state
The state of the player (logged in, logging in, ...)
Definition: online_player_profile.hpp:48
Class that represents an online profile.
Definition: online_profile.hpp:42
A special class that manages all local player accounts.
Definition: player_manager.hpp:56
Class for managing player profiles (name, usage frequency, etc.).
Definition: player_profile.hpp:54
OnlineState
The online state a player can be in.
Definition: player_profile.hpp:58
utility class used to parse XML files
Definition: xml_node.hpp:48
Declares the general types that are used by the network.