Planeshift
|
Handles Authentication details from the client to the server. More...
#include <authentclient.h>
Public Member Functions | |
bool | Authenticate (const csString &user, const csString &pwd, const csString &pwd256) |
Send a message to the server to login. | |
const char * | GetRejectMessage () |
Return the reason ( if any ) for a client to be rejected. | |
virtual void | HandleMessage (MsgEntry *mh) |
Handle incomming messages based on the subscribed types. | |
psAuthenticationClient (MsgHandler *myMsgQueue) | |
void | Reset (void) |
Clear the status of the login attempt. | |
int | Status (void) |
Get the current status of authentication. | |
virtual | ~psAuthenticationClient () |
Protected Attributes | |
int | iClientApproved |
csRef< MsgHandler > | msghandler |
csString | password |
csString | password256 |
csString | rejectmsg |
csString | username |
Handles Authentication details from the client to the server.
The basic role of the authentication client is to handle the login/logout functions on the client. When it is created it will subscribe to these types of messages:
This class will also handle disconnect messages from other clients/entities. Thus when other players disconnect or move out of range this class will be responsible for removing them from this client.
Definition at line 80 of file authentclient.h.
psAuthenticationClient::psAuthenticationClient | ( | MsgHandler * | myMsgQueue | ) |
virtual psAuthenticationClient::~psAuthenticationClient | ( | ) | [virtual] |
bool psAuthenticationClient::Authenticate | ( | const csString & | user, |
const csString & | pwd, | ||
const csString & | pwd256 | ||
) |
Send a message to the server to login.
user | The account name |
pwd | The account password |
pwd256 | The account password |
const char* psAuthenticationClient::GetRejectMessage | ( | ) |
Return the reason ( if any ) for a client to be rejected.
virtual void psAuthenticationClient::HandleMessage | ( | MsgEntry * | mh | ) | [virtual] |
Handle incomming messages based on the subscribed types.
Implements psClientNetSubscriber.
void psAuthenticationClient::Reset | ( | void | ) | [inline] |
Clear the status of the login attempt.
Definition at line 126 of file authentclient.h.
int psAuthenticationClient::Status | ( | void | ) | [inline] |
Get the current status of authentication.
Possible return values are:
Definition at line 118 of file authentclient.h.
int psAuthenticationClient::iClientApproved [protected] |
Definition at line 134 of file authentclient.h.
csRef<MsgHandler> psAuthenticationClient::msghandler [protected] |
Definition at line 129 of file authentclient.h.
csString psAuthenticationClient::password [protected] |
Definition at line 135 of file authentclient.h.
csString psAuthenticationClient::password256 [protected] |
Definition at line 136 of file authentclient.h.
csString psAuthenticationClient::rejectmsg [protected] |
Definition at line 133 of file authentclient.h.
csString psAuthenticationClient::username [protected] |
Definition at line 137 of file authentclient.h.