Planeshift
questionclient.h
Go to the documentation of this file.
1
/*
2
* questionclient.h - Author: Ondrej Hurt
3
*
4
* Copyright (C) 2001 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5
*
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation (version 2 of the License)
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
*
18
*/
19
20
#ifndef __QUESTION_CLIENT_H__
21
#define __QUESTION_CLIENT_H__
22
23
#include <csutil/hash.h>
24
#include "
net/cmdbase.h
"
25
26
class
MsgHandler
;
27
struct
iObjectRegistry;
28
class
pawsYesNoBox
;
29
31
class
psQuestion
32
{
33
public
:
34
psQuestion
(uint32_t
questionID
) { this->questionID =
questionID
; }
35
virtual
~psQuestion
() {};
36
39
virtual
void
Cancel
() = 0;
40
protected
:
41
uint32_t
questionID
;
42
};
43
44
49
class
psQuestionClient
:
public
psClientNetSubscriber
50
{
51
public
:
52
psQuestionClient
(
MsgHandler
* mh, iObjectRegistry* obj);
53
virtual
~
psQuestionClient
();
54
55
// iNetSubscriber interface
56
virtual
void
HandleMessage(
MsgEntry
*msg);
57
59
void
DeleteQuestion(uint32_t
questionID
);
60
62
void
SendResponseToQuestion(uint32_t questionID,
const
csString & answer);
63
64
protected
:
65
73
void
HandleConfirm(uint32_t questionID,
const
csString &question);
83
void
HandleDuel(uint32_t questionID,
const
csString &question);
90
void
HandleSecretGuildNotify(uint32_t questionID,
const
csString &question);
98
void
HandleMarriage(uint32_t questionID,
const
csString &question);
99
100
MsgHandler
*
messageHandler
;
101
102
csHash<psQuestion*>
questions
;
103
};
104
105
#endif
106
psQuestionClient::messageHandler
MsgHandler * messageHandler
Definition:
questionclient.h:100
psQuestionClient::questions
csHash< psQuestion * > questions
Definition:
questionclient.h:102
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
psQuestion::questionID
uint32_t questionID
Definition:
questionclient.h:41
cmdbase.h
psQuestion::~psQuestion
virtual ~psQuestion()
Definition:
questionclient.h:35
psQuestionClient
The psQuestionClient class manages answering to various questions sent from server to user...
Definition:
questionclient.h:49
pawsYesNoBox
This is a yes/no box used to do confirms.
Definition:
pawsyesnobox.h:41
psQuestion
psQuestion is superclass of all question types.
Definition:
questionclient.h:31
MsgHandler
This class is the client's and server's main interface for either sending network messages out or get...
Definition:
msghandler.h:106
psQuestion::psQuestion
psQuestion(uint32_t questionID)
Definition:
questionclient.h:34
psClientNetSubscriber
Definition:
cmdbase.h:67
psQuestion::Cancel
virtual void Cancel()=0
Cancels answering of this question, for example closes some PAWS window Question deletes itself...
client
questionclient.h
Generated on Sat Jun 19 2021 05:00:22 for Planeshift by
1.8.11