diff --git a/application/commandlineutils.cpp b/application/commandlineutils.cpp index 8ce5790..5ca1c85 100644 --- a/application/commandlineutils.cpp +++ b/application/commandlineutils.cpp @@ -76,6 +76,24 @@ void startConsole() ios::sync_with_stdio(true); } +#ifdef PLATFORM_UNIX +/*! + * \brief Executes the specified \a app with the specified \a args. + * \param app Specifies the null-terminated application path. + * \param args Specifies the arguments as null-terminated array of null-terminated strings. + * \param outstring Specifies a string to save the standard output. + * \param errstring Specifies a string to save the standard error. + * \param outstream Specifies a stream to forward the standard output. + * \param errstream Specifies a stream to forward the standard error. + * \return Returns the return code. + * \throws Throws a std::runtime_error in case an error occurs. + */ +int execApp(const char *app, const char *const *args, string *outstring, string *errstring, ostream *outstream, ostream *errstream) +{ + +} +#endif + /*! * \brief Convert command line arguments to UTF-8. * \remarks Only available on Windows (on other platforms we can assume passed arguments are already UTF-8 encoded). diff --git a/application/commandlineutils.h b/application/commandlineutils.h index 91d841d..875b584 100644 --- a/application/commandlineutils.h +++ b/application/commandlineutils.h @@ -38,6 +38,10 @@ std::pair >, std::vector > CPP_UTILI # define CMD_UTILS_CONVERT_ARGS_TO_UTF8 #endif +#ifdef PLATFORM_UNIX +int execApp(const char *app, const char *const *args, std::string *outstring, std::string *errstring, std::ostream *outstream, std::ostream *errstream); +#endif + /*! * \brief The Indentation class allows printing indentation conveniently, eg. cout << Indentation(4) << ... */