]> git.saurik.com Git - wxWidgets.git/commitdiff
made strings used in wxIPC methods const as a temporary compilation fix (they will...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 27 Jul 2007 23:59:11 +0000 (23:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 27 Jul 2007 23:59:11 +0000 (23:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
docs/latex/wx/ddeconn.tex
docs/latex/wx/ipcconn.tex
docs/latex/wx/tcpconn.tex
include/wx/ipcbase.h
include/wx/msw/dde.h
include/wx/sckipc.h
samples/ipc/client.cpp
samples/ipc/client.h
samples/ipc/server.cpp
samples/ipc/server.h
src/common/sckipc.cpp
src/msw/dde.cpp

index 07e598dd69161e3b871e46c14d2a7ac9a7e77159..53dce0c606f408eafabc360799a6b98740162f30 100644 (file)
@@ -79,7 +79,7 @@ transactions.
 
 \membersection{wxDDEConnection::Advise}\label{wxddeconnectionadvise}
 
 
 \membersection{wxDDEConnection::Advise}\label{wxddeconnectionadvise}
 
-\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Advise}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the server application to advise the client of a change in
 the data associated with the given item. Causes the client
 
 Called by the server application to advise the client of a change in
 the data associated with the given item. Causes the client
@@ -140,7 +140,7 @@ accept the given data.
 
 \membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
 
 
 \membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
 
-\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
+\func{virtual const char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
 
 Message sent to the server application when the client
 calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
 
 Message sent to the server application when the client
 calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
@@ -166,7 +166,7 @@ this doesn't have much meaning in practice.
 
 \membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
 
 
 \membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
 
-\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Poke}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the client application to poke data into the server. Can be
 used to transfer arbitrary data to the server. Causes the server
 
 Called by the client application to poke data into the server. Can be
 used to transfer arbitrary data to the server. Causes the server
index 0463305be0bdd5277e8d3bad7bfed28ea3dc5e7a..f977f8da9f991b45ddc7f589d9d31ecd54b51580 100644 (file)
@@ -84,7 +84,7 @@ mainly for backwards compatibility.
 
 \membersection{wxConnection::Advise}\label{wxconnectionadvise}
 
 
 \membersection{wxConnection::Advise}\label{wxconnectionadvise}
 
-\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Advise}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the server application to advise the client of a change
 in the data associated with the given item. Causes the client
 
 Called by the server application to advise the client of a change
 in the data associated with the given item. Causes the client
@@ -148,7 +148,7 @@ accept the given data.
 
 \membersection{wxConnection::OnRequest}\label{wxconnectiononrequest}
 
 
 \membersection{wxConnection::OnRequest}\label{wxconnectiononrequest}
 
-\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
+\func{virtual const char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
 
 Message sent to the server application when the client calls 
 \helpref{wxConnection::Request}{wxconnectionrequest}. The
 
 Message sent to the server application when the client calls 
 \helpref{wxConnection::Request}{wxconnectionrequest}. The
@@ -176,7 +176,7 @@ this doesn't have much meaning in practice.
 
 \membersection{wxConnection::Poke}\label{wxconnectionpoke}
 
 
 \membersection{wxConnection::Poke}\label{wxconnectionpoke}
 
-\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Poke}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the client application to poke data into the server.
 Can be used to transfer arbitrary data to the server. Causes the
 
 Called by the client application to poke data into the server.
 Can be used to transfer arbitrary data to the server. Causes the
index a530e47064c230c354de67105f12bd25289c7268..b9316b36bd1e8eda44a7597290a572e934fa0010 100644 (file)
@@ -78,7 +78,7 @@ transactions.
 
 \membersection{wxTCPConnection::Advise}\label{wxtcpconnectionadvise}
 
 
 \membersection{wxTCPConnection::Advise}\label{wxtcpconnectionadvise}
 
-\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Advise}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the server application to advise the client of a change in
 the data associated with the given item. Causes the client
 
 Called by the server application to advise the client of a change in
 the data associated with the given item. Causes the client
@@ -139,7 +139,7 @@ accept the given data.
 
 \membersection{wxTCPConnection::OnRequest}\label{wxtcpconnectiononrequest}
 
 
 \membersection{wxTCPConnection::OnRequest}\label{wxtcpconnectiononrequest}
 
-\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
+\func{virtual const char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
 
 Message sent to the server application when the client
 calls \helpref{wxTCPConnection::Request}{wxtcpconnectionrequest}. The server
 
 Message sent to the server application when the client
 calls \helpref{wxTCPConnection::Request}{wxtcpconnectionrequest}. The server
@@ -165,7 +165,7 @@ this doesn't have much meaning in practice.
 
 \membersection{wxTCPConnection::Poke}\label{wxtcpconnectionpoke}
 
 
 \membersection{wxTCPConnection::Poke}\label{wxtcpconnectionpoke}
 
-\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
+\func{bool}{Poke}{\param{const wxString\& }{item}, \param{const char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
 
 Called by the client application to poke data into the server. Can be
 used to transfer arbitrary data to the server. Causes the server
 
 Called by the client application to poke data into the server. Can be
 used to transfer arbitrary data to the server. Causes the server
index e82287d1369647238fa2e6e6c46157c04e9f937a..660a3391219055a38c4c07418a3eb79067a8e727 100644 (file)
@@ -61,12 +61,12 @@ public:
   virtual bool Execute(const wxString& str)
     { return Execute(str.c_str(), -1, wxIPC_TEXT); }
   virtual wxChar *Request(const wxString& item, int *size = (int *) NULL, wxIPCFormat format = wxIPC_TEXT) = 0;
   virtual bool Execute(const wxString& str)
     { return Execute(str.c_str(), -1, wxIPC_TEXT); }
   virtual wxChar *Request(const wxString& item, int *size = (int *) NULL, wxIPCFormat format = wxIPC_TEXT) = 0;
-  virtual bool Poke(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
+  virtual bool Poke(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
   virtual bool StartAdvise(const wxString& item) = 0;
   virtual bool StopAdvise(const wxString& item) = 0;
 
   // Calls that SERVER can make
   virtual bool StartAdvise(const wxString& item) = 0;
   virtual bool StopAdvise(const wxString& item) = 0;
 
   // Calls that SERVER can make
-  virtual bool Advise(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
+  virtual bool Advise(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT) = 0;
 
   // Calls that both can make
   virtual bool Disconnect(void) = 0;
 
   // Calls that both can make
   virtual bool Disconnect(void) = 0;
@@ -78,11 +78,11 @@ public:
                                wxIPCFormat WXUNUSED(format) )
                              { return false; }
 
                                wxIPCFormat WXUNUSED(format) )
                              { return false; }
 
-  virtual wxChar *OnRequest    ( const wxString& WXUNUSED(topic),
-                               const wxString& WXUNUSED(item),
-                               int *WXUNUSED(size),
-                               wxIPCFormat WXUNUSED(format) )
-                             { return (wxChar *) NULL; }
+  virtual const wxChar *OnRequest ( const wxString& WXUNUSED(topic),
+                                    const wxString& WXUNUSED(item),
+                                    int *WXUNUSED(size),
+                                    wxIPCFormat WXUNUSED(format) )
+                                  { return (wxChar *) NULL; }
 
   virtual bool OnPoke        ( const wxString& WXUNUSED(topic),
                                const wxString& WXUNUSED(item),
 
   virtual bool OnPoke        ( const wxString& WXUNUSED(topic),
                                const wxString& WXUNUSED(item),
index 4595599738fdb0c27e2049b9c51034642d2a6f07..ae94324f63e175c7f6acd01c66bb6d90ad30aaa3 100644 (file)
@@ -56,12 +56,12 @@ public:
   virtual bool Execute(const wxString& str)
       { return Execute(str.c_str(), -1, wxIPC_TEXT); }
   virtual wxChar *Request(const wxString& item, int *size = NULL, wxIPCFormat format = wxIPC_TEXT);
   virtual bool Execute(const wxString& str)
       { return Execute(str.c_str(), -1, 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 Poke(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
   virtual bool StartAdvise(const wxString& item);
   virtual bool StopAdvise(const wxString& item);
 
   // Calls that SERVER can make
   virtual bool StartAdvise(const wxString& item);
   virtual bool StopAdvise(const wxString& item);
 
   // Calls that SERVER can make
-  virtual bool Advise(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
+  virtual bool Advise(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
 
   // Calls that both can make
   virtual bool Disconnect(void);
 
   // Calls that both can make
   virtual bool Disconnect(void);
@@ -75,9 +75,9 @@ public:
   wxDDEClient*  m_client;
 
   WXHCONV       m_hConv;
   wxDDEClient*  m_client;
 
   WXHCONV       m_hConv;
-  wxChar*       m_sendingData;
+  const wxChar* m_sendingData;
   int           m_dataSize;
   int           m_dataSize;
-  wxIPCFormat  m_dataType;
+  wxIPCFormat   m_dataType;
 
     DECLARE_NO_COPY_CLASS(wxDDEConnection)
 };
 
     DECLARE_NO_COPY_CLASS(wxDDEConnection)
 };
index a131e2b1fdf4f896930b2af5fd5dd6248b3d6bf4..e4b4064a760b9eb9dab8e8643cd1151ff6a67456 100644 (file)
@@ -64,12 +64,12 @@ public:
   // Calls that CLIENT can make
   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);
   // Calls that CLIENT can make
   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 Poke(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
   virtual bool StartAdvise(const wxString& item);
   virtual bool StopAdvise(const wxString& item);
 
   // Calls that SERVER can make
   virtual bool StartAdvise(const wxString& item);
   virtual bool StopAdvise(const wxString& item);
 
   // Calls that SERVER can make
-  virtual bool Advise(const wxString& item, wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
+  virtual bool Advise(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
 
   // Calls that both can make
   virtual bool Disconnect(void);
 
   // Calls that both can make
   virtual bool Disconnect(void);
index 7bca7c5e77ad582bdd8be1955dcf399242e17a4c..25dc58e45c676ea5dbcd4ac63e6793d7e7a8b139 100644 (file)
@@ -417,7 +417,7 @@ MyClient::~MyClient()
 // ----------------------------------------------------------------------------
 
 void MyConnection::Log(const wxString& command, const wxString& topic,
 // ----------------------------------------------------------------------------
 
 void MyConnection::Log(const wxString& command, const wxString& topic,
-    const wxString& item, wxChar *data, int size, wxIPCFormat format)
+    const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
     wxString s;
     if (topic.IsEmpty() && item.IsEmpty())
 {
     wxString s;
     if (topic.IsEmpty() && item.IsEmpty())
@@ -475,7 +475,7 @@ wxChar *MyConnection::Request(const wxString& item, int *size, wxIPCFormat forma
     return data;
 }
 
     return data;
 }
 
-bool MyConnection::Poke(const wxString& item, wxChar *data, int size, wxIPCFormat format)
+bool MyConnection::Poke(const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
     Log(_T("Poke"), wxEmptyString, item, data, size, format);
     return wxConnection::Poke(item, data, size, format);
 {
     Log(_T("Poke"), wxEmptyString, item, data, size, format);
     return wxConnection::Poke(item, data, size, format);
index c9e06778ff63cd1c78c84ab0dc1a41fbce22f66d..e08f9868c148bf958eface6ade27d6653144e1c2 100644 (file)
@@ -83,12 +83,12 @@ class MyConnection: public wxConnection
 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);
 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 Poke(const wxString& item, const 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 OnDisconnect();
 protected:
     void Log(const wxString& command, const wxString& topic,
     virtual bool OnAdvise(const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format);
     virtual bool OnDisconnect();
 protected:
     void Log(const wxString& command, const wxString& topic,
-        const wxString& item, wxChar *data, int size, wxIPCFormat format);
+        const wxString& item, const wxChar *data, int size, wxIPCFormat format);
 };
 
 class MyClient: public wxClient
 };
 
 class MyClient: public wxClient
index a4f01ac0a55fd7fa64b1def359e510ba89e346c1..11b50b40538d95403ebc637c2c4096127c9fccaf 100644 (file)
@@ -285,9 +285,9 @@ void MyServer::Advise()
     if (CanAdvise())
     {
         wxString s = wxDateTime::Now().Format();
     if (CanAdvise())
     {
         wxString s = wxDateTime::Now().Format();
-        m_connection->Advise(m_connection->m_sAdvise, (wxChar *)s.c_str());
+        m_connection->Advise(m_connection->m_sAdvise, s.c_str());
         s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate();
         s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate();
-        m_connection->Advise(m_connection->m_sAdvise, (wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar));
+        m_connection->Advise(m_connection->m_sAdvise, s.c_str(), (s.Length() + 1) * sizeof(wxChar));
 
 #if wxUSE_DDE_FOR_IPC
         wxLogMessage(_T("DDE Advise type argument cannot be wxIPC_PRIVATE. The client will receive it as wxIPC_TEXT, and receive the correct no of bytes, but not print a correct log entry."));
 
 #if wxUSE_DDE_FOR_IPC
         wxLogMessage(_T("DDE Advise type argument cannot be wxIPC_PRIVATE. The client will receive it as wxIPC_TEXT, and receive the correct no of bytes, but not print a correct log entry."));
@@ -327,25 +327,25 @@ bool MyConnection::OnPoke(const wxString& topic,
     return wxConnection::OnPoke(topic, item, data, size, format);
 }
 
     return wxConnection::OnPoke(topic, item, data, size, format);
 }
 
-wxChar *MyConnection::OnRequest(const wxString& topic,
+const wxChar *MyConnection::OnRequest(const wxString& topic,
     const wxString& item, int * size, wxIPCFormat format)
 {
     const wxString& item, int * size, wxIPCFormat format)
 {
-    wxChar *data;
+    const wxChar *data;
     if (item == _T("Date"))
     {
         m_sRequestDate = wxDateTime::Now().Format();
     if (item == _T("Date"))
     {
         m_sRequestDate = wxDateTime::Now().Format();
-        data = (wxChar *)m_sRequestDate.c_str();
+        data = m_sRequestDate.c_str();
         *size = -1;
     }    
     else if (item == _T("Date+len"))
     {
         m_sRequestDate = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate();
         *size = -1;
     }    
     else if (item == _T("Date+len"))
     {
         m_sRequestDate = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate();
-        data = (wxChar *)m_sRequestDate.c_str();
+        data = m_sRequestDate.c_str();
         *size = (m_sRequestDate.Length() + 1) * sizeof(wxChar);
     }    
     else if (item == _T("bytes[3]"))
     {
         *size = (m_sRequestDate.Length() + 1) * sizeof(wxChar);
     }    
     else if (item == _T("bytes[3]"))
     {
-        data = (wxChar *)m_achRequestBytes;
+        data = m_achRequestBytes;
         m_achRequestBytes[0] = '1'; m_achRequestBytes[1] = '2'; m_achRequestBytes[2] = '3';
         *size = 3;
     }
         m_achRequestBytes[0] = '1'; m_achRequestBytes[1] = '2'; m_achRequestBytes[2] = '3';
         *size = 3;
     }
@@ -379,7 +379,7 @@ bool MyConnection::OnStopAdvise(const wxString& topic,
 }
 
 void MyConnection::Log(const wxString& command, const wxString& topic,
 }
 
 void MyConnection::Log(const wxString& command, const wxString& topic,
-    const wxString& item, wxChar *data, int size, wxIPCFormat format)
+    const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
     wxString s;
     if (topic.IsEmpty() && item.IsEmpty())
 {
     wxString s;
     if (topic.IsEmpty() && item.IsEmpty())
@@ -407,7 +407,7 @@ void MyConnection::Log(const wxString& command, const wxString& topic,
         wxLogMessage(_T("%s[invalid data],%d)"), s.c_str(), size);
 }
 
         wxLogMessage(_T("%s[invalid data],%d)"), s.c_str(), size);
 }
 
-bool MyConnection::Advise(const wxString& item, wxChar *data, int size, wxIPCFormat format)
+bool MyConnection::Advise(const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
     Log(_T("Advise"), _T(""), item, data, size, format);
     return wxConnection::Advise(item, data, size, format);
 {
     Log(_T("Advise"), _T(""), item, data, size, format);
     return wxConnection::Advise(item, data, size, format);
index 5eeaa8549a91aeea6c4a64fd0b4cd2bb4a175eb2..6f4e0e7ce10e8a64ed478d7abe775d2cb00d6ba1 100644 (file)
@@ -70,14 +70,14 @@ public:
     ~MyConnection();
 
     virtual bool OnExecute(const wxString& topic, wxChar *data, int size, wxIPCFormat format);
     ~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 const 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 OnStartAdvise(const wxString& topic, const wxString& item);
     virtual bool OnStopAdvise(const wxString& topic, const wxString& item);
     virtual bool OnPoke(const wxString& topic, const wxString& item, wxChar *data, int 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 Advise(const wxString& item, const wxChar *data, int size = -1, wxIPCFormat format = wxIPC_TEXT);
     virtual bool OnDisconnect();
 protected:
     virtual bool OnDisconnect();
 protected:
-    void Log(const wxString& command, const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format);
+    void Log(const wxString& command, const wxString& topic, const wxString& item, const wxChar *data, int size, wxIPCFormat format);
 public:
     wxString        m_sAdvise;
 protected:
 public:
     wxString        m_sAdvise;
 protected:
index 9922b0d04c001bb706b8fd517370cc2a352d19d4..350b824257a15661a6c035c581d1b310ada7bd0d 100644 (file)
@@ -443,7 +443,7 @@ wxChar *wxTCPConnection::Request (const wxString& item, int *size, wxIPCFormat f
   }
 }
 
   }
 }
 
-bool wxTCPConnection::Poke (const wxString& item, wxChar *data, int size, wxIPCFormat format)
+bool wxTCPConnection::Poke (const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
   if (!m_sock->IsConnected())
     return false;
 {
   if (!m_sock->IsConnected())
     return false;
@@ -499,7 +499,7 @@ bool wxTCPConnection::StopAdvise (const wxString& item)
 
 // Calls that SERVER can make
 bool wxTCPConnection::Advise (const wxString& item,
 
 // Calls that SERVER can make
 bool wxTCPConnection::Advise (const wxString& item,
-                              wxChar *data, int size, wxIPCFormat format)
+                              const wxChar *data, int size, wxIPCFormat format)
 {
   if (!m_sock->IsConnected())
     return false;
 {
   if (!m_sock->IsConnected())
     return false;
@@ -648,7 +648,7 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event)
     format = (wxIPCFormat)codeci->Read8();
 
     int user_size = -1;
     format = (wxIPCFormat)codeci->Read8();
 
     int user_size = -1;
-    wxChar *user_data = connection->OnRequest (topic_name, item, &user_size, format);
+    const wxChar *user_data = connection->OnRequest (topic_name, item, &user_size, format);
 
     if (user_data)
     {
 
     if (user_data)
     {
index c9f1b2735e956edc6304c531b5e618809c42c0b2..158032342083a40a501f15f6f9c1a76d13a35bae 100644 (file)
@@ -606,7 +606,7 @@ wxChar *wxDDEConnection::Request(const wxString& item, int *size, wxIPCFormat fo
     return data;
 }
 
     return data;
 }
 
-bool wxDDEConnection::Poke(const wxString& item, wxChar *data, int size, wxIPCFormat format)
+bool wxDDEConnection::Poke(const wxString& item, const wxChar *data, int size, wxIPCFormat format)
 {
     DWORD result;
     if (size < 0)
 {
     DWORD result;
     if (size < 0)
@@ -670,7 +670,7 @@ bool wxDDEConnection::StopAdvise(const wxString& item)
 
 // Calls that SERVER can make
 bool wxDDEConnection::Advise(const wxString& item,
 
 // Calls that SERVER can make
 bool wxDDEConnection::Advise(const wxString& item,
-                             wxChar *data,
+                             const wxChar *data,
                              int size,
                              wxIPCFormat format)
 {
                              int size,
                              wxIPCFormat format)
 {
@@ -805,10 +805,10 @@ _DDECallback(WORD wType,
                     wxString item_name = DDEStringFromAtom(hsz2);
 
                     int user_size = -1;
                     wxString item_name = DDEStringFromAtom(hsz2);
 
                     int user_size = -1;
-                    wxChar *data = connection->OnRequest(connection->m_topicName,
-                                                       item_name,
-                                                       &user_size,
-                                                       (wxIPCFormat) wFmt);
+                    const wxChar *data = connection->OnRequest(connection->m_topicName,
+                                                               item_name,
+                                                               &user_size,
+                                                               (wxIPCFormat)wFmt);
                     if (data)
                     {
                         if (user_size < 0)
                     if (data)
                     {
                         if (user_size < 0)