#ifndef __HEPU_H__ #define __HEPU_H__ #include #include #include #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 #include "Notices.h" #include "md5.h" #include "UtilBase.hpp" #include "HepuHB.h" #include "HepuHBRe.h" #include "HepuLogin.h" #include "HepuLoginRe.h" #include "HepuTarget.h" #include "HepuTargetRe.h" #include "HepuGetSalt.h" #include "HepuGetSaltRe.h" using namespace std; using namespace toolkit; namespace gsd{ class Hepu: public enable_shared_from_this, public ModuleBase { private: string username_; string password_; string token_; string url_; string salt_; int port_; public: Hepu(){} ~Hepu(){} virtual bool Init(){ return true; } virtual void Destroy(){ } int32_t Init(string username, string url, int port); int32_t Init2(); static std::shared_ptr CreateNew(); int32_t LoginHepu(); bool alive(); int32_t getSalt(HepuGetSalt& hepuGetSaltMsg); int32_t getSalt(); int32_t sendHepuHB(HepuHB& hepuHBMsg); int32_t sendHepuHB(); int32_t sendHepuTarget(HepuTarget& hepuTargetMsg); void setUsr(string usr); void setPwd(string pwd); void setUrl(string url); void setPort(int port); }; }; #endif