00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PROTOCOL_HH
00020 #define PROTOCOL_HH
00021
00022 #include "connection.hh"
00023
00024
00025
00026 #define PROTOCOL_POP3 2
00027 #define PROTOCOL_APOP 4
00028 #define SSL_C 4096
00029
00030 using namespace std;
00031
00032 class Protocol
00033 {
00034 protected:
00035 Connection* conn;
00036 unsigned int prot_ident;
00037 unsigned int connect_type;
00038
00039 public:
00040 virtual ~Protocol (void) { };
00041 virtual bool login (const char* usr,
00042 const char* pass,
00043 const unsigned int) const = 0;
00044 virtual bool logout (void) const = 0;
00045 virtual int remove_msg (const unsigned int num) const = 0;
00046 virtual int status (void) const = 0;
00047 virtual int scan (void) const = 0;
00048 void set_connection (Connection*);
00049 void set_ident (unsigned int);
00050 unsigned int ident (void) const;
00051 };
00052
00053 #endif