![]() |
DDraceNetwork Documentation
|
#include <serverbrowser.h>
Public Member Functions | |
| CServerBrowser () | |
| ~CServerBrowser () override | |
| void | Refresh (int Type, bool Force=false) override |
| bool | IsRefreshing () const override |
| bool | IsGettingServerlist () const override |
| bool | IsServerlistError () const override |
| int | LoadingProgression () const override |
| void | RequestResort () |
| int | NumServers () const override |
| int | Players (const CServerInfo &Item) const override |
| int | Max (const CServerInfo &Item) const override |
| int | NumSortedServers () const override |
| int | NumSortedPlayers () const override |
| const CServerInfo * | SortedGet (int Index) const override |
| const json_value * | LoadDDNetInfo () |
| void | LoadDDNetInfoJson () |
| void | LoadDDNetLocation () |
| void | LoadDDNetServers () |
| void | UpdateServerFilteredPlayers (CServerInfo *pInfo) const |
| void | UpdateServerFriends (CServerInfo *pInfo) const |
| void | UpdateServerCommunity (CServerInfo *pInfo) const |
| void | UpdateServerRank (CServerInfo *pInfo) const |
| void | ValidateServerlistType () |
| const char * | GetTutorialServer () override |
| const std::vector< CCommunity > & | Communities () const override |
| const CCommunity * | Community (const char *pCommunityId) const override |
| std::vector< const CCommunity * > | SelectedCommunities () const override |
| std::vector< const CCommunity * > | FavoriteCommunities () const override |
| std::vector< const CCommunity * > | CurrentCommunities () const override |
| unsigned | CurrentCommunitiesHash () const override |
| bool | DDNetInfoAvailable () const override |
| std::optional< SHA256_DIGEST > | DDNetInfoSha256 () const override |
| ICommunityCache & | CommunityCache () override |
| const ICommunityCache & | CommunityCache () const override |
| CFavoriteCommunityFilterList & | FavoriteCommunitiesFilter () override |
| CExcludedCommunityFilterList & | CommunitiesFilter () override |
| CExcludedCommunityCountryFilterList & | CountriesFilter () override |
| CExcludedCommunityTypeFilterList & | TypesFilter () override |
| const CFavoriteCommunityFilterList & | FavoriteCommunitiesFilter () const override |
| const CExcludedCommunityFilterList & | CommunitiesFilter () const override |
| const CExcludedCommunityCountryFilterList & | CountriesFilter () const override |
| const CExcludedCommunityTypeFilterList & | TypesFilter () const override |
| void | CleanFilters () override |
| void | Update () |
| void | OnServerInfoUpdate (const NETADDR &Addr, int Token, const CServerInfo *pInfo) |
| void | SetHttpInfo (const CServerInfo *pInfo) |
| void | RequestCurrentServer (const NETADDR &Addr) const |
| void | RequestCurrentServerWithRandomToken (const NETADDR &Addr, int *pBasicToken, int *pToken) const |
| void | SetCurrentServerPing (const NETADDR &Addr, int Ping) |
| void | SetBaseInfo (class CNetClient *pClient, const char *pNetVersion) |
| void | OnInit () |
| void | QueueRequest (CServerEntry *pEntry) |
| CServerEntry * | Find (const NETADDR &Addr) override |
| int | GetCurrentType () override |
| bool | IsRegistered (const NETADDR &Addr) |
| Public Member Functions inherited from IInterface | |
| IInterface () | |
| virtual void | Shutdown () |
| virtual | ~IInterface ()=default |
Private Member Functions | |
| int | GenerateToken (const NETADDR &Addr) const |
| bool | SortCompareName (int Index1, int Index2) const |
| bool | SortCompareMap (int Index1, int Index2) const |
| bool | SortComparePing (int Index1, int Index2) const |
| bool | SortCompareGametype (int Index1, int Index2) const |
| bool | SortCompareNumPlayers (int Index1, int Index2) const |
| bool | SortCompareNumClients (int Index1, int Index2) const |
| bool | SortCompareNumFriends (int Index1, int Index2) const |
| bool | SortCompareNumPlayersAndPing (int Index1, int Index2) const |
| void | Filter () |
| void | Sort () |
| int | SortHash () const |
| void | CleanUp () |
| void | UpdateFromHttp () |
| CServerEntry * | Add (const NETADDR *pAddrs, int NumAddrs) |
| CServerEntry * | ReplaceEntry (CServerEntry *pEntry, const NETADDR *pAddrs, int NumAddrs) |
| void | RemoveRequest (CServerEntry *pEntry) |
| void | RequestImpl (const NETADDR &Addr, CServerEntry *pEntry, int *pBasicToken, int *pToken, bool RandomToken) const |
| void | RegisterCommands () |
| bool | ValidateCommunityId (const char *pCommunityId) const |
| bool | ValidateCountryName (const char *pCountryName) const |
| bool | ValidateTypeName (const char *pTypeName) const |
| void | SetInfo (CServerEntry *pEntry, const CServerInfo &Info) const |
| void | SetLatency (NETADDR Addr, int Latency) |
Static Private Member Functions | |
| static int | GetBasicToken (int Token) |
| static int | GetExtraToken (int Token) |
| static void | ConfigSaveCallback (IConfigManager *pConfigManager, void *pUserData) |
| static void | Con_AddFavoriteCommunity (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_RemoveFavoriteCommunity (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_AddExcludedCommunity (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_RemoveExcludedCommunity (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_AddExcludedCountry (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_RemoveExcludedCountry (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_AddExcludedType (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_RemoveExcludedType (IConsole::IResult *pResult, void *pUserData) |
| static void | Con_LeakIpAddress (IConsole::IResult *pResult, void *pUserData) |
| static bool | ParseCommunityFinishes (CCommunity *pCommunity, const json_value &Finishes) |
| static bool | ParseCommunityServers (CCommunity *pCommunity, const json_value &Servers) |
Additional Inherited Members | |
| Public Types inherited from IServerBrowser | |
| enum | { SORT_NAME = 0 , SORT_PING , SORT_MAP , SORT_GAMETYPE , SORT_NUMPLAYERS , SORT_NUMFRIENDS } |
| enum | { QUICK_SERVERNAME = 1 , QUICK_PLAYER = 2 , QUICK_MAPNAME = 4 } |
| enum | { TYPE_INTERNET = 0 , TYPE_LAN , TYPE_FAVORITES , TYPE_FAVORITE_COMMUNITY_1 , TYPE_FAVORITE_COMMUNITY_2 , TYPE_FAVORITE_COMMUNITY_3 , TYPE_FAVORITE_COMMUNITY_4 , TYPE_FAVORITE_COMMUNITY_5 , NUM_TYPES } |
| enum | { LAN_PORT_BEGIN = 8303 , LAN_PORT_END = 8310 } |
| Static Public Member Functions inherited from IServerBrowser | |
| static const char * | InterfaceName () |
| Static Public Attributes inherited from IServerBrowser | |
| static constexpr const char * | COMMUNITY_DDNET = "ddnet" |
| static constexpr const char * | COMMUNITY_NONE = "none" |
| static constexpr const char * | COMMUNITY_COUNTRY_NONE = "none" |
| static constexpr const char * | COMMUNITY_TYPE_NONE = "None" |
| static constexpr const char * | COMMUNITY_ALL = "all" |
| static constexpr const char * | SEARCH_EXCLUDE_TOKEN = ";" |
| Protected Member Functions inherited from IInterface | |
| IKernel * | Kernel () |
| CServerBrowser::CServerBrowser | ( | ) |
|
override |
|
private |
|
overridevirtual |
Implements IServerBrowser.
|
private |
|
overridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
private |
|
overridevirtual |
Implements IServerBrowser.
|
private |
|
staticprivate |
|
inlineoverridevirtual |
Implements IServerBrowser.
|
staticprivate |
|
overridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
| bool CServerBrowser::IsRegistered | ( | const NETADDR & | Addr | ) |
|
overridevirtual |
Implements IServerBrowser.
| const json_value * CServerBrowser::LoadDDNetInfo | ( | ) |
| void CServerBrowser::LoadDDNetInfoJson | ( | ) |
| void CServerBrowser::LoadDDNetLocation | ( | ) |
| void CServerBrowser::LoadDDNetServers | ( | ) |
|
overridevirtual |
Implements IServerBrowser.
|
overridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
| void CServerBrowser::OnInit | ( | ) |
| void CServerBrowser::OnServerInfoUpdate | ( | const NETADDR & | Addr, |
| int | Token, | ||
| const CServerInfo * | pInfo ) |
|
staticprivate |
|
staticprivate |
|
overridevirtual |
Implements IServerBrowser.
| void CServerBrowser::QueueRequest | ( | CServerEntry * | pEntry | ) |
|
overridevirtual |
Implements IServerBrowser.
|
private |
|
private |
|
private |
| void CServerBrowser::RequestCurrentServer | ( | const NETADDR & | Addr | ) | const |
| void CServerBrowser::RequestCurrentServerWithRandomToken | ( | const NETADDR & | Addr, |
| int * | pBasicToken, | ||
| int * | pToken ) const |
|
private |
|
inline |
|
overridevirtual |
Implements IServerBrowser.
| void CServerBrowser::SetBaseInfo | ( | class CNetClient * | pClient, |
| const char * | pNetVersion ) |
| void CServerBrowser::SetCurrentServerPing | ( | const NETADDR & | Addr, |
| int | Ping ) |
| void CServerBrowser::SetHttpInfo | ( | const CServerInfo * | pInfo | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Implements IServerBrowser.
|
private |
|
inlineoverridevirtual |
Implements IServerBrowser.
|
inlineoverridevirtual |
Implements IServerBrowser.
| void CServerBrowser::Update | ( | ) |
|
private |
| void CServerBrowser::UpdateServerCommunity | ( | CServerInfo * | pInfo | ) | const |
| void CServerBrowser::UpdateServerFilteredPlayers | ( | CServerInfo * | pInfo | ) | const |
| void CServerBrowser::UpdateServerFriends | ( | CServerInfo * | pInfo | ) | const |
| void CServerBrowser::UpdateServerRank | ( | CServerInfo * | pInfo | ) | const |
|
private |
|
private |
| void CServerBrowser::ValidateServerlistType | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |