home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / UWPC201.ZIP / UW-SRC.ZIP / MAIL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-26  |  2.8 KB  |  91 lines

  1. //-------------------------------------------------------------------------
  2. //
  3. // MAIL.H - Declarations for the mail handling tool of UW/PC.
  4. // 
  5. //  This file is part of UW/PC - a multi-window comms package for the PC.
  6. //  Copyright (C) 1990-1991  Rhys Weatherley
  7. //
  8. //  This program is free software; you can redistribute it and/or modify
  9. //  it under the terms of the GNU General Public License as published by
  10. //  the Free Software Foundation; either version 1, or (at your option)
  11. //  any later version.
  12. //
  13. //  This program is distributed in the hope that it will be useful,
  14. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. //  GNU General Public License for more details.
  17. //
  18. //  You should have received a copy of the GNU General Public License
  19. //  along with this program; if not, write to the Free Software
  20. //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. //
  22. // Revision History:
  23. // ================
  24. //
  25. //  Version  DD/MM/YY  By  Description
  26. //  -------  --------  --  --------------------------------------
  27. //    1.0    25/07/91  RW  Original Version of MAIL.H
  28. //
  29. // You may contact the author by:
  30. // =============================
  31. //
  32. //  e-mail: rhys@cs.uq.oz.au
  33. //    mail: Rhys Weatherley
  34. //          5 Horizon Drive
  35. //          Jamboree Heights
  36. //          Queensland 4074
  37. //        Australia
  38. //
  39. //-------------------------------------------------------------------------
  40.  
  41. #ifndef __MAIL_H__
  42. #define    __MAIL_H__
  43.  
  44. #include "client.h"        // Client handling declarations.
  45.  
  46. //
  47. // Define the structure of a mail handling tool client.
  48. //
  49. #define    MAIL_BUF_LEN    1024
  50. #define    MAIL_MAX_HDRS    200        // Maximum of 200 headers in mailbox.
  51. class    UWMailTool : public UWClient {
  52.  
  53. private:
  54.  
  55.     char    respbuf[MAIL_BUF_LEN];    // Response buffer from host.
  56.     int    resposn;        // Current position.
  57.     int    mode;            // Current mail tool mode.
  58.     char    *headers[MAIL_MAX_HDRS];// Header information for mailbox.
  59.     int    numheaders;        // Number of active headers.
  60.     int    topheader;        // Top-most header on the screen.
  61.     int    currheader;        // Current header.
  62.  
  63.     // Send a mail server command to the remote host.
  64.     void    command    (char *str);
  65.  
  66.     // Write a string to the screen.
  67.     void    write    (char *str);
  68.  
  69.     // Show the header information on the screen.
  70.     void    showheaders    (void);
  71.  
  72.     // Handle the current buffer of information from the remote host.
  73.     void    handle    (void);
  74.  
  75.     // Dispose the current mail headers.
  76.     void    disposeheaders    (void);
  77.  
  78. public:
  79.  
  80.     UWMailTool (UWDisplay *wind);
  81.     ~UWMailTool (void) { disposeheaders (); };
  82.  
  83.     virtual    char far *name    () { return ((char far *)"MAIL"); };
  84.     virtual    void    key    (int keypress);
  85.     virtual    void    remote    (int ch);
  86.     virtual    char    *getstatus (void);
  87.  
  88. };
  89.  
  90. #endif    /* __MAIL_H__ */
  91.