From 07e829dc26b8b9d46a512c19290a7436c8f0e0e9 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Thu, 6 Jan 2000 16:57:30 +0000 Subject: [PATCH] Removing warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/ipcbase.h | 4 +-- include/wx/sckipc.h | 57 ++++++++++++++++++++++++------------------- src/common/sckipc.cpp | 15 ++++++------ 3 files changed, 42 insertions(+), 34 deletions(-) diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h index 354bce5f7e..f4531f16f8 100644 --- a/include/wx/ipcbase.h +++ b/include/wx/ipcbase.h @@ -42,8 +42,8 @@ enum wxIPCFormat wxIPC_PRIVATE = 20 }; -class WXDLLEXPORT wxDDEServerBase; -class WXDLLEXPORT wxDDEClientBase; +class WXDLLEXPORT wxServerBase; +class WXDLLEXPORT wxClientBase; class WXDLLEXPORT wxConnectionBase: public wxObject { diff --git a/include/wx/sckipc.h b/include/wx/sckipc.h index 87d414217c..939283e940 100644 --- a/include/wx/sckipc.h +++ b/include/wx/sckipc.h @@ -11,11 +11,12 @@ // (c) 2000 Guillermo Rodriguez // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// + #ifndef _WX_SCKIPC_H #define _WX_SCKIPC_H #ifdef __GNUG__ -#pragma interface +#pragma interface "sckipc.h" #endif #include "wx/defs.h" @@ -49,27 +50,13 @@ * */ -class wxTCPServer; -class wxTCPClient; -class wxTCPConnection: public wxConnectionBase +class WXDLLEXPORT wxTCPServer; +class WXDLLEXPORT wxTCPClient; + +class WXDLLEXPORT wxTCPConnection: public wxConnectionBase { DECLARE_DYNAMIC_CLASS(wxTCPConnection) - -protected: - wxSocketBase *m_sock; - wxSocketStream *m_sockstrm; - wxDataInputStream *m_codeci; - wxDataOutputStream *m_codeco; - wxString m_topic; - - friend class wxTCPServer; - friend class wxTCPClient; - friend void Client_OnRequest(wxSocketBase&, - wxSocketNotify, char *); - friend void Server_OnRequest(wxSocketServer&, - wxSocketNotify, char *); public: - wxTCPConnection(char *buffer, int size); wxTCPConnection(); virtual ~wxTCPConnection(); @@ -89,14 +76,20 @@ public: virtual bool Disconnect(void); // Callbacks to SERVER - override at will - virtual bool OnExecute(const wxString& topic, char *data, int size, wxIPCFormat format) { return FALSE; }; - virtual char *OnRequest(const wxString& topic, const wxString& item, int *size, wxIPCFormat format) { return NULL; }; - virtual bool OnPoke(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format) { return FALSE; }; - virtual bool OnStartAdvise(const wxString& topic, const wxString& item) { return FALSE; }; - virtual bool OnStopAdvise(const wxString& topic, const wxString& item) { return FALSE; }; + virtual bool OnExecute(const wxString& topic, char *data, int size, wxIPCFormat format) + { return wxConnectionBase::OnExecute(topic, data, size, format); }; + virtual char *OnRequest(const wxString& topic, const wxString& item, int *size, wxIPCFormat format) + { return wxConnectionBase::OnRequest(topic, item, size, format); }; + virtual bool OnPoke(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format) + { return wxConnectionBase::OnPoke(topic, item, data, size, format); }; + virtual bool OnStartAdvise(const wxString& topic, const wxString& item) + { return wxConnectionBase::OnStartAdvise(topic, item); }; + virtual bool OnStopAdvise(const wxString& topic, const wxString& item) + { return wxConnectionBase::OnStopAdvise(topic, item); }; // Callbacks to CLIENT - override at will - virtual bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format) { return FALSE; }; + virtual bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format) + { return wxConnectionBase::OnAdvise(topic, item, data, size, format); }; // Callbacks to BOTH @@ -106,6 +99,20 @@ public: // To enable the compressor void Compress(bool on); +protected: + wxSocketBase *m_sock; + wxSocketStream *m_sockstrm; + wxDataInputStream *m_codeci; + wxDataOutputStream *m_codeco; + wxString m_topic; + + friend class wxTCPServer; + friend class wxTCPClient; + friend void Client_OnRequest(wxSocketBase&, + wxSocketNotify, char *); + friend void Server_OnRequest(wxSocketServer&, + wxSocketNotify, char *); + private: }; diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 488ea062ba..80fe44212d 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -23,11 +23,12 @@ #pragma hdrstop #endif -#if wxUSE_SOCKETS - #ifndef WX_PRECOMP +#include "wx/defs.h" #endif +#if wxUSE_SOCKETS + #include #include @@ -41,7 +42,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase) IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase) -IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase) +IMPLEMENT_CLASS(wxTCPConnection, wxConnectionBase) // It seems to be already defined somewhere in the Xt includes. #ifndef __XT__ @@ -62,11 +63,11 @@ enum { #endif void Server_OnRequest(wxSocketServer& server, - wxSocketNotify evt, - char *cdata); + wxSocketNotify evt, + char *cdata); void Client_OnRequest(wxSocketBase& sock, - wxSocketNotify evt, - char *cdata); + wxSocketNotify evt, + char *cdata); // --------------------------------------------------------------------------- // wxTCPClient -- 2.45.2