YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::Session Class Reference

#include <Session.hpp>

Inheritance diagram for ycl::Session:
Collaboration diagram for ycl::Session:

List of all members.

Public Member Functions

void Refresh ()
void Login (const yap::String &login, const yap::String &password)
void Register (const yap::String &login, const yap::String &password, const yap::String &email)
void Disconnect ()
UserGetUser ()
IPacketHandler members.
virtual bool HandlePacket (yap::IPacket &packet)
virtual bool SendPacket (yap::IPacket &packet)
virtual void AddRelay (yap::IPacketHandler *relay)
virtual void RemoveRelay (yap::IPacketHandler *relay)
virtual void SetParent (yap::IPacketHandler *parent)
- Public Member Functions inherited from yap::IPacketHandler
virtual ~IPacketHandler ()

Static Public Member Functions

static SessionInstance ()

Public Attributes

yap::Event< Session
&, yap::EmptyEventArgs
OnLoginValidation
yap::Event< Session
&, yap::EmptyEventArgs
OnRegistrationValidation
yap::Event< Session
&, yap::EmptyEventArgs
OnLoginError
yap::Event< Session
&, yap::EmptyEventArgs
OnRegistrationError

Private Member Functions

 DISALLOW_COPY (Session)
 Session ()
virtual ~Session ()
bool Connect ()
void HandleReception ()
void HandleServerInfoLoginValidation (yap::IPacket &packet)
void HandleServerInfoRegistrationValidation (yap::IPacket &packet)
void HandleServerInfoLoginError (yap::IPacket &packet)
void HandleServerInfoRegistrationError (yap::IPacket &packet)
void HandleServerInfoPrimaryData (yap::IPacket &packet)
void UpdateObjectFactory (yap::IPacket &packet, yap::ObjectFactory &objectFactory)

Private Attributes

yap::PacketHandler packetHandler_
yap::Thread receptionThread_
bool receptionIsActive_
yap::ClientSocket socket_
yap::NetworkHandler networkHandler_
yap::Mutex networkHandlerMutex_
User user_
bool isConnected_

Static Private Attributes

static const yap::String DEFAULT_REMOTE_IP
static const yap::Int16 DEFAULT_REMOTE_PORT = 8008
static const yap::Time DEFAULT_RECEPTION_SLEEP_DELAY = yap::Time (0.005f)

Detailed Description

Definition at line 18 of file Session.hpp.


Constructor & Destructor Documentation

ycl::Session::Session ( )
private

Definition at line 15 of file Session.cpp.

Here is the call graph for this function:

ycl::Session::~Session ( )
privatevirtual

Definition at line 42 of file Session.cpp.


Member Function Documentation

void ycl::Session::AddRelay ( yap::IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 123 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ycl::Session::Connect ( )
private

Definition at line 140 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ycl::Session::DISALLOW_COPY ( Session  )
private
void ycl::Session::Disconnect ( )

Definition at line 159 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

User & ycl::Session::GetUser ( )

Definition at line 108 of file Session.cpp.

Here is the caller graph for this function:

bool ycl::Session::HandlePacket ( yap::IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 113 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleReception ( )
private

Definition at line 172 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleServerInfoLoginError ( yap::IPacket packet)
private

Definition at line 207 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleServerInfoLoginValidation ( yap::IPacket packet)
private

Definition at line 189 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleServerInfoPrimaryData ( yap::IPacket packet)
private

Definition at line 221 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleServerInfoRegistrationError ( yap::IPacket packet)
private

Definition at line 214 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::HandleServerInfoRegistrationValidation ( yap::IPacket packet)
private

Definition at line 200 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Session & ycl::Session::Instance ( )
static

Definition at line 46 of file Session.cpp.

Here is the caller graph for this function:

void ycl::Session::Login ( const yap::String login,
const yap::String password 
)
Todo:
login request

Definition at line 73 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::Refresh ( )

Definition at line 53 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::Register ( const yap::String login,
const yap::String password,
const yap::String email 
)
Todo:
registration request

Definition at line 91 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::RemoveRelay ( yap::IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 128 of file Session.cpp.

Here is the call graph for this function:

bool ycl::Session::SendPacket ( yap::IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 118 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Session::SetParent ( yap::IPacketHandler parent)
virtual

Implements yap::IPacketHandler.

Definition at line 135 of file Session.cpp.

void ycl::Session::UpdateObjectFactory ( yap::IPacket packet,
yap::ObjectFactory objectFactory 
)
private

Definition at line 226 of file Session.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const yap::Time ycl::Session::DEFAULT_RECEPTION_SLEEP_DELAY = yap::Time (0.005f)
staticprivate

Definition at line 76 of file Session.hpp.

const yap::String ycl::Session::DEFAULT_REMOTE_IP
staticprivate

Definition at line 73 of file Session.hpp.

const yap::Int16 ycl::Session::DEFAULT_REMOTE_PORT = 8008
staticprivate

Definition at line 74 of file Session.hpp.

bool ycl::Session::isConnected_
private

Definition at line 89 of file Session.hpp.

yap::NetworkHandler ycl::Session::networkHandler_
private

Definition at line 84 of file Session.hpp.

yap::Mutex ycl::Session::networkHandlerMutex_
private

Definition at line 85 of file Session.hpp.

yap::Event<Session&, yap::EmptyEventArgs> ycl::Session::OnLoginError

Definition at line 51 of file Session.hpp.

yap::Event<Session&, yap::EmptyEventArgs> ycl::Session::OnLoginValidation

.

Definition at line 49 of file Session.hpp.

yap::Event<Session&, yap::EmptyEventArgs> ycl::Session::OnRegistrationError

Definition at line 52 of file Session.hpp.

yap::Event<Session&, yap::EmptyEventArgs> ycl::Session::OnRegistrationValidation

Definition at line 50 of file Session.hpp.

yap::PacketHandler ycl::Session::packetHandler_
private

Definition at line 78 of file Session.hpp.

bool ycl::Session::receptionIsActive_
private

Definition at line 81 of file Session.hpp.

yap::Thread ycl::Session::receptionThread_
private

Definition at line 80 of file Session.hpp.

yap::ClientSocket ycl::Session::socket_
private

Definition at line 83 of file Session.hpp.

User ycl::Session::user_
private

Definition at line 87 of file Session.hpp.


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