Planeshift
subscriber.h
Go to the documentation of this file.
1
/*
2
* subscriber.h
3
*
4
* Copyright (C) 2001 PlaneShift Team (info@planeshift.it,
5
* http://www.planeshift.it)
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
#ifndef __SUBSCRIBER_H__
20
#define __SUBSCRIBER_H__
21
22
#include <csutil/refcount.h>
23
#include <csutil/ref.h>
24
25
class
MsgEntry
;
26
class
Client
;
27
37
struct
iNetSubscriber
:
public
virtual
csRefCount
38
{
39
virtual
bool
Verify
(
MsgEntry
*msg,
unsigned
int
flags,
Client
*& client) = 0;
40
44
virtual
void
HandleMessage
(
MsgEntry
* msg,
Client
*client) = 0;
45
};
46
52
struct
iCmdSubscriber
:
public
virtual
csRefCount
53
{
58
virtual
const
char
*HandleCommand(
const
char
*cmd) = 0;
59
};
60
63
#endif
64
iCmdSubscriber
This interface must be implemented by objects that want to receive command line strings messages...
Definition:
subscriber.h:52
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
csRefCount
iNetSubscriber
This interface must be implemented by objects that want to receive network messages.
Definition:
subscriber.h:37
Client
This class collects data of a netclient.
Definition:
client.h:95
iNetSubscriber::Verify
virtual bool Verify(MsgEntry *msg, unsigned int flags, Client *&client)=0
iNetSubscriber::HandleMessage
virtual void HandleMessage(MsgEntry *msg, Client *client)=0
Interprets a received message and executes the command.
common
net
subscriber.h
Generated on Sat Jun 19 2021 05:00:30 for Planeshift by
1.8.11