00001
00002
00003
00004
00005
00006
00007 #ifndef __Handler_h_included__
00008 #define __Handler_h_included__
00009
00010 #include <sys/types.h>
00011
00012 #include <tqcstring.h>
00013 #include "secure.h"
00014
00022 class ConnectionHandler: public SocketSecurity
00023 {
00024
00025 public:
00026 ConnectionHandler(int fd);
00027 ~ConnectionHandler();
00028
00030 int handle();
00031
00032
00033 void sendExitCode();
00034
00035 private:
00036 enum Results { Res_OK, Res_NO };
00037
00038 int doCommand(TQCString buf);
00039 void respond(int ok, TQCString s=0);
00040 TQCString makeKey(int namspace, TQCString s1, TQCString s2=0, TQCString s3=0);
00041
00042 int m_Fd, m_Timeout;
00043 int m_Priority, m_Scheduler;
00044 TQCString m_Buf, m_Pass, m_Host;
00045 public:
00046 int m_exitCode;
00047 bool m_hasExitCode;
00048 bool m_needExitCode;
00049 pid_t m_pid;
00050 };
00051
00052 #endif