/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __EXECUTOR_H
#define __EXECUTOR_H

class QString;
class QCString;
class QStringList;

/** @brief Executes an application and provides easy access to it's output.
  *
  * This class does not directly execute the given commands,
  * but uses a shell, so pipes (|), I/O redirection (<, >, 2>),
  * file patterns and special shell variables ($$, ...) can
  * be used.
  *
  * @attention
  * Be aware that these functions block the execution of
  * the calling process as long as the invoked process is
  * running; as a consequence, the user interface won't
  * react on user interaction!
  */
class Executor {
public:
    enum ReturnStatus {
        NoError = 0
    };

    static	int			exec(const char *);
    static	int			intFromCmd(const char *);
    static	QString		strFromCmd(const char *);
    static	QCString		cstrFromCmd(const char *);
    static	QStringList	strlistFromCmd(const char *);
};


#endif /* __EXECUTOR_H */
