* @brief UpdateChecker class.
*/
+#include "signaller.h"
#include <curl/curl.h>
#include <boost/signals2.hpp>
#include <boost/thread/mutex.hpp>
struct update_checker_test;
/** Class to check for the existance of an update for DCP-o-matic on a remote server */
-class UpdateChecker : public boost::noncopyable
+class UpdateChecker : public Signaller, public boost::noncopyable
{
public:
UpdateChecker ();
boost::mutex::scoped_lock lm (_data_mutex);
return _state;
}
-
+
/** @return new stable version, if there is one */
boost::optional<std::string> stable () {
boost::mutex::scoped_lock lm (_data_mutex);
boost::mutex::scoped_lock lm (_data_mutex);
return _test;
}
-
+
/** @return true if the last signal emission was the first */
bool last_emit_was_first () const {
boost::mutex::scoped_lock lm (_data_mutex);
private:
friend struct update_checker_test;
-
+
static UpdateChecker* _instance;
static bool version_less_than (std::string const & a, std::string const & b);