aboutsummaryrefslogtreecommitdiffstats
path: root/src/RemoteControl.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-10 22:38:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-10 22:38:56 +0200
commit766f9f420aae19ecf282a32e7f9e2add275d9b14 (patch)
tree8c825ca608a9671e2647f5d3ecb6e41d67079412 /src/RemoteControl.h
parent975c4b40a2e5fbe8f5566f21c49db96a5a939127 (diff)
downloaddabmod-766f9f420aae19ecf282a32e7f9e2add275d9b14.tar.gz
dabmod-766f9f420aae19ecf282a32e7f9e2add275d9b14.tar.bz2
dabmod-766f9f420aae19ecf282a32e7f9e2add275d9b14.zip
Make telnet RC compile-time dependant on boost
Diffstat (limited to 'src/RemoteControl.h')
-rw-r--r--src/RemoteControl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/RemoteControl.h b/src/RemoteControl.h
index 11cd52c..1d9ea52 100644
--- a/src/RemoteControl.h
+++ b/src/RemoteControl.h
@@ -43,11 +43,14 @@
#include <string>
#include <atomic>
#include <iostream>
+#include <thread>
+#if defined(HAVE_BOOST)
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/foreach.hpp>
#include <boost/tokenizer.hpp>
#include <boost/thread.hpp>
+#endif
#include <stdexcept>
#include "Log.h"
@@ -192,7 +195,7 @@ class RemoteControllers {
extern RemoteControllers rcs;
-
+#if defined(HAVE_BOOST)
/* Implements a Remote controller based on a simple telnet CLI
* that listens on localhost
*/
@@ -254,12 +257,13 @@ class RemoteControllerTelnet : public BaseRemoteController {
/* This is set to true if a fault occurred */
std::atomic<bool> m_fault;
- boost::thread m_restarter_thread;
+ std::thread m_restarter_thread;
- boost::thread m_child_thread;
+ std::thread m_child_thread;
int m_port;
};
+#endif
#if defined(HAVE_ZEROMQ)
/* Implements a Remote controller using zmq transportlayer
@@ -299,12 +303,12 @@ class RemoteControllerZmq : public BaseRemoteController {
/* This is set to true if a fault occurred */
std::atomic<bool> m_fault;
- boost::thread m_restarter_thread;
+ std::thread m_restarter_thread;
zmq::context_t m_zmqContext;
std::string m_endpoint;
- boost::thread m_child_thread;
+ std::thread m_child_thread;
};
#endif