This class represents the information a client has about another player. More...
#include <lobby_data.hpp>
Public Types | |
| enum class | user_relation { ME , FRIEND , NEUTRAL , IGNORED } |
| enum class | user_state { LOBBY , GAME , SEL_GAME } |
Public Member Functions | |
| user_info (const config &c) | |
| bool | operator< (const user_info &b) const |
| user_state | get_state (int selected_game_id) const |
| user_relation | get_relation () const |
Public Attributes | |
| std::string | name |
| int | forum_id |
| int | game_id |
| bool | registered |
| bool | observing |
| bool | moderator |
This class represents the information a client has about another player.
Definition at line 28 of file lobby_data.hpp.
|
strong |
| Enumerator | |
|---|---|
| ME | |
| FRIEND | |
| NEUTRAL | |
| IGNORED | |
Definition at line 32 of file lobby_data.hpp.
|
strong |
| Enumerator | |
|---|---|
| LOBBY | |
| GAME | |
| SEL_GAME | |
Definition at line 39 of file lobby_data.hpp.
|
explicit |
Definition at line 51 of file lobby_data.cpp.
| user_info::user_relation mp::user_info::get_relation | ( | ) | const |
Definition at line 72 of file lobby_data.cpp.
References FRIEND, prefs::get(), IGNORED, ME, name, and NEUTRAL.
Referenced by operator<(), gui2::dialogs::lobby_player_info::pre_show(), mp::lobby_info::process_userlist(), and gui2::dialogs::lobby_player_info::update_relation().
| user_info::user_state mp::user_info::get_state | ( | int | selected_game_id | ) | const |
| bool mp::user_info::operator< | ( | const user_info & | b | ) | const |
Definition at line 85 of file lobby_data.cpp.
References b, get_relation(), translation::icompare(), and name.
| int mp::user_info::forum_id |
Definition at line 51 of file lobby_data.hpp.
| int mp::user_info::game_id |
Definition at line 52 of file lobby_data.hpp.
Referenced by get_state(), gui2::dialogs::lobby_player_info::pre_show(), and mp::lobby_info::process_userlist().
| bool mp::user_info::moderator |
Definition at line 55 of file lobby_data.hpp.
| std::string mp::user_info::name |
Definition at line 50 of file lobby_data.hpp.
Referenced by gui2::dialogs::lobby_player_info::add_to_friends_button_callback(), gui2::dialogs::lobby_player_info::add_to_ignores_button_callback(), gui2::dialogs::lobby_player_info::check_status_button_callback(), gui2::dialogs::lobby_player_info::do_kick_ban(), gui2::dialogs::lobby_player_info::do_stopgame(), get_relation(), operator<(), gui2::dialogs::lobby_player_info::pre_show(), mp::lobby_info::process_userlist(), and gui2::dialogs::lobby_player_info::remove_from_list_button_callback().
| bool mp::user_info::observing |
Definition at line 54 of file lobby_data.hpp.
Referenced by gui2::dialogs::lobby_player_info::pre_show().
| bool mp::user_info::registered |
Definition at line 53 of file lobby_data.hpp.