TrinityCore
|
Storage object for the list of realms on the server. More...
#include <RealmList.h>
Public Types | |
typedef std::map< Battlenet::RealmHandle, Realm > | RealmMap |
Public Member Functions | |
~RealmList () | |
void | Initialize (Trinity::Asio::IoContext &ioContext, uint32 updateInterval) |
void | Close () |
Realm const * | GetRealm (Battlenet::RealmHandle const &id) const |
bool | GetRealmNames (Battlenet::RealmHandle const &id, std::string *name, std::string *normalizedName) const |
RealmBuildInfo const * | GetBuildInfo (uint32 build) const |
uint32 | GetMinorMajorBugfixVersionForBuild (uint32 build) const |
void | WriteSubRegions (bgs::protocol::game_utilities::v1::GetAllValuesForAttributeResponse *response) const |
std::vector< uint8 > | GetRealmEntryJSON (Battlenet::RealmHandle const &id, uint32 build) const |
std::vector< uint8 > | GetRealmList (uint32 build, std::string const &subRegion) const |
uint32 | JoinRealm (uint32 realmAddress, uint32 build, boost::asio::ip::address const &clientAddress, std::array< uint8, 32 > const &clientSecret, LocaleConstant locale, std::string const &os, Minutes timezoneOffset, std::string const &accountName, bgs::protocol::game_utilities::v1::ClientResponse *response) const |
Static Public Member Functions | |
static RealmList * | Instance () |
Private Member Functions | |
RealmList () | |
void | LoadBuildInfo () |
void | UpdateRealms () |
void | UpdateRealm (Realm &realm, Battlenet::RealmHandle const &id, uint32 build, std::string const &name, boost::asio::ip::address &&address, boost::asio::ip::address &&localAddr, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population) |
Private Attributes | |
std::vector< RealmBuildInfo > | _builds |
std::shared_mutex | _realmsMutex |
RealmMap | _realms |
std::unordered_set< std::string > | _subRegions |
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 54 of file RealmList.h.
typedef std::map<Battlenet::RealmHandle, Realm> RealmList::RealmMap |
Definition at line 57 of file RealmList.h.
|
default |
|
private |
Definition at line 35 of file RealmList.cpp.
void RealmList::Close | ( | ) |
Definition at line 59 of file RealmList.cpp.
RealmBuildInfo const * RealmList::GetBuildInfo | ( | uint32 | build | ) | const |
Definition at line 244 of file RealmList.cpp.
Realm const * RealmList::GetRealm | ( | Battlenet::RealmHandle const & | id | ) | const |
Definition at line 217 of file RealmList.cpp.
std::vector< uint8 > RealmList::GetRealmEntryJSON | ( | Battlenet::RealmHandle const & | id, |
uint32 | build | ||
) | const |
bool RealmList::GetRealmNames | ( | Battlenet::RealmHandle const & | id, |
std::string * | name, | ||
std::string * | normalizedName | ||
) | const |
void RealmList::Initialize | ( | Trinity::Asio::IoContext & | ioContext, |
uint32 | updateInterval | ||
) |
|
static |
Definition at line 41 of file RealmList.cpp.
uint32 RealmList::JoinRealm | ( | uint32 | realmAddress, |
uint32 | build, | ||
boost::asio::ip::address const & | clientAddress, | ||
std::array< uint8, 32 > const & | clientSecret, | ||
LocaleConstant | locale, | ||
std::string const & | os, | ||
Minutes | timezoneOffset, | ||
std::string const & | accountName, | ||
bgs::protocol::game_utilities::v1::ClientResponse * | response | ||
) | const |
|
private |
Definition at line 64 of file RealmList.cpp.
|
private |
Definition at line 96 of file RealmList.cpp.
|
private |
Definition at line 116 of file RealmList.cpp.
void RealmList::WriteSubRegions | ( | bgs::protocol::game_utilities::v1::GetAllValuesForAttributeResponse * | response | ) | const |
|
private |
Definition at line 87 of file RealmList.h.
|
private |
Definition at line 89 of file RealmList.h.
|
mutableprivate |
Definition at line 88 of file RealmList.h.
|
private |
Definition at line 93 of file RealmList.h.
|
private |
Definition at line 90 of file RealmList.h.
|
private |
Definition at line 91 of file RealmList.h.
|
private |
Definition at line 92 of file RealmList.h.