X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d86099269660fb9eab4d146e625cb2a5fff9c14..4c49b6ff73650333b3665e6f47771dd9f4c95c92:/samples/ipc/server.h diff --git a/samples/ipc/server.h b/samples/ipc/server.h index 5eeaa8549a..0c0238f1eb 100644 --- a/samples/ipc/server.h +++ b/samples/ipc/server.h @@ -9,6 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "connection.h" + #define ID_START 10000 #define ID_DISCONNECT 10001 #define ID_ADVISE 10002 @@ -17,7 +19,6 @@ // Define a new application class MyServer; -class MyConnection; class MyFrame; class MyApp : public wxApp @@ -63,26 +64,22 @@ protected: DECLARE_EVENT_TABLE() }; -class MyConnection : public wxConnection +class MyConnection : public MyConnectionBase { public: - MyConnection(); - ~MyConnection(); - - virtual bool OnExecute(const wxString& topic, wxChar *data, int size, wxIPCFormat format); - virtual wxChar *OnRequest(const wxString& topic, const wxString& item, int *size, wxIPCFormat format); - virtual bool OnPoke(const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format); + virtual bool OnExecute(const wxString& topic, const void *data, size_t size, wxIPCFormat format); + virtual const void *OnRequest(const wxString& topic, const wxString& item, size_t *size, wxIPCFormat format); + virtual bool OnPoke(const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format); virtual bool OnStartAdvise(const wxString& topic, const wxString& item); virtual bool OnStopAdvise(const wxString& topic, const wxString& item); - virtual bool Advise(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT); + virtual bool DoAdvise(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); -public: + wxString m_sAdvise; + protected: wxString m_sRequestDate; - char m_achRequestBytes[3]; + char m_achRequestBytes[3]; }; class MyServer: public wxServer