![]() |
TrinityCore
|
Storage object for the list of realms on the server. More...
#include <RealmList.h>
Public Types | |
| typedef std::map< RealmHandle, Realm > | RealmMap |
Public Member Functions | |
| ~RealmList () | |
| void | Initialize (Trinity::Asio::IoContext &ioContext, uint32 updateInterval) |
| void | Close () |
| RealmMap const & | GetRealms () const |
| Realm const * | GetRealm (RealmHandle const &id) const |
Static Public Member Functions | |
| static RealmList * | Instance () |
Private Member Functions | |
| RealmList () | |
| void | UpdateRealms (boost::system::error_code const &error) |
| void | UpdateRealm (RealmHandle const &id, uint32 build, std::string const &name, boost::asio::ip::address &&address, boost::asio::ip::address &&localAddr, boost::asio::ip::address &&localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population) |
Private Attributes | |
| RealmMap | _realms |
| uint32 | _updateInterval |
| std::unique_ptr< Trinity::Asio::DeadlineTimer > | _updateTimer |
| std::unique_ptr< Trinity::Asio::Resolver > | _resolver |
Storage object for the list of realms on the server.
Definition at line 34 of file RealmList.h.
| typedef std::map<RealmHandle, Realm> RealmList::RealmMap |
Definition at line 37 of file RealmList.h.
|
default |
|
private |
Definition at line 28 of file RealmList.cpp.
| void RealmList::Close | ( | ) |
Definition at line 52 of file RealmList.cpp.
References _updateTimer.
| Realm const * RealmList::GetRealm | ( | RealmHandle const & | id | ) | const |
Definition at line 175 of file RealmList.cpp.
References _realms.
|
inline |
Definition at line 46 of file RealmList.h.
| void RealmList::Initialize | ( | Trinity::Asio::IoContext & | ioContext, |
| uint32 | updateInterval | ||
| ) |
Definition at line 41 of file RealmList.cpp.
References _resolver, _updateInterval, _updateTimer, ClientBuild::LoadBuildInfo(), and UpdateRealms().
|
static |
Definition at line 34 of file RealmList.cpp.
|
private |
Definition at line 57 of file RealmList.cpp.
References _realms, Realm::AllowedSecurityLevel, Realm::Build, Realm::ExternalAddress, Realm::Flags, Realm::Id, Realm::LocalAddress, Realm::LocalSubnetMask, Realm::Name, Realm::PopulationLevel, Realm::Port, realm, Realm::Timezone, and Realm::Type.
Referenced by UpdateRealms().
|
private |
Definition at line 81 of file RealmList.cpp.
References _realms, _resolver, _updateInterval, _updateTimer, ABORT, Field::GetFloat(), Field::GetString(), Field::GetUInt16(), Field::GetUInt32(), Field::GetUInt8(), LOGIN_SEL_REALMLIST, LoginDatabase, MAX_CLIENT_REALM_TYPE, REALM_TYPE_FFA_PVP, REALM_TYPE_NORMAL, REALM_TYPE_PVP, SEC_ADMINISTRATOR, TC_LOG_DEBUG, TC_LOG_ERROR, TC_LOG_INFO, UpdateRealm(), and UpdateRealms().
Referenced by Initialize(), and UpdateRealms().
|
private |
Definition at line 57 of file RealmList.h.
Referenced by GetRealm(), UpdateRealm(), and UpdateRealms().
|
private |
Definition at line 60 of file RealmList.h.
Referenced by Initialize(), and UpdateRealms().
|
private |
Definition at line 58 of file RealmList.h.
Referenced by Initialize(), and UpdateRealms().
|
private |
Definition at line 59 of file RealmList.h.
Referenced by Close(), Initialize(), and UpdateRealms().