43#include "imapparser.h"
45#include <kimap/rfccodecs.h>
49imapList::imapList (): parser_(0), noInferiors_ (false),
50noSelect_ (false), marked_ (false), unmarked_ (false),
51hasChildren_ (false), hasNoChildren_ (false)
55imapList::imapList (
const imapList & lr):parser_(lr.parser_),
56hierarchyDelimiter_ (lr.hierarchyDelimiter_),
58noInferiors_ (lr.noInferiors_),
59noSelect_ (lr.noSelect_), marked_ (lr.marked_), unmarked_ (lr.unmarked_),
60hasChildren_ (lr.hasChildren_), hasNoChildren_ (lr.hasNoChildren_),
61attributes_ (lr.attributes_)
65imapList & imapList::operator = (
const imapList & lr)
73 hierarchyDelimiter_ = lr.hierarchyDelimiter_;
75 noInferiors_ = lr.noInferiors_;
76 noSelect_ = lr.noSelect_;
78 unmarked_ = lr.unmarked_;
79 hasChildren_ = lr.hasChildren_;
80 hasNoChildren_ = lr.hasNoChildren_;
81 attributes_ = lr.attributes_;
86imapList::imapList (
const QString & inStr, imapParser &parser)
90marked_ (false), unmarked_ (false), hasChildren_ (false),
94 s.data = inStr.toLatin1();
102 parseAttributes( s );
105 parser_->skipWS( s );
107 hierarchyDelimiter_ = QString::fromLatin1( parser_->parseOneWord( s ) );
108 if ( hierarchyDelimiter_ ==
"NIL" ) {
109 hierarchyDelimiter_.clear();
111 name_ = QString::fromUtf8( KIMAP::decodeImapFolderName( parser_->parseLiteral( s ) ) );
117 while ( !str.isEmpty() && str[0] !=
')' ) {
118 QString orig = QString::fromLatin1( parser_->parseOneWord( str ) );
120 QString attribute = orig.toLower();
121 if ( attribute.contains(
"\\noinferiors" ) ) {
123 }
else if ( attribute.contains(
"\\noselect" ) ) {
125 }
else if ( attribute.contains(
"\\marked" ) ) {
127 }
else if ( attribute.contains(
"\\unmarked" ) ) {
129 }
else if ( attribute.contains(
"\\haschildren" ) ) {
131 }
else if ( attribute.contains(
"\\hasnochildren" ) ) {
132 hasNoChildren_ =
true;
134 kDebug( 7116 ) <<
"imapList::imapList: bogus attribute" << attribute;
a string used during parsing the string allows you to move the effective start of the string using st...