diff options
| author | Pixel <pixel@nobis-crew.org> | 2008-10-09 14:54:32 -0700 | 
|---|---|---|
| committer | Pixel <pixel@nobis-crew.org> | 2008-10-09 14:54:32 -0700 | 
| commit | 04977e4a8df1ca6993d749f914c94980708e0217 (patch) | |
| tree | 7b04fb9115f7989a6c04183843f610433e1d9daa /include | |
| parent | 72716e2c2fd4025b09bda22cfcb7dcb9d12792aa (diff) | |
Finishing creating the first version of LuaSmtp and the associate MailServer classes.
Diffstat (limited to 'include')
| -rw-r--r-- | include/LuaSmtp.h | 37 | ||||
| -rw-r--r-- | include/MailServer.h | 14 | 
2 files changed, 46 insertions, 5 deletions
| diff --git a/include/LuaSmtp.h b/include/LuaSmtp.h new file mode 100644 index 0000000..93a9435 --- /dev/null +++ b/include/LuaSmtp.h @@ -0,0 +1,37 @@ +/* + *  Baltisot + *  Copyright (C) 1999-2008 Nicolas "Pixel" Noble + * + *  This program is free software; you can redistribute it and/or modify + *  it under the terms of the GNU General Public License as published by + *  the Free Software Foundation; either version 2 of the License, or + *  (at your option) any later version. + * + *  This program is distributed in the hope that it will be useful, + *  but WITHOUT ANY WARRANTY; without even the implied warranty of + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *  GNU General Public License for more details. + * + *  You should have received a copy of the GNU General Public License + *  along with this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + */ + +#ifndef __LUASMTP_H__ +#define __LUASMTP_H__ + +#include <BLua.h> + +class LuaMailHandler; + +class LuaLuaMailHandler : public LuaObject { +  public: +    static void pushstatics(Lua *) throw (GeneralException); +      LuaLuaMailHandler(LuaMailHandler *); +  protected: +    virtual void pushmembers(Lua *); +    LuaMailHandler * mh; +}; + + +#endif diff --git a/include/MailServer.h b/include/MailServer.h index e39ad93..296ba50 100644 --- a/include/MailServer.h +++ b/include/MailServer.h @@ -30,14 +30,19 @@  class MailHandler : public Base {    public: -      MailHandler() {} -      virtual ~MailHandler() {} -    virtual void ProcessMail(Handle * in, const String & from, std::vector<String> tos) = 0; +      MailHandler(); +      virtual ~MailHandler(); +    virtual bool doProcessMail(Handle * in, const String & from, std::vector<String> tos) = 0; +    static bool ProcessMail(Handle * in, const String & from, std::vector<String> tos); +    void OnTop(); +  private: +    static MailHandler * head; +    MailHandler * next, * prev;  };  class MailServer : public Task {    public: -      MailServer(MailHandler *, int = 2500, const String & = String("GruiK Server v0.2")) throw (GeneralException); +      MailServer(int = 2500, const String & = String("GruiK Server v0.2")) throw (GeneralException);        virtual ~MailServer();      virtual String GetName(); @@ -48,7 +53,6 @@ class MailServer : public Task {      Socket Listener;      String name;      int localport; -    MailHandler * handler;  };  #endif | 
