Planeshift
actionhandler.h
Go to the documentation of this file.
1 /*
2 * actionhandler.h
3 *
4 * Copyright (C) 2005 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5 *
6 * Credits :
7 * Michael Cummings <cummings.michael@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation (version 2
12 * of the License).
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 *
21 * Creation Date: 1/20/2005
22 * Description : client handler for clickable map object actions
23 *
24 */
25 #ifndef ACTIONHANDLER_H
26 #define ACTIONHANDLER_H
27 //=============================================================================
28 // Crystal Space Includes
29 //=============================================================================
30 #include <csutil/parray.h>
31 #include <csutil/ref.h>
32 
33 //=============================================================================
34 // Project Includes
35 //=============================================================================
36 #include "net/cmdbase.h"
37 
38 //=============================================================================
39 // Local Includes
40 //=============================================================================
41 
42 class MsgHandler;
43 
51 {
52 public:
53 
54  ActionHandler( MsgHandler* mh, iObjectRegistry* object_reg );
55  virtual ~ActionHandler();
56  void HandleMessage( MsgEntry* me );
57 
72  void Query( const char* trigger, const char* sector, const char* mesh, int32_t poly, csVector3 pos );
73 
95  void Save( const char* id, const char* masterid, const char* name, const char* sector, const char* mesh,
96  const char* poly, const char* posx, const char* posy, const char* posz, const char* pos_instance, const char* radius,
97  const char* triggertype, const char* responsetype, const char* response, const char* active );
98 
108  void DeleteAction( const char* id );
109 
111  void ReloadCache( );
112 
113 protected:
114  iObjectRegistry* objectReg;
115  csRef<MsgHandler> msgHandler;
116 };
117 
118 #endif
119 
void Save(const char *id, const char *masterid, const char *name, const char *sector, const char *mesh, const char *poly, const char *posx, const char *posy, const char *posz, const char *pos_instance, const char *radius, const char *triggertype, const char *responsetype, const char *response, const char *active)
Command server to save an action location to the database.
virtual ~ActionHandler()
void Query(const char *trigger, const char *sector, const char *mesh, int32_t poly, csVector3 pos)
Creates and XML Query to send to the server.
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
ActionHandler(MsgHandler *mh, iObjectRegistry *object_reg)
iObjectRegistry * objectReg
void ReloadCache()
Resend the client actions back to the client.
csRef< MsgHandler > msgHandler
void DeleteAction(const char *id)
Command server to remove an action location.
This class is the client&#39;s and server&#39;s main interface for either sending network messages out or get...
Definition: msghandler.h:106
This class handles mode messages from the server, specifying actions for a clicked location...
Definition: actionhandler.h:50
void HandleMessage(MsgEntry *me)