From 2eab969654eca2ef4b222790c8b730a6eb709565 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 9 Oct 2018 19:19:45 +0100 Subject: swaroop: required monitors checks. --- src/lib/monitor_checker.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/lib/monitor_checker.h (limited to 'src/lib/monitor_checker.h') diff --git a/src/lib/monitor_checker.h b/src/lib/monitor_checker.h new file mode 100644 index 000000000..4f856f41f --- /dev/null +++ b/src/lib/monitor_checker.h @@ -0,0 +1,45 @@ +/* + Copyright (C) 2018 Carl Hetherington + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see . + +*/ + +#include "signaller.h" +#include + +class MonitorChecker : public Signaller, public boost::noncopyable +{ +public: + ~MonitorChecker (); + + void run (); + + bool ok () const; + boost::signals2::signal StateChanged; + + static MonitorChecker* instance (); +private: + static MonitorChecker* _instance; + + MonitorChecker (); + void thread (); + + boost::thread* _thread; + mutable boost::mutex _mutex; + bool _terminate; + bool _ok; +}; -- cgit v1.2.3