You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
// #include <curl/curl.h>
|
|
#pragma once
|
|
#include <fstream>
|
|
#include <functional>
|
|
#include <iostream>
|
|
#include <list>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <set>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
//
|
|
#include "configs/gconfig.hpp"
|
|
#include "iflytop/core/spdlogfactory/logger.hpp"
|
|
#include "iflytop/core/thread/thread.hpp"
|
|
#include "version.hpp"
|
|
#include "zservice_container/zservice_container.hpp"
|
|
#include "iflytop/components/zclicpp/clipp.h"
|
|
//
|
|
#include "main_control_service.hpp"
|
|
|
|
namespace iflytop {
|
|
using namespace iflytop;
|
|
using namespace core;
|
|
using namespace std;
|
|
using namespace clipp;
|
|
class Main {
|
|
ENABLE_LOGGER(Main);
|
|
|
|
private:
|
|
unique_ptr<Thread> thread;
|
|
|
|
private:
|
|
int main(int argc, char *argv[]);
|
|
|
|
public:
|
|
static Main *g_main;
|
|
static void _onsignal(int signo) { g_main->onsignal(signo); }
|
|
void onsignal(int signo);
|
|
|
|
public:
|
|
Main(/* args */) {}
|
|
~Main() {}
|
|
void run(int argc, char *argv[]);
|
|
void dosystem(string order, bool dump) {
|
|
if (dump) logger->info("{}", order);
|
|
system(order.c_str());
|
|
}
|
|
};
|
|
} // namespace iflytop
|