]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.h
comment
[lyx.git] / src / VCBackend.h
index 9d9f1c9b47852906b14e0478c1df05260bd72e42..43e1027a9fef4d40cb0b4dacf6fbe5a3bed36de8 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef VC_BACKEND_H
 #define VC_BACKEND_H
 
-#include "support/filename.h"
+#include "support/FileName.h"
 
 #include <string>
 
@@ -36,12 +36,18 @@ public:
        virtual void registrer(std::string const & msg) = 0;
        /// check in the current revision
        virtual void checkIn(std::string const & msg) = 0;
+       // can be this operation processed in the current RCS?
+       virtual bool checkInEnabled() = 0;
        /// check out for editing
        virtual void checkOut() = 0;
+       // can be this operation processed in the current RCS?
+       virtual bool checkOutEnabled() = 0;
        /// revert current edits
        virtual void revert() = 0;
        /// FIXME
        virtual void undoLast() = 0;
+       // can be this operation processed in the current RCS?
+       virtual bool undoLastEnabled() = 0;
        /**
         * getLog - read the revision log into the given file
         * @param fname file name to read into
@@ -50,9 +56,7 @@ public:
        /// return the current version description
        virtual std::string const versionString() const = 0;
        /// return the current version
-       std::string const & version() const {
-               return version_;
-       }
+       std::string const & version() const { return version_; }
        /// return the user who has locked the file
        std::string const & locker() const { return locker_; }
        /// set the owning buffer
@@ -103,7 +107,7 @@ public:
        RCS(support::FileName const & m);
 
        /// return the revision file for the given file, if found
-       static support::FileName const find_file(support::FileName const & file);
+       static support::FileName const findFile(support::FileName const & file);
 
        static void retrieve(support::FileName const & file);
 
@@ -111,12 +115,18 @@ public:
 
        virtual void checkIn(std::string const & msg);
 
+       virtual bool checkInEnabled();
+
        virtual void checkOut();
 
+       virtual bool checkOutEnabled();
+
        virtual void revert();
 
        virtual void undoLast();
 
+       virtual bool undoLastEnabled();
+
        virtual void getLog(support::FileName const &);
 
        virtual std::string const versionString() const {
@@ -136,18 +146,24 @@ public:
        CVS(support::FileName const & m, support::FileName const & f);
 
        /// return the revision file for the given file, if found
-       static support::FileName const find_file(support::FileName const & file);
+       static support::FileName const findFile(support::FileName const & file);
 
        virtual void registrer(std::string const & msg);
 
        virtual void checkIn(std::string const & msg);
 
+       virtual bool checkInEnabled();
+
        virtual void checkOut();
 
+       virtual bool checkOutEnabled();
+
        virtual void revert();
 
        virtual void undoLast();
 
+       virtual bool undoLastEnabled();
+
        virtual void getLog(support::FileName const &);
 
        virtual std::string const versionString() const {