Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

psQuestionClient Class Reference

The psQuestionClient class manages answering to various questions sent from server to user. More...

#include <questionclient.h>

List of all members.

Public Member Functions

void DeleteQuestion (uint32_t questionID)
 Delete question from list of pending questions.
virtual void HandleMessage (MsgEntry *msg)
 psQuestionClient (MsgHandler *mh, iObjectRegistry *obj)
void SendResponseToQuestion (uint32_t questionID, const csString &answer)
 Sends response to given question to server.
virtual ~psQuestionClient ()

Protected Member Functions

void HandleConfirm (uint32_t questionID, const csString &question)
 Default handler for a confirm message.
void HandleDuel (uint32_t questionID, const csString &question)
 Handles duel questions questions according to user settings.
void HandleMarriage (uint32_t questionID, const csString &question)
 Handles marriage questions according to user settings.
void HandleSecretGuildNotify (uint32_t questionID, const csString &question)
 Silently handles secret guild notifications.

Protected Attributes

MsgHandlermessageHandler
csHash< psQuestion * > questions

Detailed Description

The psQuestionClient class manages answering to various questions sent from server to user.

It keeps list of the questions that have not been answered yet.

Definition at line 49 of file questionclient.h.


Constructor & Destructor Documentation

psQuestionClient::psQuestionClient ( MsgHandler mh,
iObjectRegistry *  obj 
)
virtual psQuestionClient::~psQuestionClient ( ) [virtual]

Member Function Documentation

void psQuestionClient::DeleteQuestion ( uint32_t  questionID)

Delete question from list of pending questions.

void psQuestionClient::HandleConfirm ( uint32_t  questionID,
const csString &  question 
) [protected]

Default handler for a confirm message.

Creates a new psQuestion which displays a yes/no dialog and adds it to questions so that the user may reply to the question as they wish.

Parameters:
questionIDID of the question
questionText to be shown in the yes/no dialog
void psQuestionClient::HandleDuel ( uint32_t  questionID,
const csString &  question 
) [protected]

Handles duel questions questions according to user settings.

If the user has chosen to ignore duels the question will silently be replied "no" to. If the user has chosen to accept all duels the question will silently be replied "yes" to. Otherwise the dialog will appear normally.

Parameters:
questionIDID of the question
questionText to be shown in the dialog if it is used.
void psQuestionClient::HandleMarriage ( uint32_t  questionID,
const csString &  question 
) [protected]

Handles marriage questions according to user settings.

If the user has chosen to ignore marriage proposals the question will silently be replied "no" to. Otherwise the dialog will appear normally.

Parameters:
questionIDID of the question
questionText to be shown in the dialog if it is used.
virtual void psQuestionClient::HandleMessage ( MsgEntry msg) [virtual]

Implements psClientNetSubscriber.

void psQuestionClient::HandleSecretGuildNotify ( uint32_t  questionID,
const csString &  question 
) [protected]

Silently handles secret guild notifications.

This message is always replied no to but the user sees it anyway because of emulation requirements.

Parameters:
questionIDID of the question
questionText that would be shown if this dialog was shown.
void psQuestionClient::SendResponseToQuestion ( uint32_t  questionID,
const csString &  answer 
)

Sends response to given question to server.


Member Data Documentation

Definition at line 100 of file questionclient.h.

Definition at line 102 of file questionclient.h.


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