]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileMonitor.h
hopefully fix tex2lyx linking.
[lyx.git] / src / support / FileMonitor.h
index f91e3f2541d567e33e65c78501b2afdead641128..ba84bb549e26d4918040f4df67e37699333f5c9c 100644 (file)
@@ -1,10 +1,12 @@
 // -*- C++ -*-
-/*
+/**
  * \file FileMonitor.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Angus Leeming <leeming@lyx.org>
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS.
  *
  * FileMonitor monitors a file and informs a listener when that file has
  * changed.
 #ifndef FILEMONITOR_H
 #define FILEMONITOR_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "LString.h"
-
 #include <boost/utility.hpp>
 #include <boost/scoped_ptr.hpp>
-#include <boost/signals/signal0.hpp>
+#include <boost/signal.hpp>
+
+namespace lyx {
+namespace support {
 
 class FileMonitor : boost::noncopyable {
 public:
        /** Once monitoring begins, the file will be monitored every
         *  interval ms.
         */
-       FileMonitor(string const & file_with_path, int interval);
+       FileMonitor(std::string const & file_with_path, int interval);
 
        /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
        ~FileMonitor();
 
        ///
-       void reset(string const & file_with_path) const;
+       void reset(std::string const & file_with_path) const;
 
        ///
-       string const & filename() const;
+       std::string const & filename() const;
 
        /// Begin monitoring the file
        void start() const;
@@ -53,7 +52,8 @@ public:
        unsigned long checksum() const;
 
        /// Connect and you'll be informed when the file has changed.
-       typedef boost::signal0<void>::slot_type slot_type;
+       typedef boost::signal<void()> FileChangedSig;
+       typedef FileChangedSig::slot_type slot_type;
        ///
        boost::signals::connection connect(slot_type const &) const;
 
@@ -65,4 +65,7 @@ private:
        boost::scoped_ptr<Impl> const pimpl_;
 };
 
+} // namespace support
+} // namespace lyx
+
 #endif // FILEMONITOR_H