summaryrefslogtreecommitdiff
path: root/libopie/oprocess.h
authorzecke <zecke>2003-04-16 10:59:24 (UTC)
committer zecke <zecke>2003-04-16 10:59:24 (UTC)
commit5b9d1ddde859ff783f95babf1887fa40e6bfe0be (patch) (side-by-side diff)
tree0a8596c4de5145e5f469a6c0d8dbd2f946ef0817 /libopie/oprocess.h
parenteeb29547890a2d162de66d7d5b98d3840a7e2d79 (diff)
downloadopie-5b9d1ddde859ff783f95babf1887fa40e6bfe0be.zip
opie-5b9d1ddde859ff783f95babf1887fa40e6bfe0be.tar.gz
opie-5b9d1ddde859ff783f95babf1887fa40e6bfe0be.tar.bz2
API docu fixes...
if using \fn infront of a function make sure to name the right function ljp please see my comment in oticker about constness
Diffstat (limited to 'libopie/oprocess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/oprocess.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/libopie/oprocess.h b/libopie/oprocess.h
index bf5fe0e..f2853b0 100644
--- a/libopie/oprocess.h
+++ b/libopie/oprocess.h
@@ -37,25 +37,25 @@
#include <qvaluelist.h>
#include <qcstring.h>
#include <qobject.h>
class QSocketNotifier;
class OProcessPrivate;
/**
* Child process invocation, monitoring and control.
*
* @sect General usage and features
*
- *This class allows a KDE application to start child processes without having
+ *This class allows a KDE and OPIE application to start child processes without having
*to worry about UN*X signal handling issues and zombie process reaping.
*
*@see KProcIO
*
*Basically, this class distinguishes three different ways of running
*child processes:
*
*@li OProcess::DontCare -- The child process is invoked and both the child
*process and the parent process continue concurrently.
*
*Starting a DontCare child process means that the application is
*not interested in any notification to determine whether the
@@ -179,25 +179,31 @@ public:
* The application is notified when the subprocess dies.
*/
NotifyOnExit,
/**
* The application is suspended until the started process is finished.
*/
Block };
/**
* Constructor
*/
OProcess(QObject *parent = 0, const char *name = 0);
+ /**
+ * Constructor
+ */
OProcess(const QString &arg0, QObject *parent = 0, const char *name = 0);
+ /**
+ * Constructor
+ */
OProcess(const QStringList &args, QObject *parent = 0, const char *name = 0);
/**
*Destructor:
*
* If the process is running when the destructor for this class
* is called, the child process is killed with a SIGKILL, but
* only if the run mode is not of type @p DontCare.
* Processes started as @p DontCare keep running anyway.
*/
virtual ~OProcess();
@@ -401,33 +407,33 @@ public:
* Controls whether the started process should drop any
* setuid/segid privileges or whether it should keep them
*
* The default is @p false : drop privileges
*/
void setRunPrivileged(bool keepPrivileges);
/**
* Returns whether the started process will drop any
* setuid/segid privileges or whether it will keep them
*/
bool runPrivileged() const;
-
+
/**
* Modifies the environment of the process to be started.
* This function must be called before starting the process.
*/
void setEnvironment(const QString &name, const QString &value);
/**
- * Changes the current working directory (CWD) of the process
+ * Changes the current working directory (CWD) of the process
* to be started.
* This function must be called before starting the process.
*/
void setWorkingDirectory(const QString &dir);
/**
* Specify whether to start the command via a shell or directly.
* The default is to start the command directly.
* If @p useShell is true @p shell will be used as shell, or
* if shell is empty, the standard shell is used.
* @p quote A flag indicating whether to quote the arguments.
*
@@ -443,25 +449,25 @@ public:
* user-provided file names which may contain spaces or quotes.
* It also prevents expansion of wild cards and environment variables.
*/
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();
+ void detach();
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);
@@ -477,33 +483,33 @@ signals:
* @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);
/**
* 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
+ * 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().
*
@@ -541,25 +547,25 @@ protected slots:
*/
/**
* 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);
protected:
/**
- * Sets up the environment according to the data passed via
+ * Sets up the environment according to the data passed via
* setEnvironment(...)
*/
void setupEnvironment();
/**
* The list of the process' command line arguments. The first entry
* in this list is the executable itself.
*/
QValueList<QCString> arguments;
/**
* How to run the process (Block, NotifyOnExit, DontCare). You should
* not modify this data member directly from derived classes.
@@ -703,25 +709,25 @@ protected:
int input_sent; // # of bytes already transmitted
int input_total; // total length of input_data
/**
* @ref OProcessController is a friend of OProcess because it has to have
* access to various data members.
*/
friend class OProcessController;
private:
/**
- * Searches for a valid shell.
+ * Searches for a valid shell.
* Here is the algorithm used for finding an executable shell:
*
* @li Try the executable pointed to by the "SHELL" environment
* variable with white spaces stripped off
*
* @li If your process runs with uid != euid or gid != egid, a shell
* not listed in /etc/shells will not used.
*
* @li If no valid shell could be found, "/bin/sh" is used as a last resort.
*/
QCString searchShell();