All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Battlenet::Session::AccountInfo Struct Reference

#include <Session.h>

Public Member Functions

void LoadResult (PreparedQueryResult result)

Public Attributes

uint32 Id
std::string Login
bool IsLockedToIP
std::string LockCountry
std::string LastIP
uint32 FailedLogins
bool IsBanned
bool IsPermanenetlyBanned
std::unordered_map< uint32,

Member Function Documentation

void Battlenet::Session::AccountInfo::LoadResult ( PreparedQueryResult  result)
30 {
31  //,, ba.locked, ba.lock_country, ba.last_ip, ba.failed_logins, bab.unbandate > UNIX_TIMESTAMP() OR bab.unbandate = bab.bandate, bab.unbandate = bab.bandate FROM battlenet_accounts ba LEFT JOIN battlenet_account_bans bab WHERE email = ?
32  Field* fields = result->Fetch();
33  Id = fields[0].GetUInt32();
34  Login = fields[1].GetString();
35  IsLockedToIP = fields[2].GetBool();
36  LockCountry = fields[3].GetString();
37  LastIP = fields[4].GetString();
38  FailedLogins = fields[5].GetUInt32();
39  IsBanned = fields[6].GetUInt64() != 0;
40  IsPermanenetlyBanned = fields[7].GetUInt64() != 0;
42  static uint32 const GameAccountFieldsOffset = 8;
44  do
45  {
46  GameAccounts[result->Fetch()[GameAccountFieldsOffset].GetUInt32()].LoadResult(result->Fetch() + GameAccountFieldsOffset);
48  } while (result->NextRow());
49 }
uint64 GetUInt64() const
Definition: Field.h:184
std::unordered_map< uint32, GameAccountInfo > GameAccounts
Definition: Session.h:120
Class used to access individual fields of database query result.
Definition: Field.h:56
std::string LastIP
Definition: Session.h:115
std::string LockCountry
Definition: Session.h:114
std::string Login
Definition: Session.h:112
uint32 FailedLogins
Definition: Session.h:116
uint32_t uint32
Definition: Define.h:150
bool IsBanned
Definition: Session.h:117
bool IsPermanenetlyBanned
Definition: Session.h:118
uint32 GetUInt32() const
Definition: Field.h:146
bool IsLockedToIP
Definition: Session.h:113
bool GetBool() const
Definition: Field.h:65
std::string GetString() const
Definition: Field.h:276
uint32 Id
Definition: Session.h:111

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32 Battlenet::Session::AccountInfo::FailedLogins
std::unordered_map<uint32, GameAccountInfo> Battlenet::Session::AccountInfo::GameAccounts
uint32 Battlenet::Session::AccountInfo::Id
bool Battlenet::Session::AccountInfo::IsBanned
bool Battlenet::Session::AccountInfo::IsLockedToIP
bool Battlenet::Session::AccountInfo::IsPermanenetlyBanned
std::string Battlenet::Session::AccountInfo::LastIP
std::string Battlenet::Session::AccountInfo::LockCountry
std::string Battlenet::Session::AccountInfo::Login

The documentation for this struct was generated from the following files: