/*
    knetd, KDE Network Daemon

    Copyright (c) 2005 by Engin AYDOGAN		<engin @ bzzzt.biz>

    *************************************************************************
    *                                                                       *
    * 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.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef PROCESS_WRAPPER_H_
#define PROCESS_WRAPPER_H_

#include <kprocess.h>

class ProcessWrapper : public KProcess
{
Q_OBJECT
public:
	ProcessWrapper();
	
	bool
	start( RunMode r = NotifyOnExit, Communication c = AllOutput );

	const QString&
	stdoutBuf() const;

	const QString&
	stderrBuf() const;
public slots:
	void slotStdout( KProcess*, char*, int );
	void slotStderr( KProcess*, char*, int );
	void slotExited( KProcess* );
signals:
	void stdoutReady( const QString& );
	void stderrReady( const QString& );
private:
	QString m_stdoutBuf;
	QString m_stderrBuf;
};

#endif
