Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Config.h

Go to the documentation of this file.
00001 #ifndef BUFFYCONFIG_H
00002 #define BUFFYCONFIG_H
00003 
00004 #pragma interface
00005 
00006 #include <buffy/Exception.h>
00007 #include <buffy/MailProgram.h>
00008 #include <libxml++/libxml++.h>
00009 
00010 class Config
00011 {
00012 protected:
00013     xmlpp::DomParser _xmlparser;
00014 
00015     xmlpp::Document* doc_conf;
00016     xmlpp::Element* _root;
00017     xmlpp::Element* _general;
00018     xmlpp::Element* _view;
00019     xmlpp::Element* _view_empty;
00020     xmlpp::Element* _view_read;
00021     xmlpp::Element* _view_important;
00022     xmlpp::Element* _locations;
00023     xmlpp::Element* _interval;
00024     xmlpp::Element* _programs;
00025 
00026     // State directory
00027     std::string rcfile;
00028 
00029     xmlpp::Element* el_root() throw ();
00030     xmlpp::Element* el_general() throw ();
00031     xmlpp::Element* el_view() throw ();
00032     xmlpp::Element* el_view_empty() throw ();
00033     xmlpp::Element* el_view_read() throw ();
00034     xmlpp::Element* el_view_important() throw ();
00035     xmlpp::Element* el_locations() throw ();
00036     xmlpp::Element* el_interval() throw ();
00037     xmlpp::Element* el_programs() throw ();
00038 
00039 public:
00040     Config() throw (SystemException, ConsistencyCheckException);
00041     ~Config() throw ();
00042 
00043     bool get_view_read() throw ();
00044     bool get_view_empty() throw ();
00045     bool get_view_important() throw ();
00046 
00047     void set_view_read(bool val) throw ();
00048     void set_view_empty(bool val) throw ();
00049     void set_view_important(bool val) throw ();
00050 
00051     int get_update_interval() throw ();
00052     void set_update_interval(int val) throw ();
00053 
00054     std::vector<std::string> get_folder_locations() throw ();
00055     void set_folder_locations(const std::vector<std::string>& locations) throw ();
00056 
00057     std::vector<MailProgram> get_mail_programs() throw ();
00058     void set_mail_programs(const std::vector<MailProgram>& programs) throw ();
00059     MailProgram get_selected_mail_program() throw ();
00060 
00061     void save() throw (ConsistencyCheckException);
00062 };
00063 
00064 
00065 // vim:set ts=4 sw=4:
00066 #endif

Generated on Sun Mar 27 13:35:31 2005 for libbuffy by  doxygen 1.4.1