kioslaves/imap4

imaplist.h

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 
00031 //the class handling the responses from list
00032 class imapList
00033 {
00034 public:
00035 
00036   imapList ();
00037   imapList (const QString &);
00038   imapList (const imapList &);
00039     imapList & operator = (const imapList &);
00040 
00041   // process the attributes  
00042   void parseAttributes( parseString & );  
00043 
00044   // return all atributes concatenated
00045   QString attributesAsString() const 
00046   { 
00047     return attributes_.join(","); 
00048   }
00049 
00050   QString hierarchyDelimiter () const
00051   {
00052     return hierarchyDelimiter_;
00053   }
00054   void setHierarchyDelimiter (const QString & _str)
00055   {
00056     hierarchyDelimiter_ = _str;
00057   }
00058 
00059   QString name () const
00060   {
00061     return name_;
00062   }
00063   void setName (const QString & _str)
00064   {
00065     name_ = _str;
00066   }
00067 
00068   bool noInferiors () const
00069   {
00070     return noInferiors_;
00071   }
00072   void setNoInferiors (bool _val)
00073   {
00074     noInferiors_ = _val;
00075   }
00076 
00077   bool noSelect () const
00078   {
00079     return noSelect_;
00080   }
00081   void setNoSelect (bool _val)
00082   {
00083     noSelect_ = _val;
00084   }
00085 
00086   bool hasChildren () const
00087   {
00088     return hasChildren_;
00089   }
00090   void setHasChildren (bool _val)
00091   {
00092     hasChildren_ = _val;
00093   }
00094 
00095   bool hasNoChildren () const
00096   {
00097     return hasNoChildren_;
00098   }
00099   void setHasNoChildren (bool _val)
00100   {
00101     hasNoChildren_ = _val;
00102   }
00103 
00104   bool marked () const
00105   {
00106     return marked_;
00107   }
00108   void setMarked (bool _val)
00109   {
00110     marked_ = _val;
00111   }
00112 
00113   bool unmarked () const
00114   {
00115     return unmarked_;
00116   }
00117   void setUnmarked (bool _val)
00118   {
00119     unmarked_ = _val;
00120   }
00121 
00122 private:
00123 
00124   QString hierarchyDelimiter_;
00125   QString name_;
00126   bool noInferiors_;
00127   bool noSelect_;
00128   bool marked_;
00129   bool unmarked_;
00130   bool hasChildren_;
00131   bool hasNoChildren_;
00132   QStringList attributes_;
00133 };
00134 
00135 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys