Cleanup CMakeLists, Added ControlCommand

This commit is contained in:
Ben Gräf 2017-10-08 20:46:48 +02:00
parent 4f606644fe
commit 003e17d18f
8 changed files with 254 additions and 140 deletions

View file

@ -28,12 +28,9 @@
#include <string>
#include <uv.h>
#include <microhttpd.h>
//class ServiceState;
//class Hashrate;
//class NetworkState;
#include <map>
#include "ClientStatus.h"
#include "ControlCommand.h"
class Service
{
@ -41,14 +38,13 @@ public:
static bool start();
static void release();
static unsigned get(const char *url, std::string &resp);
static unsigned post(const char *url, const std::string &data, std::string &resp);
// static void tick(const Hashrate *hashrate);
// static void tick(const NetworkState &results);
static unsigned get(const std::string &url, std::string &resp);
static unsigned post(const std::string &url, const std::string &data, std::string &resp);
private:
//static ServiceState *m_state;
static char m_buf[4096];
static std::map<std::string, ClientStatus> m_clientStatus;
static std::map<std::string, ControlCommand> m_clientCommand;
static uv_mutex_t m_mutex;
};