42 #include "rfcdecoder.h"
44 #include "imapparser.h"
48 imapList::imapList (): parser_(0), noInferiors_ (false),
49 noSelect_ (false), marked_ (false), unmarked_ (false),
50 hasChildren_ (false), hasNoChildren_ (false)
54 imapList::imapList (
const imapList & lr):parser_(lr.parser_),
55 hierarchyDelimiter_ (lr.hierarchyDelimiter_),
57 noInferiors_ (lr.noInferiors_),
58 noSelect_ (lr.noSelect_), marked_ (lr.marked_), unmarked_ (lr.unmarked_),
59 hasChildren_ (lr.hasChildren_), hasNoChildren_ (lr.hasNoChildren_),
60 attributes_ (lr.attributes_)
64 imapList & imapList::operator = (
const imapList & lr)
71 hierarchyDelimiter_ = lr.hierarchyDelimiter_;
73 noInferiors_ = lr.noInferiors_;
74 noSelect_ = lr.noSelect_;
76 unmarked_ = lr.unmarked_;
77 hasChildren_ = lr.hasChildren_;
78 hasNoChildren_ = lr.hasNoChildren_;
79 attributes_ = lr.attributes_;
84 imapList::imapList (
const TQString & inStr, imapParser &parser)
88 marked_ (false), unmarked_ (false), hasChildren_ (false),
89 hasNoChildren_ (false)
92 s.data.duplicate(inStr.latin1(), inStr.length());
104 hierarchyDelimiter_ = parser_->parseOneWordC(s);
105 if (hierarchyDelimiter_ ==
"NIL")
106 hierarchyDelimiter_ = TQString();
110 void imapList::parseAttributes(
parseString & str )
112 TQCString attribute, orig;
114 while ( !str.isEmpty () && str[0] !=
')' )
116 orig = parser_->parseOneWordC(str);
118 attribute = orig.lower();
119 if (-1 != attribute.find (
"\\noinferiors"))
121 else if (-1 != attribute.find (
"\\noselect"))
123 else if (-1 != attribute.find (
"\\marked"))
125 else if (-1 != attribute.find (
"\\unmarked"))
127 else if (-1 != attribute.find (
"\\haschildren"))
129 else if (-1 != attribute.find (
"\\hasnochildren"))
130 hasNoChildren_ =
true;
132 kdDebug(7116) <<
"imapList::imapList: bogus attribute " << attribute << endl;
a string used during parsing the string allows you to move the effective start of the string using st...
static TQString fromIMAP(const TQString &src)
Convert an IMAP mailbox to a Unicode path.