]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - win/inspircd_namedpipe.h
e6be0e4816d8fce3e0c9c0a083a4247a84a99db6
[user/henk/code/inspircd.git] / win / inspircd_namedpipe.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
5  *   Copyright (C) 2008 Craig Edwards <craigedwards@brainbox.cc>
6  *
7  * This file is part of InspIRCd.  InspIRCd is free software: you can
8  * redistribute it and/or modify it under the terms of the GNU General Public
9  * License as published by the Free Software Foundation, version 2.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20
21 #ifndef INSPIRCD_NAMEDPIPE
22 #define INSPIRCD_NAMEDPIPE
23
24 #include "threadengine.h"
25 #include <windows.h>
26
27 class IPCThread : public Thread
28 {
29         BOOL Connected;
30         DWORD BytesRead;
31         BOOL Success;
32         HANDLE Pipe;
33         char status[MAXBUF];
34         int result;
35  public:
36         IPCThread();
37         virtual ~IPCThread();
38         virtual void Run();
39         const char GetStatus();
40         int GetResult();
41         void ClearStatus();
42         void SetResult(int newresult);
43 };
44
45 class IPC
46 {
47  private:
48         IPCThread* thread;
49  public:
50         IPC();
51         void Check();
52         ~IPC();
53 };
54
55 #endif