1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef __HEPU_H__
- #define __HEPU_H__
- #include <iostream>
- #include <time.h>
- #include <ctime>
- #include "Util/util.h"
- #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;
- using namespace toolkit;
- 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
|