home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2002 September / PCPlus_193_Laplink2000.iso / Prog / C++ / Pop3Client.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-04-07  |  1.1 KB  |  42 lines

  1.  
  2. #pragma once
  3.  
  4. using System::Net::Sockets::TcpClient;
  5.  
  6. __gc class CPOP3Client
  7. {
  8.     private:
  9.         TcpClient *m_Client;
  10.         String *m_strPOP3HostName;
  11.         String *m_strUserName;
  12.         String *m_strPassword;
  13.         String *m_strStatus;
  14.         int MessageCount();
  15.  
  16.     protected:
  17.         bool ConnectToServer();
  18.         void DisconnectFromServer();
  19.         bool SendCommand (String *strCommand, String** pstrOutput);
  20.  
  21.     public:
  22.         void CPop3Client();
  23.         void Close();
  24.  
  25.         // POP3 server address
  26.         __property String* get_ServerName()                    { return m_strPOP3HostName;        }
  27.         __property void set_ServerName (String* value)        { m_strPOP3HostName = value;    }
  28.         
  29.         // User name
  30.         __property String* get_UserName()                    { return m_strUserName;            }
  31.         __property void set_UserName (String * value)        { m_strUserName = value;        }
  32.  
  33.         // User password
  34.         __property String* get_Password()                    { return m_strPassword;            }
  35.         __property void set_Password (String * value)        { m_strPassword = value;        }
  36.  
  37.         // Status
  38.         __property String* get_Status()                        { return m_strStatus;            }
  39.  
  40.         // NumberOfMessages
  41.         __property int get_NumberOfMessages()                { return MessageCount();        }
  42. };