Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PopAccount.hh

Go to the documentation of this file.
00001 /* PopAccount.cc - source file for the mailfilter program
00002  * Copyright (c) 2000  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 
00020 
00021 #ifndef POPACCOUNT_HH
00022 #define POPACCOUNT_HH
00023 
00024 #include <string>
00025 #include "Account.hh"
00026 #include "Preferences.hh"
00027 #include "Feedback.hh"
00028 
00029 #define MAX_BYTES 512
00030 
00031 namespace pop {
00032 
00033   class PopAccount: public acc::Account {
00034   private:
00035     // Variables from account
00036     string server;
00037     string user;
00038     string pass;
00039     int port;
00040     int mySocket;
00041     pref::Preferences* prefs;
00042     fb::Feedback* report;
00043 
00044     // Methods
00045     int login();
00046     int logout();
00047     int connectSocket();
00048     int disconnectSocket();
00049     int deleteMessage(int);
00050     int sendCommand(string);
00051     string receiveResult(string serverCommand = "irrelevant");
00052     string getWord(const string, int);
00053     bool serverResult(const string);
00054     bool isHeaderEnd(const string);
00055 
00056   public:
00057     PopAccount(string, string, string, int, pref::Preferences*);
00058     ~PopAccount();
00059     int check();
00060   };
00061 
00062   // Exceptions
00063   class IOException { };
00064   class ConnectionTimeOut { };
00065   class UnknownError { };
00066 }  
00067 
00068 #endif

Generated at Tue Dec 19 19:21:03 2000 for mailfilter by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000