OSDN Git Service

GUI終了時のエラー落ちを修正(?)
[peercast-im/PeerCastIM.git] / c: / Git / PeerCast.root / PeerCast / core / win32 / wsys.h
1 // ------------------------------------------------
2 // File : wsys.h
3 // Date: 4-apr-2002
4 // Author: giles
5 // Desc: 
6 //              WSys derives from Sys to provide basic win32 functions such as starting threads.
7 //
8 // (c) 2002 peercast.org
9 // ------------------------------------------------
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2 of the License, or
13 // (at your option) any later version.
14
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 // GNU General Public License for more details.
19 // ------------------------------------------------
20
21
22
23 #ifndef _WSYS_H
24 #define _WSYS_H
25 // ------------------------------------
26 #include <windows.h>
27 #include "socket.h"
28 #include "sys.h"
29
30 // ------------------------------------
31 class WSys : public Sys
32 {
33 public:
34         WSys(HWND);
35
36         virtual ClientSocket    *createSocket();
37         virtual bool                    startThread(ThreadInfo *);
38         virtual void                    sleep(int );
39         virtual void                    appMsg(long,long);
40         virtual unsigned int    getTime();
41         virtual double                  getDTime();             
42         virtual unsigned int    rnd() {return rndGen.next();}
43         virtual void                    getURL(const char *);
44         virtual void                    exit();
45         virtual bool                    hasGUI() {return mainWindow!=NULL;}
46         virtual void                    callLocalURL(const char *str,int port);
47         virtual void                    executeFile(const char *);
48         virtual void                    endThread(ThreadInfo *);
49         virtual void                    waitThread(ThreadInfo *, int timeout = 30000);
50
51
52         HWND    mainWindow;
53         peercast::Random rndGen;
54 };                               
55
56
57 // ------------------------------------
58 #endif
59
60
61