// KreateCD - CD recording software for the K desktop environment
//
// 1999 by Alexander Feigl <Alexander.Feigl@gmx.de>
//
// This file is subject to the terms and conditions of the GNU General
// Public License.  See the file COPYING in the main directory of the
// KreateCD distribution for more details.

#include <qobject.h>
#include <kprocess.h>

class AudioFile;

class Fork : public KProcess
 {
  Q_OBJECT;

  public:
  Fork(int (*fx)(int argc,char **argv));
  Fork(int (*fx)(AudioFile *afi,const char *fn),AudioFile *afil,const char *fnx);

  bool start(enum KProcess::RunMode, enum KProcess::Communication);

  bool writeStdIn(char *buffer,int bufflen);

  private:
  int (*function)(int argc,char **argv);

  int (*function_af1)(AudioFile *afi,const char *fn);


  int fmode;
  AudioFile *AFile;


  char strarg[1024];

 };