-#ifndef INSPIRCD_NAMEDPIPE\r
-#define INSPIRCD_NAMEDPIPE\r
-\r
-#include "threadengine.h"\r
-#include <windows.h>\r
-\r
-class InspIRCd;\r
+#ifndef INSPIRCD_NAMEDPIPE
+#define INSPIRCD_NAMEDPIPE
+
+#include "threadengine.h"
+#include <windows.h>
class IPCThread : public Thread
{
- BOOL Connected;\r
- CHAR Request[MAXBUF];\r
- DWORD BytesRead;\r
- BOOL Success;\r
+ BOOL Connected;
+ DWORD BytesRead;
+ BOOL Success;
HANDLE Pipe;
- InspIRCd* ServerInstance;
+ char status[MAXBUF];
+ int result;
public:
- IPCThread(InspIRCd* Instance) : Thread(), ServerInstance(Instance)
- {
- }
-
- virtual ~IPCThread()
- {
- }
-
+ IPCThread();
+ virtual ~IPCThread();
virtual void Run();
+ const char GetStatus();
+ int GetResult();
+ void ClearStatus();
+ void SetResult(int newresult);
};
class IPC
{
private:
- InspIRCd* ServerInstance;
IPCThread* thread;
public:
- IPC(InspIRCd* Srv);
+ IPC();
void Check();
~IPC();
};
-#endif
\ No newline at end of file
+#endif