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

Preferences.hh

Go to the documentation of this file.
00001 /* Preferences.hh - 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 #ifndef PREFERENCES_HH
00021 #define PREFERENCES_HH
00022 
00023 #include <string>
00024 #include <vector>
00025 #include <list>
00026 #include "mailfilter.hh"
00027 
00028 namespace pref {
00029   
00030   typedef struct {
00031     string name;
00032     string user;
00033     string pass;
00034     int port;
00035   } serverInfo;
00036 
00037 
00038   class Preferences {
00039   private:
00040     // Variables
00041     vector<serverInfo> servers;
00042     vector<string> filters;
00043     string logfile;
00044     int maxsize;
00045     bool icase;
00046     int mode;
00047 
00048     // Methods
00049     list<string> getPrefValues(string);
00050     string getStoredPassword(string);
00051     string getFilter(string);
00052 
00053   public:
00054     Preferences(string);
00055     ~Preferences();
00056     vector<serverInfo>* getServers();
00057     int getMaxsize();
00058     bool getIcase();
00059     int getMode();
00060     void setMode(int);
00061     string getLogfile();
00062     void setLogfile(string);
00063     vector<string>* getFilters();
00064   };
00065   
00066   // Exceptions
00067   class MalformedPrefsFile { };
00068   class IOException { };
00069 }
00070 
00071 #endif

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