Planeshift

actionhandler.h

Go to the documentation of this file.
00001 /*
00002 * actionhandler.h
00003 *
00004 * Copyright (C) 2005 Atomic Blue ([email protected], http://www.atomicblue.org)
00005 *
00006 * Credits : 
00007 *           Michael Cummings <[email protected]>
00008 *
00009 * This program is free software; you can redistribute it and/or
00010 * modify it under the terms of the GNU General Public License
00011 * as published by the Free Software Foundation (version 2
00012 * of the License).
00013 * This program is distributed in the hope that it will be useful,
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016 * GNU General Public License for more details.
00017 * You should have received a copy of the GNU General Public License
00018 * along with this program; if not, write to the Free Software
00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 *
00021 * Creation Date: 1/20/2005
00022 * Description : client handler for clickable map object actions
00023 *
00024 */
00025 #ifndef ACTIONHANDLER_H
00026 #define ACTIONHANDLER_H
00027 //=============================================================================
00028 // Crystal Space Includes
00029 //=============================================================================
00030 #include <csutil/parray.h>
00031 #include <csutil/ref.h>
00032 
00033 //=============================================================================
00034 // Project Includes
00035 //=============================================================================
00036 #include "net/cmdbase.h"
00037 
00038 //=============================================================================
00039 // Local Includes
00040 //=============================================================================
00041 
00042 class  MsgHandler;
00043 
00048 class ActionHandler : public psClientNetSubscriber
00049 {
00050 public:
00051 
00052     ActionHandler( MsgHandler* mh, iObjectRegistry* object_reg );
00053     virtual ~ActionHandler();
00054     void HandleMessage( MsgEntry* me );
00055 
00070     void Query( const char* trigger, const char* sector, const char* mesh, int32_t poly, csVector3 pos );
00071 
00093     void Save( const char* id, const char* masterid, const char* name, const char* sector, const char* mesh, 
00094         const char* poly, const char* posx, const char* posy, const char* posz, const char* pos_instance, const char* radius, 
00095         const char* triggertype, const char* responsetype, const char* response, const char* active );
00096 
00106     void DeleteAction( const char* id );
00107 
00109     void ReloadCache( );
00110     
00111 protected:
00112     iObjectRegistry*         objectReg;
00113     csRef<MsgHandler>        msgHandler;    
00114 };
00115 
00116 #endif
00117