X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fbfc5edf6a94d8ed0e2e73290f75090f68d34ae..41f6f17d01562aa09bdbcc6b02241b62f1d06b75:/samples/ipc/client.h?ds=sidebyside diff --git a/samples/ipc/client.h b/samples/ipc/client.h index 8c04e41c7f..b4a3ac0515 100644 --- a/samples/ipc/client.h +++ b/samples/ipc/client.h @@ -9,6 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "connection.h" + #define ID_START 10000 #define ID_DISCONNECT 10001 #define ID_STARTADVISE 10002 @@ -23,7 +25,6 @@ // Define a new application class MyClient; -class MyConnection; class MyFrame; class MyApp: public wxApp @@ -45,7 +46,7 @@ public: void OnExit(wxCommandEvent& event); void OnClose(wxCloseEvent& event); - void Enable(); + void EnableControls(); void Disconnect(); protected: @@ -78,17 +79,14 @@ protected: DECLARE_EVENT_TABLE() }; -class MyConnection: public wxConnection +class MyConnection : public MyConnectionBase { public: - virtual bool Execute(const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT); - virtual wxChar *Request(const wxString& item, int *size = NULL, wxIPCFormat format = wxIPC_TEXT); - virtual bool Poke(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT); - virtual bool OnAdvise(const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format); + virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format); + virtual const void *Request(const wxString& item, size_t *size = NULL, wxIPCFormat format = wxIPC_TEXT); + virtual bool DoPoke(const wxString& item, const void* data, size_t size, wxIPCFormat format); + virtual bool OnAdvise(const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format); virtual bool OnDisconnect(); -protected: - void Log(const wxString& command, const wxString& topic, - const wxString& item, wxChar *data, int size, wxIPCFormat format); }; class MyClient: public wxClient @@ -105,4 +103,3 @@ public: protected: MyConnection *m_connection; }; -