]>
git.saurik.com Git - wxWidgets.git/blob - samples/ipc/server.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: DDE sample: server
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // Define a new application
14 class MyApp
: public wxApp
17 virtual bool OnInit();
27 class MyFrame
: public wxFrame
30 MyFrame(wxFrame
*frame
, const wxString
& title
);
32 void OnListBoxClick(wxCommandEvent
& event
);
33 void OnExit(wxCommandEvent
& event
);
42 class MyConnection
: public wxConnection
48 bool OnExecute(const wxString
& topic
, wxChar
*data
, int size
, wxIPCFormat format
);
49 wxChar
*OnRequest(const wxString
& topic
, const wxString
& item
, int *size
, wxIPCFormat format
);
50 bool OnPoke(const wxString
& topic
, const wxString
& item
, wxChar
*data
, int size
, wxIPCFormat format
);
51 bool OnStartAdvise(const wxString
& topic
, const wxString
& item
);
56 class MyServer
: public wxServer
59 wxConnectionBase
*OnAcceptConnection(const wxString
& topic
);
62 class IPCDialogBox
: public wxDialog
65 IPCDialogBox(wxWindow
*parent
,
66 const wxString
& title
,
69 MyConnection
*the_connection
);
72 void OnQuit(wxCommandEvent
& event
);
74 MyConnection
*m_connection
;
79 #define SERVER_EXIT wxID_EXIT
80 #define SERVER_LISTBOX 500
81 #define SERVER_QUIT_BUTTON 501