00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __CMD_ServerSocketCommandListener_h__
00024 #define __CMD_ServerSocketCommandListener_h__
00025
00026 #include "CMD_API.h"
00027 #include <FS/FS_ServerSocketListener.h>
00028 #if !defined(GAMEOS)
00029 #include <UT/UT_Spawn.h>
00030 #endif
00031
00032 class UT_WorkBuffer;
00033 class CMD_Manager;
00034
00035 class CMD_API CMD_ServerSocketCommandListener : public FS_ServerSocketListener
00036 {
00037 public:
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 static CMD_ServerSocketCommandListener *createCommandListener(int port,
00050 CMD_Manager& command_manager,
00051 bool separate_errors = false,
00052 bool restrict_to_safe_commands = false,
00053 const char *ip_mask = 0,
00054 bool remap_privileged_ports = true,
00055 bool browser_mode = false);
00056
00057 virtual const char *className() const
00058 { return "CMD_ServerSocketCommandListener"; }
00059
00060 bool getRestrictToSafeCommands() const
00061 { return myRestrictToSafeCmds; }
00062 void setRestrictToSafeCommands(bool restrict_to_safe_cmds)
00063 { myRestrictToSafeCmds = restrict_to_safe_cmds; }
00064
00065 private:
00066
00067
00068 CMD_ServerSocketCommandListener(UT_NetSocket *server_socket,
00069 int requested_port,
00070 CMD_Manager &command_manager,
00071 bool separate_errors,
00072 bool restrict_to_safe_commands,
00073 const char *ip_mask,
00074 bool browser_mode);
00075
00076
00077
00078
00079 virtual void createConnectedSocketListener();
00080
00081
00082
00083
00084 CMD_Manager &myCommandManager;
00085 bool mySeparateErrors;
00086 bool myRestrictToSafeCmds;
00087 bool myBrowserMode;
00088 };
00089
00090 #endif