|
EvEmu
0.8.4
11 September 2021
|
Value keeper for single EVE session. More...
#include "ClientSession.h"

Public Member Functions | |
| ClientSession () | |
| ~ClientSession () | |
| bool | isDirty () const |
| void | SetInt (const char *name, int32 value) |
| int32 | GetLastInt (const char *name) const |
| int32 | GetCurrentInt (const char *name) const |
| void | SetLong (const char *name, int64 value) |
| int64 | GetLastLong (const char *name) const |
| int64 | GetCurrentLong (const char *name) const |
| void | SetString (const char *name, const char *value) |
| std::string | GetLastString (const char *name) const |
| std::string | GetCurrentString (const char *name) const |
| void | Clear (const char *name) |
| void | EncodeChanges (PyDict *into) |
| void | EncodeInitialState (PyDict *into) |
| int64 | GetSessionID () |
Protected Member Functions | |
| PyRep * | _GetLast (const char *name) const |
| PyRep * | _GetCurrent (const char *name) const |
| PyTuple * | _GetValueTuple (const char *name) const |
| void | _Set (const char *name, PyRep *value) |
Protected Attributes | |
| PyDict *const | mSession |
Private Attributes | |
| bool | mDirty |
| int64 | m_sessionID |
Value keeper for single EVE session.
This object keeps track of string-value pairs and encodes their changes as session changes.
Definition at line 37 of file ClientSession.h.
| ClientSession::ClientSession | ( | ) |
Definition at line 46 of file ClientSession.cpp.
References GetTimeUSeconds(), m_sessionID, mSession, new_tuple(), Acct::Role::NEWBIE, Acct::Role::PLAYER, PyStatic, sEntityList, and PyDict::SetItemString().

| ClientSession::~ClientSession | ( | ) |
Definition at line 64 of file ClientSession.cpp.
References m_sessionID, mSession, PyDecRef, and sEntityList.
|
protected |
Definition at line 180 of file ClientSession.cpp.
References _GetValueTuple(), _log, PyTuple::GetItem(), is_log_enabled, and EvE::traceStack().
Referenced by GetCurrentInt(), GetCurrentLong(), and GetCurrentString().


|
protected |
Definition at line 170 of file ClientSession.cpp.
References _GetValueTuple(), _log, and PyTuple::GetItem().
Referenced by GetLastInt(), GetLastLong(), and GetLastString().


|
protected |
Definition at line 162 of file ClientSession.cpp.
References PyRep::AsTuple(), PyDict::GetItemString(), and mSession.
Referenced by _GetCurrent(), _GetLast(), and _Set().


|
protected |
Definition at line 193 of file ClientSession.cpp.
References _GetValueTuple(), PyTuple::GetItem(), PyRep::hash(), mDirty, mSession, new_tuple(), PyDecRef, PyStatic, PyTuple::SetItem(), and PyDict::SetItemString().
Referenced by Clear(), SetInt(), SetLong(), and SetString().


| void ClientSession::Clear | ( | const char * | name | ) |
Definition at line 72 of file ClientSession.cpp.
References _Set(), and PyStatic.
Referenced by Client::InitSession(), and Client::UpdateSession().


| void ClientSession::EncodeChanges | ( | PyDict * | into | ) |
Buils a PyDictionary with the list of changes the session has gone through Every item is a tuple that includes the old and new value so the client can compare against what it has
| into |
Definition at line 122 of file ClientSession.cpp.
References PyRep::AsBool(), PyRep::AsTuple(), PyTuple::GetItem(), mDirty, mSession, new_tuple(), PyStatic, PyTuple::SetItem(), PyDict::SetItem(), and PyBool::value().
Referenced by Client::SendSessionChange().


| void ClientSession::EncodeInitialState | ( | PyDict * | into | ) |
Builds a PyDictionary with the current state of the session. Useful for macho.SessionInitialStateNotification The side-effects include overwriting of the old value on the session data with the new one
| into |
Definition at line 145 of file ClientSession.cpp.
References PyRep::AsTuple(), mDirty, mSession, PyStatic, PyTuple::SetItem(), and PyDict::SetItem().
Referenced by Client::SendInitialSessionStatus().


| int32 ClientSession::GetCurrentInt | ( | const char * | name | ) | const |
Definition at line 97 of file ClientSession.cpp.
References _GetCurrent(), and PyRep::IntegerValue().
Referenced by Client::GetAccountType(), Client::GetAllianceID(), Client::GetCharacterID(), Client::GetCloneStationID(), Client::GetCorpAccountKey(), Client::GetCorpHQ(), Client::GetCorporationID(), Client::GetFleetRole(), Client::GetStationID(), Client::GetStationID2(), Client::GetUserID(), and Client::GetWarFactionID().


| int64 ClientSession::GetCurrentLong | ( | const char * | name | ) | const |
Definition at line 107 of file ClientSession.cpp.
References _GetCurrent(), and PyRep::IntegerValue().
Referenced by Client::GetAccountRole(), Client::GetClientID(), Client::GetCorpRole(), Client::GetRolesAtAll(), Client::GetRolesAtBase(), Client::GetRolesAtHQ(), and Client::GetRolesAtOther().


| std::string ClientSession::GetCurrentString | ( | const char * | name | ) | const |
Definition at line 117 of file ClientSession.cpp.
References _GetCurrent(), and PyRep::StringContent().
Referenced by Client::GetAddress(), and Client::GetLanguageID().


| int32 ClientSession::GetLastInt | ( | const char * | name | ) | const |
Definition at line 92 of file ClientSession.cpp.
References _GetLast(), and PyRep::IntegerValue().

| int64 ClientSession::GetLastLong | ( | const char * | name | ) | const |
Definition at line 102 of file ClientSession.cpp.
References _GetLast(), and PyRep::IntegerValue().

| std::string ClientSession::GetLastString | ( | const char * | name | ) | const |
Definition at line 112 of file ClientSession.cpp.
References _GetLast(), and PyRep::StringContent().

|
inline |
Definition at line 76 of file ClientSession.h.
References m_sessionID.
Referenced by Command_showsession(), and Client::SendInitialSessionStatus().

|
inline |
Definition at line 43 of file ClientSession.h.
References mDirty.
Referenced by Client::SendSessionChange().

| void ClientSession::SetInt | ( | const char * | name, |
| int32 | value | ||
| ) |
Definition at line 77 of file ClientSession.cpp.
References _Set().
Referenced by Client::_VerifyLogin(), Client::InitSession(), Client::SendSessionChange(), Client::SetShip(), Client::UpdateCorpSession(), Client::UpdateFleetSession(), Client::UpdateSession(), and Client::UpdateSessionInt().


| void ClientSession::SetLong | ( | const char * | name, |
| int64 | value | ||
| ) |
Definition at line 82 of file ClientSession.cpp.
References _Set().
Referenced by Client::_VerifyLogin(), Client::InitSession(), and Client::UpdateCorpSession().


| void ClientSession::SetString | ( | const char * | name, |
| const char * | value | ||
| ) |
Definition at line 87 of file ClientSession.cpp.
References _Set().
Referenced by Client::_VerifyLogin().


|
private |
Definition at line 90 of file ClientSession.h.
Referenced by ClientSession(), GetSessionID(), and ~ClientSession().
|
private |
Definition at line 88 of file ClientSession.h.
Referenced by _Set(), EncodeChanges(), EncodeInitialState(), and isDirty().
|
protected |
Definition at line 85 of file ClientSession.h.
Referenced by _GetValueTuple(), _Set(), ClientSession(), EncodeChanges(), EncodeInitialState(), and ~ClientSession().