123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef __HEPU_H__
- #define __HEPU_H__
- #include <iostream>
- #include <time.h>
- #include <ctime>
- #include "Util/logger.h"
- #include "Util/NoticeCenter.h"
- #include "Poller/EventPoller.h"
- #include "Util/SqlPool.h"
- #include "Network/TcpClient.h"
- #include "Poller/Timer.h"
- #include "TCPClient.hpp"
- #include <httplib.h>
- #include "Notices.h"
- #include "UtilBase.hpp"
- #include "HepuHB.h"
- #include "HepuHBRe.h"
- #include "HepuLogin.h"
- #include "HepuLoginRe.h"
- #include "HepuTarget.h"
- #include "HepuTargetRe.h"
- using namespace std;
- namespace gsd{
- class Hepu: public enable_shared_from_this<Hepu>, public ModuleBase
- {
- private:
- string username;
- string password;
- string token;
- public:
- Hepu(){}
- ~Hepu(){}
- virtual bool Init(){
- return true;
- }
- virtual void Destroy(){
- }
- int32_t Init(string username, string url, int port);
- static std::shared_ptr<Hepu> CreateNew();
- int32_t LoginHepu();
- bool alive();
- int32_t sendHepuHB(HepuHB& HepuHBMsg);
- int32_t sendHepuHB();
- int32_t sendHepuTarget(HepuTarget& HepuTargetMsg);
- };
- };
- #endif
|