OSDN Git Service

Unit Cell dialog is being modified. Still not working very well.
[molby/Molby.git] / wxSources / MyIPCSupport.h
1 /*
2  *  MyIPCSupport.h
3  *  Molby
4  *
5  *  Created by Toshi Nagata on 12/10/10.
6  *  Copyright 2010 Toshi Nagata. All rights reserved.
7  *
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation version 2 of the License.
11  
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License for more details.
16  */
17
18 // For compilers that support precompilation, includes "wx/wx.h".
19 #include "wx/wxprec.h"
20
21 #if defined(__WXMSW__)
22
23 #include "wx/ipc.h"
24
25 #define MOLBY_IPC_TOPIC wxT("MOLBY_IPC_TOPIC")
26
27 extern wxString *gIPCServiceName;
28
29 class MyClientConnection: public wxConnection
30 {
31 public:
32         virtual bool OnDisconnect();
33 };
34
35 class MyClient: public wxClient
36 {
37 public:
38         MyClient();
39         ~MyClient();
40         void Disconnect();
41     wxConnectionBase *OnMakeConnection();
42         MyClientConnection *m_clientConnection;
43 };
44
45 class MyServerConnection: public wxConnection
46 {
47 public:
48         virtual bool OnDisconnect();
49         virtual bool OnExecute(const wxString& topic, wxChar* data, int size, wxIPCFormat format);
50 };
51
52 class MyServer: public wxServer
53 {
54 public:
55         MyServer();
56         ~MyServer();
57         void Disconnect();
58     wxConnectionBase *OnAcceptConnection(const wxString& topic);
59         MyServerConnection *m_serverConnection;
60 };
61
62 #endif // defined(__WXMSW__)