- wxInputStream *GetInputStream() const;
- wxOutputStream *GetOutputStream() const;
-
- // These functions should not be called by the usual user. They are only
- // intended to be used by wxExecute.
- // Install pipes
- void SetPipeStreams(wxInputStream *in_stream, wxOutputStream *out_stream);
- bool NeedPipe() const;
+ wxInputStream *GetInputStream() const { return m_inputStream; }
+ wxInputStream *GetErrorStream() const { return m_errorStream; }
+ wxOutputStream *GetOutputStream() const { return m_outputStream; }
+
+ // close the output stream indicating that nothing more will be written
+ void CloseOutput() { delete m_outputStream; m_outputStream = NULL; }
+
+ // return true if the child process stdout is not closed
+ bool IsInputOpened() const;
+
+ // return true if any input is available on the child process stdout/err
+ bool IsInputAvailable() const;
+ bool IsErrorAvailable() const;
+
+ // implementation only (for wxExecute)
+ //
+ // NB: the streams passed here should correspond to the child process
+ // stdout, stdin and stderr and here the normal naming convention is
+ // used unlike elsewhere in this class
+ void SetPipeStreams(wxInputStream *outStream,
+ wxOutputStream *inStream,
+ wxInputStream *errStream);
+#endif // wxUSE_STREAMS
+
+ // for backwards compatibility only, don't use
+#if WXWIN_COMPATIBILITY_2_2
+ wxProcess(wxEvtHandler *parent, bool redirect)
+ { Init(parent, wxID_ANY, redirect ? wxPROCESS_REDIRECT : wxPROCESS_DEFAULT); }
+#endif // WXWIN_COMPATIBILITY_2_2