DDraceNetwork Docs
|
#include <serverbrowser.h>
Public Member Functions | |
CServerBrowser () | |
virtual | ~CServerBrowser () |
void | Refresh (int Type, bool Force=false) override |
bool | IsRefreshing () const override |
bool | IsGettingServerlist () 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 |
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 |
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) |
virtual void | Refresh (int Type, bool Force=false)=0 |
virtual bool | IsGettingServerlist () const =0 |
virtual bool | IsRefreshing () const =0 |
virtual int | LoadingProgression () const =0 |
virtual int | NumServers () const =0 |
virtual int | Players (const CServerInfo &Item) const =0 |
virtual int | Max (const CServerInfo &Item) const =0 |
virtual int | NumSortedServers () const =0 |
virtual int | NumSortedPlayers () const =0 |
virtual const CServerInfo * | SortedGet (int Index) const =0 |
virtual const std::vector< CCommunity > & | Communities () const =0 |
virtual const CCommunity * | Community (const char *pCommunityId) const =0 |
virtual std::vector< const CCommunity * > | SelectedCommunities () const =0 |
virtual std::vector< const CCommunity * > | FavoriteCommunities () const =0 |
virtual std::vector< const CCommunity * > | CurrentCommunities () const =0 |
virtual unsigned | CurrentCommunitiesHash () const =0 |
virtual bool | DDNetInfoAvailable () const =0 |
virtual SHA256_DIGEST | DDNetInfoSha256 () const =0 |
virtual ICommunityCache & | CommunityCache ()=0 |
virtual const ICommunityCache & | CommunityCache () const =0 |
virtual IFilterList & | FavoriteCommunitiesFilter ()=0 |
virtual IFilterList & | CommunitiesFilter ()=0 |
virtual IFilterList & | CountriesFilter ()=0 |
virtual IFilterList & | TypesFilter ()=0 |
virtual const IFilterList & | FavoriteCommunitiesFilter () const =0 |
virtual const IFilterList & | CommunitiesFilter () const =0 |
virtual const IFilterList & | CountriesFilter () const =0 |
virtual const IFilterList & | TypesFilter () const =0 |
virtual void | CleanFilters ()=0 |
virtual CServerEntry * | Find (const NETADDR &Addr)=0 |
virtual int | GetCurrentType ()=0 |
virtual const char * | GetTutorialServer ()=0 |
Public Member Functions inherited from IInterface | |
IInterface () | |
virtual void | Shutdown () |
virtual | ~IInterface () |
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) |
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 , QUICK_SERVERNAME = 1 , QUICK_PLAYER = 2 , QUICK_MAPNAME = 4 , 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 , 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 | ( | ) |
|
virtual |
|
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 | ) |
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 |
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 |
|
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 |
|
private |
|
private |
|
private |
|
private |