X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FExternalSupport.h;h=5c5619c13b84520f582c70ba455c4d3ced9cabe3;hb=87a7f728ca9b8b4d358cf06de980f61b67a927ac;hp=9967c5dbad49b43eec664f41b7fb01248196ce71;hpb=821fc8dfb8ac68aa1de8f82560c697ed0888f6fe;p=lyx.git diff --git a/src/insets/ExternalSupport.h b/src/insets/ExternalSupport.h index 9967c5dbad..5c5619c13b 100644 --- a/src/insets/ExternalSupport.h +++ b/src/insets/ExternalSupport.h @@ -13,16 +13,25 @@ #ifndef EXTERNALSUPPORT_H #define EXTERNALSUPPORT_H -#include #include + +namespace lyx { + class Buffer; class ExportData; class InsetExternalParams; +class otexstream; -namespace lyx { namespace external { +enum RetVal { + SUCCESS, + NOT_NEEDED, + FAILURE, + KILLED +}; + class Template; /// A shorthand, helper function @@ -37,7 +46,8 @@ void editExternal(InsetExternalParams const & params, enum Substitute { ALL, PATHS, - ALL_BUT_PATHS + ALL_BUT_PATHS, + FORMATS }; /** Substitute meta-variables in string \p s, making use of \p params and @@ -49,10 +59,10 @@ enum Substitute { */ std::string const doSubstitution(InsetExternalParams const & params, Buffer const & buffer, - std::string const & s, - bool use_latex_path, + std::string const & s, + bool use_latex_path, bool external_in_tmpdir = false, - Substitute what = ALL); + Substitute what = ALL); /** Write the output for a specific file format @@ -60,12 +70,13 @@ std::string const doSubstitution(InsetExternalParams const & params, If \p external_in_tmpdir == true, then the generated file is place in the buffer's temporary directory. */ -int writeExternal(InsetExternalParams const &, - std::string const & format, - Buffer const &, - std::ostream &, - ExportData &, - bool external_in_tmpdir = false); +RetVal writeExternal(InsetExternalParams const &, + std::string const & format, + Buffer const &, + otexstream &, + ExportData &, + bool external_in_tmpdir, + bool dryrun); } // namespace external } // namespace lyx