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.

59 lines
1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. //
  2. // Created by zwsd
  3. //
  4. #pragma once
  5. #include <fstream>
  6. #include <iostream>
  7. #include <list>
  8. #include <map>
  9. #include <memory>
  10. #include <set>
  11. #include <sstream>
  12. #include <string>
  13. #include <vector>
  14. #include "configs/config.hpp"
  15. #include "iflytopcpp/core/spdlogfactory/logger.hpp"
  16. //
  17. #include "configs/config.hpp"
  18. #include "zservice_container/zservice_container.hpp"
  19. #include "zwebservice/zwebservice.hpp"
  20. /**
  21. * @brief
  22. *
  23. * service: MainControlService
  24. *
  25. * :
  26. * :
  27. * :
  28. * :
  29. *
  30. */
  31. namespace iflytop {
  32. using namespace std;
  33. using namespace core;
  34. class MainControlService : public enable_shared_from_this<MainControlService> {
  35. ENABLE_LOGGER(MainControlService);
  36. shared_ptr<ZWebService> m_zwebService;
  37. typedef enum {
  38. kzwebService,
  39. } fromwhere_t;
  40. private:
  41. string fromwhere2str(fromwhere_t var) {
  42. if (var == kzwebService) return "zwebService";
  43. return "unkown";
  44. }
  45. private:
  46. void processReceiveMessage(fromwhere_t fromwhere, const json &in, json &receipt);
  47. public:
  48. MainControlService(){};
  49. void initialize();
  50. };
  51. } // namespace iflytop