/***************************************************************************
                            QProcess.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QProcessSignals} for signals emitted by QProcess.

 See {@link QProcessEventHandling} for event handlers to override in subclasses of QProcess.

*/
public class QProcess extends QObject  {
	protected QProcess(Class dummy){super((Class) null);}

	private native void newQProcess( QObject parent, String name);
	public QProcess( QObject parent, String name) {
		super((Class) null);
		newQProcess( parent, name);
	}
	private native void newQProcess();
	public QProcess() {
		super((Class) null);
		newQProcess();
	}
	private native void newQProcess( String arg0, QObject parent, String name);
	public QProcess( String arg0, QObject parent, String name) {
		super((Class) null);
		newQProcess( arg0, parent, name);
	}
	private native void newQProcess( String arg0);
	public QProcess( String arg0) {
		super((Class) null);
		newQProcess( arg0);
	}
	private native void newQProcess( String[] args, QObject parent, String name);
	public QProcess( String[] args, QObject parent, String name) {
		super((Class) null);
		newQProcess( args, parent, name);
	}
	private native void newQProcess( String[] args);
	public QProcess( String[] args) {
		super((Class) null);
		newQProcess( args);
	}
	protected native void finalize() throws InternalError;
	public native ArrayList arguments();
	public native void clearArguments();
	public native void setArguments( String[] args);
	public native void addArgument( String arg);
	public native QDir workingDirectory();
	public native void setWorkingDirectory( QDir dir);
	public native void setCommunication( int c);
	public native int communication();
	public native boolean start( String[] env);
	public native boolean start();
	public native boolean launch( String buf, String[] env);
	public native boolean launch( String buf);
	public native boolean launch( byte[] buf, String[] env);
	public native boolean launch( byte[] buf);
	public native boolean isRunning();
	public native boolean normalExit();
	public native int exitStatus();
	public native byte[] readStdout();
	public native byte[] readStderr();
	public native boolean canReadLineStdout();
	public native boolean canReadLineStderr();
	public native String readLineStdout();
	public native String readLineStderr();
	public native long processIdentifier();
	public native void flushStdin();
	public native void tryTerminate();
	public native void kill();
	public native void writeToStdin( byte[] buf);
	public native void writeToStdin( String buf);
	public native void closeStdin();
	protected native void connectNotify( String signal);
	protected native void disconnectNotify( String signal);
	public static final int Stdin = 0x01;
	public static final int Stdout = 0x02;
	public static final int Stderr = 0x04;
	public static final int DupStderr = 0x08;
}
