Diffstat (limited to 'libopie2/opiecore/oprocess.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/oprocess.h | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/libopie2/opiecore/oprocess.h b/libopie2/opiecore/oprocess.h index 8dd19b5..352485b 100644 --- a/libopie2/opiecore/oprocess.h +++ b/libopie2/opiecore/oprocess.h @@ -1,33 +1,40 @@ -/* This file is part of the KDE libraries - Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. +/* + This file is part of the Opie Project + Copyright (C) 2003-2004 Holger Freyther <zecke@handhelds.org> + Copyright (C) The Opie Team <opie-devel@handhelds.org> + =. Based on KProcess (C) 1997 Christian Czezatke (e9025461@student.tuwien.ac.at) + .=l. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -// -// KPROCESS -- A class for handling child processes in KDE without -// having to take care of Un*x specific implementation details -// -// version 0.3.1, Jan 8th 1998 -// -// (C) Christian Czezatke -// e9025461@student.tuwien.ac.at -// Ported by Holger Freyther to the Open Palmtop Integrated Environment -// - -#ifndef __kprocess_h__ -#define __kprocess_h__ +#ifndef OPROCESS_H +#define OPROCESS_H + +/* QT */ +#include <qcstring.h> +#include <qobject.h> +#include <qvaluelist.h> + +/* STD */ #include <sys/types.h> // for pid_t @@ -36,5 +43,2 @@ #include <unistd.h> -#include <qvaluelist.h> -#include <qcstring.h> -#include <qobject.h> @@ -143,3 +147,3 @@ class OProcessPrivate; *@author Christian Czezakte e9025461@student.tuwien.ac.at - * + *@author Holger Freyther (Opie Port) * @@ -189,3 +193,3 @@ public: */ - OProcess(QObject *parent = 0, const char *name = 0); + OProcess( QObject *parent = 0, const char *name = 0 ); /** @@ -193,3 +197,3 @@ public: */ - OProcess(const QString &arg0, QObject *parent = 0, const char *name = 0); + OProcess( const QString &arg0, QObject *parent = 0, const char *name = 0 ); /** @@ -197,3 +201,3 @@ public: */ - OProcess(const QStringList &args, QObject *parent = 0, const char *name = 0); + OProcess( const QStringList &args, QObject *parent = 0, const char *name = 0 ); @@ -222,3 +226,3 @@ public: */ - bool setExecutable(const QString& proc); + bool setExecutable( const QString& proc ); @@ -236,3 +240,3 @@ public: **/ - OProcess &operator<<(const QString& arg); + OProcess &operator<<( const QString& arg ); /** @@ -240,3 +244,3 @@ public: */ - OProcess &operator<<(const char * arg); + OProcess &operator<<( const char * arg ); /** @@ -244,3 +248,3 @@ public: */ - OProcess &operator<<(const QCString & arg); + OProcess &operator<<( const QCString & arg ); @@ -250,3 +254,3 @@ public: **/ - OProcess &operator<<(const QStringList& args); + OProcess &operator<<( const QStringList& args ); @@ -280,4 +284,4 @@ public: **/ - virtual bool start(RunMode runmode = NotifyOnExit, - Communication comm = NoCommunication); + virtual bool start( RunMode runmode = NotifyOnExit, + Communication comm = NoCommunication ); @@ -289,3 +293,3 @@ public: */ - virtual bool kill(int signo = SIGTERM); + virtual bool kill( int signo = SIGTERM ); @@ -335,3 +339,3 @@ public: */ - int exitStatus() const; + int exitStatus() const; @@ -362,3 +366,3 @@ public: **/ - bool writeStdin(const char *buffer, int buflen); + bool writeStdin( const char *buffer, int buflen ); @@ -397,3 +401,6 @@ public: - const QValueList<QCString> &args() { return arguments; } + const QValueList<QCString> &args() + { + return arguments; + } @@ -405,3 +412,3 @@ public: */ - void setRunPrivileged(bool keepPrivileges); + void setRunPrivileged( bool keepPrivileges ); @@ -417,3 +424,3 @@ public: */ - void setEnvironment(const QString &name, const QString &value); + void setEnvironment( const QString &name, const QString &value ); @@ -424,3 +431,3 @@ public: */ - void setWorkingDirectory(const QString &dir); + void setWorkingDirectory( const QString &dir ); @@ -437,3 +444,3 @@ public: */ - void setUseShell(bool useShell, const char *shell = 0); + void setUseShell( bool useShell, const char *shell = 0 ); @@ -445,3 +452,3 @@ public: */ - static QString quote(const QString &arg); + static QString quote( const QString &arg ); @@ -456,4 +463,2 @@ public: - - signals: @@ -465,3 +470,3 @@ signals: **/ - void processExited(OProcess *proc); + void processExited( OProcess *proc ); @@ -482,3 +487,3 @@ signals: **/ - void receivedStdout(OProcess *proc, char *buffer, int buflen); + void receivedStdout( OProcess *proc, char *buffer, int buflen ); @@ -499,3 +504,3 @@ signals: **/ - void receivedStdout(int fd, int &len); + void receivedStdout( int fd, int &len ); @@ -515,3 +520,3 @@ signals: */ - void receivedStderr(OProcess *proc, char *buffer, int buflen); + void receivedStderr( OProcess *proc, char *buffer, int buflen ); @@ -522,4 +527,3 @@ signals: **/ - void wroteStdin(OProcess *proc); - + void wroteStdin( OProcess *proc ); @@ -531,3 +535,3 @@ protected slots: */ - void slotChildOutput(int fdno); + void slotChildOutput( int fdno ); @@ -537,3 +541,3 @@ protected slots: */ - void slotChildError(int fdno); + void slotChildError( int fdno ); /* @@ -547,3 +551,3 @@ protected slots: */ - void slotSendData(int dummy); + void slotSendData( int dummy ); @@ -626,3 +630,3 @@ protected: */ - virtual int setupCommunication(Communication comm); + virtual int setupCommunication( Communication comm ); @@ -656,3 +660,3 @@ protected: */ - virtual void processHasExited(int state); + virtual void processHasExited( int state ); @@ -668,5 +672,5 @@ protected: */ - int out[2]; - int in[2]; - int err[2]; + int out[ 2 ]; + int in[ 2 ]; + int err[ 2 ]; @@ -690,3 +694,3 @@ protected: */ - int childOutput(int fdno); + int childOutput( int fdno ); @@ -697,3 +701,3 @@ protected: */ - int childError(int fdno); + int childError( int fdno ); @@ -711,3 +715,2 @@ protected: - private: @@ -731,3 +734,3 @@ private: */ - bool isExecutable(const QCString &filename); + bool isExecutable( const QCString &filename ); @@ -739,3 +742,2 @@ private: void init ( ); - OProcessPrivate *d; @@ -743,4 +745,2 @@ private: - - #endif |