WIP: adding service files, still not working

This commit is contained in:
emeric
2014-04-03 09:19:35 +02:00
parent 10d1464ca2
commit 886b3221f5
24 changed files with 476 additions and 102 deletions
+11 -8
View File
@@ -3,9 +3,7 @@
#include <set>
#include <boost/noncopyable.hpp>
#include "connection.hpp"
#include "Connection.hpp"
namespace Remote {
@@ -14,21 +12,26 @@ namespace Server {
/// Manages open connections so that they may be cleanly stopped when the server
/// needs to shut down.
class ConnectionManager : boost::noncopyable
class ConnectionManager
{
public:
ConnectionManager(const ConnectionManager&) = delete;
ConnectionManager& operator=(const ConnectionManager&) = delete;
ConnectionManager();
/// Add the specified connection to the manager and start it.
void start(connection::pointer c);
void start(Connection::pointer c);
/// Stop the specified connection.
void stop(connection::pointer c);
void stop(Connection::pointer c);
/// Stop all connections.
void stop_all();
void stopAll();
private:
/// The managed connections.
std::set<connection::pointer> _connections;
std::set<Connection::pointer> _connections;
};
} // namespace Server