- virtual bool Execute(char *data, int size = -1, wxDataFormat format = wxDF_TEXT ) = 0;
- virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxDF_TEXT); }
- virtual char *Request(const wxString& item, int *size = (int *) NULL, wxDataFormat format = wxDF_TEXT) = 0;
- virtual bool Poke(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT) = 0;
+ bool Execute(const void *data, size_t size, wxIPCFormat fmt = wxIPC_PRIVATE)
+ { return DoExecute(data, size, fmt); }
+ bool Execute(const char *s, size_t size = wxNO_LEN)
+ { return DoExecute(s, size == wxNO_LEN ? strlen(s) + 1
+ : size, wxIPC_TEXT); }
+ bool Execute(const wchar_t *ws, size_t size = wxNO_LEN)
+ { return DoExecute(ws, size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t)
+ : size, wxIPC_UNICODETEXT); }
+ bool Execute(const wxString& s)
+ {
+ const wxScopedCharBuffer buf = s.utf8_str();
+ return DoExecute(buf, strlen(buf) + 1, wxIPC_UTF8TEXT);
+ }
+ bool Execute(const wxCStrData& cs)
+ { return Execute(cs.AsString()); }
+
+ virtual const void *Request(const wxString& item,
+ size_t *size = NULL,
+ wxIPCFormat format = wxIPC_TEXT) = 0;
+
+ bool Poke(const wxString& item, const void *data, size_t size,
+ wxIPCFormat fmt = wxIPC_PRIVATE)
+ { return DoPoke(item, data, size, fmt); }
+ bool Poke(const wxString& item, const char *s, size_t size = wxNO_LEN)
+ { return DoPoke(item, s, size == wxNO_LEN ? strlen(s) + 1
+ : size, wxIPC_TEXT); }
+ bool Poke(const wxString& item, const wchar_t *ws, size_t size = wxNO_LEN)
+ { return DoPoke(item, ws,
+ size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t)
+ : size, wxIPC_UNICODETEXT); }
+ bool Poke(const wxString& item, const wxString s)
+ {
+ const wxScopedCharBuffer buf = s.utf8_str();
+ return DoPoke(item, buf, strlen(buf) + 1, wxIPC_UTF8TEXT);
+ }
+ bool Poke(const wxString& item, const wxCStrData& cs)
+ { return Poke(item, cs.AsString()); }
+