//******************************************************************************
//  Copyright (c) 2005-2011 by Jan Van hijfte
//
//  See the included file COPYING.TXT for details about the copyright.
//
//  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.
//******************************************************************************


#ifndef QPROCESS_C_H
#define QPROCESS_C_H

#include <QtCore>
#include "pascalbind.h"

C_EXPORT QProcessH QProcess_create(QObjectH parent);
C_EXPORT void QProcess_destroy(QProcessH handle);
C_EXPORT void QProcess_start(QProcessH handle, PWideString program, const QStringListH arguments, unsigned int mode);
C_EXPORT void QProcess_start2(QProcessH handle, PWideString program, unsigned int mode);
C_EXPORT QProcess::ProcessChannelMode QProcess_readChannelMode(QProcessH handle);
C_EXPORT void QProcess_setReadChannelMode(QProcessH handle, QProcess::ProcessChannelMode mode);
C_EXPORT QProcess::ProcessChannelMode QProcess_processChannelMode(QProcessH handle);
C_EXPORT void QProcess_setProcessChannelMode(QProcessH handle, QProcess::ProcessChannelMode mode);
C_EXPORT QProcess::ProcessChannel QProcess_readChannel(QProcessH handle);
C_EXPORT void QProcess_setReadChannel(QProcessH handle, QProcess::ProcessChannel channel);
C_EXPORT void QProcess_closeReadChannel(QProcessH handle, QProcess::ProcessChannel channel);
C_EXPORT void QProcess_closeWriteChannel(QProcessH handle);
C_EXPORT void QProcess_setStandardInputFile(QProcessH handle, PWideString fileName);
C_EXPORT void QProcess_setStandardOutputFile(QProcessH handle, PWideString fileName, unsigned int mode);
C_EXPORT void QProcess_setStandardErrorFile(QProcessH handle, PWideString fileName, unsigned int mode);
C_EXPORT void QProcess_setStandardOutputProcess(QProcessH handle, QProcessH destination);
C_EXPORT void QProcess_workingDirectory(QProcessH handle, PWideString retval);
C_EXPORT void QProcess_setWorkingDirectory(QProcessH handle, PWideString dir);
C_EXPORT void QProcess_setEnvironment(QProcessH handle, const QStringListH environment);
C_EXPORT void QProcess_environment(QProcessH handle, QStringListH retval);
C_EXPORT QProcess::ProcessError QProcess_error(QProcessH handle);
C_EXPORT QProcess::ProcessState QProcess_state(QProcessH handle);
C_EXPORT Q_PID QProcess_pid(QProcessH handle);
C_EXPORT bool QProcess_waitForStarted(QProcessH handle, int msecs);
C_EXPORT bool QProcess_waitForReadyRead(QProcessH handle, int msecs);
C_EXPORT bool QProcess_waitForBytesWritten(QProcessH handle, int msecs);
C_EXPORT bool QProcess_waitForFinished(QProcessH handle, int msecs);
C_EXPORT void QProcess_readAllStandardOutput(QProcessH handle, QByteArrayH retval);
C_EXPORT void QProcess_readAllStandardError(QProcessH handle, QByteArrayH retval);
C_EXPORT int QProcess_exitCode(QProcessH handle);
C_EXPORT QProcess::ExitStatus QProcess_exitStatus(QProcessH handle);
C_EXPORT qint64 QProcess_bytesAvailable(QProcessH handle);
C_EXPORT qint64 QProcess_bytesToWrite(QProcessH handle);
C_EXPORT bool QProcess_isSequential(QProcessH handle);
C_EXPORT bool QProcess_canReadLine(QProcessH handle);
C_EXPORT void QProcess_close(QProcessH handle);
C_EXPORT bool QProcess_atEnd(QProcessH handle);
C_EXPORT int QProcess_execute(PWideString program, const QStringListH arguments);
C_EXPORT int QProcess_execute2(PWideString program);
C_EXPORT bool QProcess_startDetached(PWideString program, const QStringListH arguments, PWideString workingDirectory, qint64* pid);
C_EXPORT bool QProcess_startDetached2(PWideString program, const QStringListH arguments);
C_EXPORT bool QProcess_startDetached3(PWideString program);
C_EXPORT void QProcess_systemEnvironment(QStringListH retval);
C_EXPORT void QProcess_terminate(QProcessH handle);
C_EXPORT void QProcess_kill(QProcessH handle);

#endif
