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.
60 lines
1.1 KiB
60 lines
1.1 KiB
//
|
|
// Created by zwsd
|
|
//
|
|
|
|
#pragma once
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <list>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <set>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "configs/config.hpp"
|
|
#include "iflytopcpp/core/spdlogfactory/logger.hpp"
|
|
//
|
|
#include "configs/config.hpp"
|
|
#include "zservice_container/zservice_container.hpp"
|
|
#include "zwebservice/zwebservice.hpp"
|
|
|
|
/**
|
|
* @brief
|
|
*
|
|
* service: MainControlService
|
|
*
|
|
* 监听事件:
|
|
* 依赖状态:
|
|
* 依赖服务:
|
|
* 作用:
|
|
*
|
|
*/
|
|
|
|
namespace iflytop {
|
|
using namespace std;
|
|
using namespace core;
|
|
class MainControlService : public enable_shared_from_this<MainControlService> {
|
|
ENABLE_LOGGER(MainControlService);
|
|
|
|
shared_ptr<ZWebService> m_zwebService;
|
|
typedef enum {
|
|
kzwebService,
|
|
} fromwhere_t;
|
|
|
|
private:
|
|
string fromwhere2str(fromwhere_t var) {
|
|
if (var == kzwebService) return "zwebService";
|
|
return "unkown";
|
|
}
|
|
|
|
private:
|
|
void processReceiveMessage(fromwhere_t fromwhere, const json &in, json &receipt);
|
|
|
|
public:
|
|
MainControlService(){};
|
|
|
|
void initialize();
|
|
};
|
|
} // namespace iflytop
|