![]() |
TrinityCore
|
Storage object for the list of realms on the server. More...
#include <RealmList.h>
Public Types | |
| typedef std::map< Battlenet::RealmHandle, std::shared_ptr< Realm > > | RealmMap |
Public Member Functions | |
| RealmList (RealmList const &)=delete | |
| RealmList (RealmList &&)=delete | |
| RealmList & | operator= (RealmList const &)=delete |
| RealmList & | operator= (RealmList &&)=delete |
| ~RealmList () | |
| void | Initialize (Trinity::Asio::IoContext &ioContext, uint32 updateInterval) |
| void | Close () |
| std::shared_ptr< Realm const > | GetRealm (Battlenet::RealmHandle const &id) const |
| Battlenet::RealmHandle | GetCurrentRealmId () const |
| void | SetCurrentRealmId (Battlenet::RealmHandle const &id) |
| std::shared_ptr< Realm const > | GetCurrentRealm () const |
| void | WriteSubRegions (bgs::protocol::game_utilities::v1::GetAllValuesForAttributeResponse *response) const |
| std::vector< uint8 > | GetRealmEntryJSON (Battlenet::RealmHandle const &id, uint32 build, AccountTypes accountSecurityLevel) const |
| std::vector< uint8 > | GetRealmList (uint32 build, AccountTypes accountSecurityLevel, std::string const &subRegion) const |
| uint32 | JoinRealm (uint32 realmAddress, uint32 build, ClientBuild::VariantId const &buildVariant, boost::asio::ip::address const &clientAddress, std::array< uint8, 32 > const &clientSecret, LocaleConstant locale, std::string const &os, Minutes timezoneOffset, std::string const &accountName, AccountTypes accountSecurityLevel, bgs::protocol::game_utilities::v1::ClientResponse *response) const |
Static Public Member Functions | |
| static RealmList * | Instance () |
Private Member Functions | |
| RealmList () | |
| void | UpdateRealms () |
| void | FillRealmEntry (Realm const &realm, uint32 clientBuild, AccountTypes accountSecurityLevel, JSON::RealmList::RealmEntry *realmEntry) const |
Static Private Member Functions | |
| static void | UpdateRealm (Realm &realm, Battlenet::RealmHandle const &id, uint32 build, std::string const &name, std::vector< boost::asio::ip::address > &&addresses, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, RealmPopulationState population) |
Private Attributes | |
| std::shared_mutex | _realmsMutex |
| RealmMap | _realms |
| std::map< Battlenet::RealmHandle, std::string > | _removedRealms |
| std::unordered_set< std::string > | _subRegions |
| uint32 | _updateInterval |
| std::unique_ptr< Trinity::Asio::DeadlineTimer > | _updateTimer |
| std::unique_ptr< Trinity::Net::Resolver > | _resolver |
| Optional< Battlenet::RealmHandle > | _currentRealmId |
Storage object for the list of realms on the server.
Definition at line 45 of file RealmList.h.
| typedef std::map<Battlenet::RealmHandle, std::shared_ptr<Realm> > RealmList::RealmMap |
Definition at line 48 of file RealmList.h.
|
delete |
|
delete |
|
default |
|
private |
Definition at line 54 of file RealmList.cpp.
| void RealmList::Close | ( | ) |
Definition at line 78 of file RealmList.cpp.
|
private |
Definition at line 244 of file RealmList.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::shared_ptr< Realm const > RealmList::GetCurrentRealm | ( | ) | const |
| Battlenet::RealmHandle RealmList::GetCurrentRealmId | ( | ) | const |
Definition at line 220 of file RealmList.cpp.
| std::shared_ptr< Realm const > RealmList::GetRealm | ( | Battlenet::RealmHandle const & | id | ) | const |
Definition at line 214 of file RealmList.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< uint8 > RealmList::GetRealmEntryJSON | ( | Battlenet::RealmHandle const & | id, |
| uint32 | build, | ||
| AccountTypes | accountSecurityLevel | ||
| ) | const |
| std::vector< uint8 > RealmList::GetRealmList | ( | uint32 | build, |
| AccountTypes | accountSecurityLevel, | ||
| std::string const & | subRegion | ||
| ) | const |
| void RealmList::Initialize | ( | Trinity::Asio::IoContext & | ioContext, |
| uint32 | updateInterval | ||
| ) |
|
static |
Definition at line 60 of file RealmList.cpp.
| uint32 RealmList::JoinRealm | ( | uint32 | realmAddress, |
| uint32 | build, | ||
| ClientBuild::VariantId const & | buildVariant, | ||
| boost::asio::ip::address const & | clientAddress, | ||
| std::array< uint8, 32 > const & | clientSecret, | ||
| LocaleConstant | locale, | ||
| std::string const & | os, | ||
| Minutes | timezoneOffset, | ||
| std::string const & | accountName, | ||
| AccountTypes | accountSecurityLevel, | ||
| bgs::protocol::game_utilities::v1::ClientResponse * | response | ||
| ) | const |
| void RealmList::SetCurrentRealmId | ( | Battlenet::RealmHandle const & | id | ) |
Definition at line 225 of file RealmList.cpp.
|
staticprivate |
Definition at line 83 of file RealmList.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 101 of file RealmList.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void RealmList::WriteSubRegions | ( | bgs::protocol::game_utilities::v1::GetAllValuesForAttributeResponse * | response | ) | const |
|
private |
Definition at line 90 of file RealmList.h.
|
private |
Definition at line 84 of file RealmList.h.
|
mutableprivate |
Definition at line 83 of file RealmList.h.
|
private |
Definition at line 85 of file RealmList.h.
|
private |
Definition at line 89 of file RealmList.h.
|
private |
Definition at line 86 of file RealmList.h.
|
private |
Definition at line 87 of file RealmList.h.
|
private |
Definition at line 88 of file RealmList.h.