]> git.lyx.org Git - lyx.git/blobdiff - src/Exporter.h
Change string
[lyx.git] / src / Exporter.h
index 29c06ea831eb061b3bdbb5e5e4dfe57acd76380e..e4c5bcbc8248b5dda7388e3abc322017e978fed8 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef EXPORTER_H
 #define EXPORTER_H
 
-#include "support/filename.h"
+#include "support/FileName.h"
 
 #include <map>
 #include <string>
 
 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<Format const *> 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 {