TPProto::GameStatusListener Class Reference

A Listener for listening for changes to the game status and connection. More...

#include <gamestatuslistener.h>

List of all members.

Public Member Functions

virtual ~GameStatusListener ()
 Required virtual destructor.
virtual void connected ()=0
 Called when a connection is established to a server.
virtual bool redirected (const std::string &url)=0
 Called when libtpproto-cpp has been told to redirect.
virtual void disconnected ()=0
 Called when the connection is lost to the server.
virtual void accountCreated (bool status)=0
 Called when the player's account is created sucessfully or not.
virtual void loggedIn (bool status)=0
 Called when the player is sucessfully logged in or not.
virtual void eotStarted ()=0
 Called when libtpproto-cpp notices that EOT has started.
virtual void eotEnded ()=0
 Called when libtpproto-cpp notices that EOT has ended.
virtual void timeToEot (uint32_t timetoeot)=0
 Called when an updated time to end of turn is received.

Detailed Description

A Listener for listening for changes to the game status and connection.


Member Function Documentation

virtual void TPProto::GameStatusListener::accountCreated ( bool  status  )  [pure virtual]

Called when the player's account is created sucessfully or not.

Parameters:
status True if account created, false otherwise.
virtual void TPProto::GameStatusListener::eotEnded (  )  [pure virtual]

Called when libtpproto-cpp notices that EOT has ended.

Noticed when a Time frame is sent that has non-zero time after EOT has started. This could be well after it has actually ended.

Referenced by TPProto::GameLayerAsyncFrameListener::recvTimeRemaining().

virtual void TPProto::GameStatusListener::eotStarted (  )  [pure virtual]

Called when libtpproto-cpp notices that EOT has started.

Noticed when a Time frame is sent that has 0 time. This could be well after it has actually started.

Referenced by TPProto::GameLayerAsyncFrameListener::recvTimeRemaining().

virtual void TPProto::GameStatusListener::loggedIn ( bool  status  )  [pure virtual]

Called when the player is sucessfully logged in or not.

Parameters:
status True if logged in, false otherwise.
virtual bool TPProto::GameStatusListener::redirected ( const std::string &  url  )  [pure virtual]

Called when libtpproto-cpp has been told to redirect.

The client has already been disconnected from the redirecting server at this point. If the GameStatusListener returns false, then the client must manually do the redirect. This should be helpful for allowing the client to pop up a dialog asking the user if they want to redirect.

Parameters:
url The url the redirection points to.
Returns:
True to follow the redirect, false not to.
virtual void TPProto::GameStatusListener::timeToEot ( uint32_t  timetoeot  )  [pure virtual]

Called when an updated time to end of turn is received.

Could be inaccurate. Called after eotStated and eotEnded are called.

Parameters:
timetoeot The number of seconds to the next end of turn.

Referenced by TPProto::GameLayerAsyncFrameListener::recvTimeRemaining().


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

Generated on Fri Mar 12 14:30:05 2010 for libtpproto-cpp by  doxygen 1.6.1