X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fconverter.h;h=9cec2c122b132ddf1734532f4267eea9952ed688;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=84841e82a82a8358b3461c65a814d707ac64f4c8;hpb=c5a4f61f3377997a4b793481bd30a1a8e0627b86;p=lyx.git diff --git a/src/converter.h b/src/converter.h index 84841e82a8..9cec2c122b 100644 --- a/src/converter.h +++ b/src/converter.h @@ -19,6 +19,9 @@ #include +namespace lyx { + + class Buffer; class ErrorList; class Format; @@ -104,17 +107,21 @@ public: Graph::EdgePath const getPath(std::string const & from, std::string const & to); /// OutputParams::FLAVOR getFlavor(Graph::EdgePath const & path); + /// Flags for converting files + enum ConversionFlags { + /// No special flags + none = 0, + /// Use the default converter if no converter is defined + try_default = 1 << 0, + /// Get the converted file from cache if possible + try_cache = 1 << 1 + }; /// bool convert(Buffer const * buffer, - std::string const & from_file, std::string const & to_file_base, - std::string const & from_format, std::string const & to_format, - std::string & to_file, ErrorList & errorList, - bool try_default = false); - /// - bool convert(Buffer const * buffer, - std::string const & from_file, std::string const & to_file_base, - std::string const & from_format, std::string const & to_format, - ErrorList & errorList, bool try_default = false); + std::string const & from_file, std::string const & to_file, + std::string const & orig_from, + std::string const & from_format, std::string const & to_format, + ErrorList & errorList, int conversionflags = none); /// void update(Formats const & formats); /// @@ -157,4 +164,7 @@ extern Converters converters; extern Converters system_converters; + +} // namespace lyx + #endif //CONVERTER_H