kjavaprocess.h Source File (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kjavaprocess.h

    00001 // -*- c++ -*-
    00002
    00003 /* This file is part of the KDE project
    00004  *
    00005  * Copyright (C) 2000 Richard Moore <rich@kde.org>
    00006  *               2000 Wynn Wilkes <wynnw@caldera.com>
    00007  *
    00008  * This library is free software; you can redistribute it and/or
    00009  * modify it under the terms of the GNU Library General Public
    00010  * License as published by the Free Software Foundation; either
    00011  * version 2 of the License, or (at your option) any later version.
    00012  *
    00013  * This library is distributed in the hope that it will be useful,
    00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016  * Library General Public License for more details.
    00017  *
    00018  * You should have received a copy of the GNU Library General Public License
    00019  * along with this library; see the file COPYING.LIB.  If not, write to
    00020  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00021  * Boston, MA 02111-1307, USA.
    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 //QObject
    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 );
    00115     void sendSync( int ticket, char cmd_code, const QStringList& args );
    00119     void syncCommandReceived( int ticket );
    00125     void send( char cmd_code, const QStringList& args, const QByteArray& data );
    00126
    00127 protected slots:
    00133     void slotWroteData();
    00134
    00140     void slotReceivedData( int, int& );
    00144     void slotExited( KProcess *process );
    00145
    00146 protected:
    00147     virtual bool invokeJVM();
    00148     virtual void killJVM();
    00149
    00150     QByteArray* addArgs( char cmd_code, const QStringList& args );
    00151     void        popBuffer();
    00152     void        sendBuffer( QByteArray* buff );
    00153     void        storeSize( QByteArray* buff );
    00154
    00155     KProcess* javaProcess;
    00156
    00157 signals:
    00158     void received( const QByteArray& );
    00159     void exited( int status );
    00160
    00161 private:
    00162     KJavaProcessPrivate *d;
    00163
    00164 };
    00165
    00166 #endif // KJAVAPROCESS_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:34:11 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001