ComsAdminMessage.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #if !defined(__INCLUDE_ComsAdminMessageh_INCLUDE__)
00022 #define __INCLUDE_ComsAdminMessageh_INCLUDE__
00023 
00024 #include <coms/ComsMessage.h>
00025 
00026 class ComsAdminMessage : public ComsMessage
00027 {
00028 public:
00029         enum ComsAdminMessageType
00030         {
00031                 AdminNone,
00032                 AdminLogin,
00033                 AdminLoginLocal,
00034                 AdminLogout,
00035                 AdminShow,
00036                 AdminShowBanned,
00037                 AdminSyncCheck,
00038                 AdminKillAll,
00039                 AdminKick,
00040                 AdminSlap,
00041                 AdminPoor,
00042                 AdminBan,
00043                 AdminFlag,
00044                 AdminMute,
00045                 AdminPermMute,
00046                 AdminUnPermMute,
00047                 AdminUnMute,
00048                 AdminAdminTalk,
00049                 AdminTalk,
00050                 AdminMessage,
00051                 AdminNewGame,
00052                 AdminAdd
00053         };
00054 
00055         ComsAdminMessage(
00056                 unsigned int sid = 0,
00057                 ComsAdminMessageType type = AdminNone, 
00058                 const std::string &param1_ = "",
00059                 const std::string &param2_ = "");
00060         virtual ~ComsAdminMessage();
00061 
00062         unsigned int getSid() { return sid_; }
00063         ComsAdminMessageType getType() { return type_; }
00064         const char *getParam1() { return param1_.c_str(); }
00065         const char *getParam2() { return param2_.c_str(); }
00066 
00067         // Inherited from ComsMessage
00068         virtual bool writeMessage(NetBuffer &buffer);
00069         virtual bool readMessage(NetBufferReader &reader);
00070 
00071 protected:
00072         unsigned int sid_;
00073         ComsAdminMessageType type_;
00074         std::string param1_;
00075         std::string param2_;
00076 
00077 private:
00078         ComsAdminMessage(const ComsAdminMessage &);
00079         const ComsAdminMessage & operator=(const ComsAdminMessage &);
00080 
00081 };
00082 
00083 #endif // __INCLUDE_ComsAdminMessageh_INCLUDE__
00084 

Generated on Mon Feb 16 15:14:49 2009 for Scorched3D by  doxygen 1.5.3