#ifndef __SendEmailThread_h_ #define __SendEmailThread_h_ #include "../shared/ContainerThread.h" #include "RecordDispatcher.h" #include #include #include "../ax_alert_server/Types.h" void setEmailThreadSMTPHost(std::string); struct upload_status { int lines_read; char *payload_text[7]; }; class SendEmailThread : public ForeverThreadUser { private: upload_status upload_ctx; public: enum EmailSms { mtSendEmail, mtSendPhone, mtMonitorAlive }; //SendEmailThread() : ForeverThreadUser(IContainerThread::create("SendEmailThread")) {} SendEmailThread() : ForeverThreadUser() { } virtual void handleRequestInThread(Request *original); class SendAlertRequest : public Request { public: std::string email; std::string subject; std::string message; UserId userId; int strategyId; SendAlertRequest(EmailSms type) : Request(NULL) { callbackId = type; } }; }; #endif