summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oprocess.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oprocess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oprocess.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opiecore/oprocess.h b/libopie2/opiecore/oprocess.h
index eb56b03..e23f98c 100644
--- a/libopie2/opiecore/oprocess.h
+++ b/libopie2/opiecore/oprocess.h
@@ -80,50 +80,50 @@ class OProcessPrivate;
*Since this signal is @em not emitted from within a UN*X
*signal handler, arbitrary function calls can be made.
*
*Be aware: When the OProcess objects gets destructed, the child
*process will be killed if it is still running!
*This means in particular, that you cannot use a OProcess on the stack
*with OProcess::NotifyOnExit.
*
*@li OProcess::Block -- The child process starts and the parent process
*is suspended until the child process exits. (@em Really not recommended
*for programs with a GUI.)
*
*OProcess also provides several functions for determining the exit status
*and the pid of the child process it represents.
*
*Furthermore it is possible to supply command-line arguments to the process
*in a clean fashion (no null -- terminated stringlists and such...)
*
*A small usage example:
*<pre>
*OProcess *proc = new OProcess;
*
**proc << "my_executable";
**proc << "These" << "are" << "the" << "command" << "line" << "args";
- *QApplication::connect(proc, SIGNAL(processExited(OProcess *)),
- * pointer_to_my_object, SLOT(my_objects_slot(OProcess *)));
+ *QApplication::connect(proc, SIGNAL(processExited(Opie::Core::OProcess *)),
+ * pointer_to_my_object, SLOT(my_objects_slot(Opie::Core::OProcess *)));
*proc->start();
*</pre>
*
*This will start "my_executable" with the commandline arguments "These"...
*
*When the child process exits, the respective Qt signal will be emitted.
*
*@sect Communication with the child process
*
*OProcess supports communication with the child process through
*stdin/stdout/stderr.
*
*The following functions are provided for getting data from the child
*process or sending data to the child's stdin (For more information,
*have a look at the documentation of each function):
*
*@li bool @ref writeStdin(char *buffer, int buflen);
*@li -- Transmit data to the child process's stdin.
*
*@li bool @ref closeStdin();
*@li -- Closes the child process's stdin (which causes it to see an feof(stdin)).
*Returns false if you try to close stdin for a process that has been started
*without a communication channel to stdin.
*
@@ -459,106 +459,106 @@ public:
*/
static QString quote( const QString &arg );
/**
* Detaches OProcess from child process. All communication is closed.
* No exit notification is emitted any more for the child process.
* Deleting the OProcess will no longer kill the child process.
* Note that the current process remains the parent process of the
* child process.
*/
void detach();
/**
* @return the PID of @a process, or -1 if the process is not running
*/
static int processPID( const QString& process );
signals:
/**
* Emitted after the process has terminated when
* the process was run in the @p NotifyOnExit (==default option to
* @ref start()) or the @ref Block mode.
**/
- void processExited( OProcess *proc );
+ void processExited( Opie::Core::OProcess *proc );
/**
* Emitted, when output from the child process has
* been received on stdout.
*
* To actually get
* these signals, the respective communication link (stdout/stderr)
* has to be turned on in @ref start().
*
* @param buffer The data received.
* @param buflen The number of bytes that are available.
*
* You should copy the information contained in @p buffer to your private
* data structures before returning from this slot.
**/
- void receivedStdout( OProcess *proc, char *buffer, int buflen );
+ void receivedStdout( Opie::Core::OProcess *proc, char *buffer, int buflen );
/**
* Emitted when output from the child process has
* been received on stdout.
*
* To actually get these signals, the respective communications link
* (stdout/stderr) has to be turned on in @ref start() and the
* @p NoRead flag should have been passed.
*
* You will need to explicitly call resume() after your call to start()
* to begin processing data from the child process's stdout. This is
* to ensure that this signal is not emitted when no one is connected
* to it, otherwise this signal will not be emitted.
*
* The data still has to be read from file descriptor @p fd.
**/
void receivedStdout( int fd, int &len );
/**
* Emitted, when output from the child process has
* been received on stderr.
* To actually get
* these signals, the respective communication link (stdout/stderr)
* has to be turned on in @ref start().
*
* @param buffer The data received.
* @param buflen The number of bytes that are available.
*
* You should copy the information contained in @p buffer to your private
* data structures before returning from this slot.
*/
- void receivedStderr( OProcess *proc, char *buffer, int buflen );
+ void receivedStderr( Opie::Core::OProcess *proc, char *buffer, int buflen );
/**
* Emitted after all the data that has been
* specified by a prior call to @ref writeStdin() has actually been
* written to the child process.
**/
- void wroteStdin( OProcess *proc );
+ void wroteStdin( Opie::Core::OProcess *proc );
protected slots:
/**
* This slot gets activated when data from the child's stdout arrives.
* It usually calls "childOutput"
*/
void slotChildOutput( int fdno );
/**
* This slot gets activated when data from the child's stderr arrives.
* It usually calls "childError"
*/
void slotChildError( int fdno );
/*
Slot functions for capturing stdout and stderr of the child
*/
/**
* Called when another bulk of data can be sent to the child's
* stdin. If there is no more data to be sent to stdin currently
* available, this function must disable the QSocketNotifier "innot".
*/
void slotSendData( int dummy );