From 72716e2c2fd4025b09bda22cfcb7dcb9d12792aa Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 8 Oct 2008 13:56:21 -0700 Subject: Adding the MailHandler system for SMTP server. --- include/MailServer.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/MailServer.h b/include/MailServer.h index df1f83a..e39ad93 100644 --- a/include/MailServer.h +++ b/include/MailServer.h @@ -28,9 +28,16 @@ #include #include +class MailHandler : public Base { + public: + MailHandler() {} + virtual ~MailHandler() {} + virtual void ProcessMail(Handle * in, const String & from, std::vector tos) = 0; +}; + class MailServer : public Task { public: - MailServer(int = 2500, const String & = String("GruiK Server v0.2")) throw (GeneralException); + MailServer(MailHandler *, int = 2500, const String & = String("GruiK Server v0.2")) throw (GeneralException); virtual ~MailServer(); virtual String GetName(); @@ -41,6 +48,7 @@ class MailServer : public Task { Socket Listener; String name; int localport; + MailHandler * handler; }; #endif -- cgit v1.2.3