X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FExporter.h;h=e4c5bcbc8248b5dda7388e3abc322017e978fed8;hb=b271e3e06d778dbe7f20973c718f06d8aac0cf6f;hp=cd7c4d8bb2c98d4bfe6cf04417b3a891fbb134e5;hpb=138b23fac84930cdbfada0067c61480989041113;p=lyx.git diff --git a/src/Exporter.h b/src/Exporter.h index cd7c4d8bb2..e4c5bcbc82 100644 --- a/src/Exporter.h +++ b/src/Exporter.h @@ -22,32 +22,24 @@ namespace lyx { +enum CopyStatus { + SUCCESS, + FORCE, + CANCEL +}; -class Buffer; -class Format; -class Exporter { -public: - /// - static - bool Export(Buffer * buffer, std::string const & format, - bool put_in_tempdir, std::string & result_file); - /// - static - bool Export(Buffer * buffer, std::string const & format, - bool put_in_tempdir); - /// - static - bool preview(Buffer * buffer, std::string const & format); - /// - static - bool isExportable(Buffer const & buffer, std::string const & format); - /// - static - std::vector const - getExportableFormats(Buffer const & buffer, bool only_viewable); - /// -}; +/** copy file \p sourceFile to \p destFile. If \p force is false, the user + * will be asked before existing files are overwritten. + * \return + * - SUCCESS if this file got copied + * - FORCE if subsequent calls should not ask for confirmation before + * overwriting files anymore. + * - CANCEL if the export should be cancelled + */ +CopyStatus copyFile(std::string const & format, + support::FileName const & sourceFile, support::FileName const & destFile, + std::string const & latexFile, bool force); class ExportedFile {