00001 // account.hh - source file for the mailfilter program 00002 // Copyright (c) 2003 Andreas Bauer <baueran@in.tum.de> 00003 // 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00017 // USA. 00018 00019 #ifndef ACCOUNT_HH 00020 #define ACCOUNT_HH 00021 00022 #include <string> 00023 #include <vector> 00024 #include "defines.hh" 00025 #include "protocol.hh" 00026 #include "pop3.hh" 00027 #include "apop.hh" 00028 #include "connection.hh" 00029 00030 using namespace std; 00031 00032 class Account 00033 { 00034 protected: 00035 string serv; 00036 string user; 00037 string pass; 00038 int the_port; 00039 vector<string> msg_ids; 00040 Protocol* proto; 00041 Connection* conn; 00042 00043 public: 00044 void clear (void); 00045 string server (void); 00046 void set_server (const char*); 00047 string usr (void); 00048 void set_usr (const char*); 00049 string passwd (void); 00050 void set_passwd (const char*); 00051 unsigned int port (void); 00052 void set_port (unsigned int); 00053 void set_protocol (unsigned int); 00054 unsigned int protocol (void); 00055 void set_connection (unsigned int = POSIX_SOCKETS) 00056 __attribute__ ((unused)); 00057 int check (void); 00058 }; 00059 00060 #endif