kioslaves
imaplist.h
Go to the documentation of this file.00001 #ifndef _IMAPLIST_H 00002 #define _IMAPLIST_H 00003 /********************************************************************** 00004 * 00005 * imaplist.h - IMAP4rev1 list response handler 00006 * Copyright (C) 2000 Sven Carstens 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 * Send comments and bug fixes to 00023 * 00024 *********************************************************************/ 00025 00026 #include <qstringlist.h> 00027 #include <qstring.h> 00028 00029 class parseString; 00030 class imapParser; 00031 00032 //the class handling the responses from list 00033 class imapList 00034 { 00035 public: 00036 00037 imapList (); 00038 imapList (const QString &, imapParser &); 00039 imapList (const imapList &); 00040 imapList & operator = (const imapList &); 00041 00042 // process the attributes 00043 void parseAttributes( parseString & ); 00044 00045 // return all atributes concatenated 00046 QString attributesAsString() const 00047 { 00048 return attributes_.join(","); 00049 } 00050 00051 QString hierarchyDelimiter () const 00052 { 00053 return hierarchyDelimiter_; 00054 } 00055 void setHierarchyDelimiter (const QString & _str) 00056 { 00057 hierarchyDelimiter_ = _str; 00058 } 00059 00060 QString name () const 00061 { 00062 return name_; 00063 } 00064 void setName (const QString & _str) 00065 { 00066 name_ = _str; 00067 } 00068 00069 bool noInferiors () const 00070 { 00071 return noInferiors_; 00072 } 00073 void setNoInferiors (bool _val) 00074 { 00075 noInferiors_ = _val; 00076 } 00077 00078 bool noSelect () const 00079 { 00080 return noSelect_; 00081 } 00082 void setNoSelect (bool _val) 00083 { 00084 noSelect_ = _val; 00085 } 00086 00087 bool hasChildren () const 00088 { 00089 return hasChildren_; 00090 } 00091 void setHasChildren (bool _val) 00092 { 00093 hasChildren_ = _val; 00094 } 00095 00096 bool hasNoChildren () const 00097 { 00098 return hasNoChildren_; 00099 } 00100 void setHasNoChildren (bool _val) 00101 { 00102 hasNoChildren_ = _val; 00103 } 00104 00105 bool marked () const 00106 { 00107 return marked_; 00108 } 00109 void setMarked (bool _val) 00110 { 00111 marked_ = _val; 00112 } 00113 00114 bool unmarked () const 00115 { 00116 return unmarked_; 00117 } 00118 void setUnmarked (bool _val) 00119 { 00120 unmarked_ = _val; 00121 } 00122 00123 private: 00124 00125 imapParser* parser_; 00126 QString hierarchyDelimiter_; 00127 QString name_; 00128 bool noInferiors_; 00129 bool noSelect_; 00130 bool marked_; 00131 bool unmarked_; 00132 bool hasChildren_; 00133 bool hasNoChildren_; 00134 QStringList attributes_; 00135 }; 00136 00137 #endif