kjavaprocess.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef KJAVAPROCESS_H
00025 #define KJAVAPROCESS_H
00026 
00027 #include <kprocess.h>
00028 #include <qcstring.h>
00029 
00041 class KJavaProcessPrivate;
00042 class KJavaProcess : public KProcess 
00043 {
00044 Q_OBJECT
00045 
00046 public:
00051     KJavaProcess();
00052     virtual ~KJavaProcess();
00053 
00058     bool startJava();
00059 
00063     void stopJava();
00064 
00069     bool isRunning();
00070 
00074     void setJVMPath( const QString& path );
00075 
00083     void setClasspath( const QString& classpath );
00084 
00089     void setSystemProperty( const QString& name, const QString& value );
00090 
00094     void setMainClass( const QString& clazzName );
00095 
00099     void setExtraArgs( const QString& args );
00100 
00105     void setClassArgs( const QString& classArgs );
00106 
00111     void send( char cmd_code, const QStringList& args );
00112 
00118     void send( char cmd_code, const QStringList& args, const QByteArray& data );
00119 
00120 protected slots:
00126     void slotWroteData();
00127 
00133     void slotReceivedData( int, int& );
00137     void slotExited( KProcess *process );
00138 
00139 protected:
00140     virtual bool invokeJVM();
00141     virtual void killJVM();
00142 
00143     QByteArray* addArgs( char cmd_code, const QStringList& args );
00144     void        popBuffer();
00145     void        sendBuffer( QByteArray* buff );
00146     void        storeSize( QByteArray* buff );
00147 
00148     KProcess* javaProcess;
00149 
00150 signals:
00151     void received( const QByteArray& );
00152     void exited( int status );
00153 
00154 private:
00155     KJavaProcessPrivate *d;
00156 
00157 };
00158 
00159 #endif // KJAVAPROCESS_H
 
This file is part of the documentation for khtml Library Version 3.2.0.