Qtopia library API Documentation

process.h

00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #ifndef PROCESS_H
00022 #define PROCESS_H
00023 
00024 //#ifndef QT_H
00025 #include "qobject.h"
00026 #include "qstringlist.h"
00027 #include "qdir.h"
00028 //#endif // QT_H
00029 
00030 //#ifndef QT_NO_PROCESS
00031 
00032 class ProcessPrivate;
00033 
00034 //
00035 //
00036 //
00037 //
00038 //
00039 //
00040 //
00041 //
00042 //
00043 //
00044 //  This is a subset of the Process API found in Qt 3.0
00045 //
00046 //
00047 //
00048 //
00049 //
00050 //
00051 //
00052 //
00053 //
00054 //
00055 //
00056 
00057 class Q_EXPORT Process : public QObject
00058 {
00059     Q_OBJECT
00060 public:
00061     Process( QObject *parent=0, const char *name=0 );
00062     Process( const QString& arg0, QObject *parent=0, const char *name=0 );
00063     Process( const QStringList& args, QObject *parent=0, const char *name=0 );
00064     ~Process();
00065 
00066     // set and get the arguments and working directory
00067     QStringList arguments() const;
00068     virtual void setArguments( const QStringList& args );
00069     virtual void addArgument( const QString& arg );
00070     // control the execution
00071     virtual bool exec( const QString& in, QString& out, QStringList *env=0 );
00072     virtual bool exec( const QByteArray& in, QByteArray& out, QStringList *env=0 );
00073 
00074 private:
00075     void init();
00076 
00077 private:
00078     ProcessPrivate *d;
00079     QStringList _arguments;
00080 
00081     int  exitStat; // exit status
00082     bool exitNormal; // normal exit?
00083     bool ioRedirection; // automatically set be (dis)connectNotify
00084     bool notifyOnExit; // automatically set be (dis)connectNotify
00085     bool wroteToStdinConnected; // automatically set be (dis)connectNotify
00086 
00087     friend class ProcessPrivate;
00088     friend class ProcessManager;
00089     friend class Proc;
00090 };
00091 
00092 //#endif // QT_NO_PROCESS
00093 
00094 #endif // QPROCESS_H
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:06 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001