home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / LSERVER.H < prev    next >
C/C++ Source or Header  |  1998-05-12  |  3KB  |  147 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #include "_ldefs.h"
  20. #include "combase.h"
  21. #include "lora_api.h"
  22. #include "msgbase.h"
  23.  
  24. class TFTP
  25. {
  26. public:
  27.    TFTP (void);
  28.    ~TFTP (void);
  29.  
  30.    USHORT EndRun;
  31.    CHAR   ClientIP[16];
  32.    class  TConfig *Cfg;
  33.    class  TTcpip *Tcp;
  34.    class  TLog *Log;
  35.  
  36.    USHORT FileExist (PSZ pszFile);
  37.    VOID   GetCommand (VOID);
  38.    USHORT Login (VOID);
  39.    VOID   ReadFile (PSZ pszCode, PSZ pszFile);
  40.    VOID   Run (VOID);
  41.  
  42. private:
  43.    USHORT Valid, Anonymous, Binary, DataPort;
  44.    USHORT Known, Protected;
  45.    PSZ    Month[12];
  46.    CHAR   Response[128], Temp[4096];
  47.    struct dosdate_t date;
  48.    struct dostime_t d_time;
  49.    class  TAddress  Addr;
  50.    class  TTcpip    *Data;
  51.    class  TUser     *User;
  52.    class  TNodes    *Nodes;
  53.    class  TFileData *Area;
  54.    class  TFileBase *Files;
  55.    class  TOutbound *Outbound;
  56. };
  57.  
  58. // ----------------------------------------------------------------------
  59.  
  60. class TWeb
  61. {
  62. public:
  63.    TWeb (void);
  64.    ~TWeb (void);
  65.  
  66.    class  TConfig *Cfg;
  67.    class  TLog *Log;
  68.    class  TTcpip *Tcp;
  69.  
  70.    VOID   GetRequest (VOID);
  71.    VOID   Run (VOID);
  72.    VOID   SendFile (PSZ File, PSZ MimeType = NULL);
  73.    VOID   URLNotFound (PSZ URL);
  74.  
  75. private:
  76.    CHAR   Temp[2048];
  77.    CHAR   Request[128];
  78.    CHAR   Location[128];
  79. };
  80.  
  81. // ----------------------------------------------------------------------
  82.  
  83. typedef struct {
  84.    USHORT Index;
  85.    ULONG  Number;
  86.    USHORT Deleted;
  87.    ULONG  Size;
  88. } MAILINDEX;
  89.  
  90. class TPOP3
  91. {
  92. public:
  93.    TPOP3 (void);
  94.    ~TPOP3 (void);
  95.  
  96.    class  TConfig *Cfg;
  97.    class  TTcpip *Tcp;
  98.    class  TLog *Log;
  99.  
  100.    VOID   GetCommand (VOID);
  101.    VOID   Run (VOID);
  102.  
  103. private:
  104.    CHAR   Response[256], Temp[2048];
  105.    class  TUser *User;
  106.    class  TMsgBase *Msg;
  107.    class  TCollection MailDrop;
  108.    MAILINDEX Idx;
  109. };
  110.  
  111. // ----------------------------------------------------------------------
  112.  
  113. class TNNTP
  114. {
  115. public:
  116.    TNNTP (void);
  117.    ~TNNTP (void);
  118.  
  119.    class  TConfig *Cfg;
  120.    class  TTcpip *Tcp;
  121.    class  TLog *Log;
  122.  
  123.    VOID   DisplayXOver (ULONG XFrom, ULONG XTo);
  124.    VOID   GetCommand (VOID);
  125.    VOID   Run (VOID);
  126.    VOID   SendBody (VOID);
  127.    VOID   SendHeader (USHORT Termination);
  128.  
  129. private:
  130.    CHAR   Response[256], Temp[2048];
  131.    class  TMsgBase *Msg;
  132. };
  133.  
  134. // ----------------------------------------------------------------------
  135.  
  136. #if defined(__OS2__)
  137.  
  138. MRESULT EXPENTRY InternetDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  139.  
  140. #elif defined(__NT__)
  141.  
  142. BOOL CALLBACK InternetDlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  143.  
  144. #endif
  145.  
  146.  
  147.