wxChoice* GetServername() { return (wxChoice*) FindWindow( ID_SERVERNAME ); }
wxButton* GetDisconnect() { return (wxButton*) FindWindow( ID_DISCONNECT ); }
wxButton* GetAdvise() { return (wxButton*) FindWindow( ID_ADVISE ); }
wxChoice* GetServername() { return (wxChoice*) FindWindow( ID_SERVERNAME ); }
wxButton* GetDisconnect() { return (wxButton*) FindWindow( ID_DISCONNECT ); }
wxButton* GetAdvise() { return (wxButton*) FindWindow( ID_ADVISE ); }
virtual bool DoAdvise(const wxString& item, const void *data, size_t size, wxIPCFormat format);
virtual bool OnDisconnect();
virtual bool DoAdvise(const wxString& item, const void *data, size_t size, wxIPCFormat format);
virtual bool OnDisconnect();
- wxString m_sRequestDate;
- char m_achRequestBytes[3];
+ // the data returned by last OnRequest(): we keep it in this buffer to
+ // ensure that the pointer we return from OnRequest() stays valid
+ wxCharBuffer m_requestData;
- bool IsConnected() { return m_connection != NULL; };
- MyConnection *GetConnection() { return m_connection; };
+ bool IsConnected() { return m_connection != NULL; }
+ MyConnection *GetConnection() { return m_connection; }
+
- bool CanAdvise() { return m_connection != NULL && !m_connection->m_sAdvise.IsEmpty(); };
- wxConnectionBase *OnAcceptConnection(const wxString& topic);
+ bool CanAdvise() { return m_connection && !m_connection->m_advise.empty(); }
+
+ virtual wxConnectionBase *OnAcceptConnection(const wxString& topic);