tdeioslave/imap4

imaplist.h
1#ifndef _IMAPLIST_H
2#define _IMAPLIST_H
3/**********************************************************************
4 *
5 * imaplist.h - IMAP4rev1 list response handler
6 * Copyright (C) 2000 Sven Carstens <s.carstens@gmx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 * Send comments and bug fixes to
23 *
24 *********************************************************************/
25
26#include <tqstringlist.h>
27#include <tqstring.h>
28
29class parseString;
30class imapParser;
31
32//the class handling the responses from list
33class imapList
34{
35public:
36
37 imapList ();
38 imapList (const TQString &, imapParser &);
39 imapList (const imapList &);
40 imapList & operator = (const imapList &);
41
42 // process the attributes
43 void parseAttributes( parseString & );
44
45 // return all atributes concatenated
46 TQString attributesAsString() const
47 {
48 return attributes_.join(",");
49 }
50
51 TQString hierarchyDelimiter () const
52 {
53 return hierarchyDelimiter_;
54 }
55 void setHierarchyDelimiter (const TQString & _str)
56 {
57 hierarchyDelimiter_ = _str;
58 }
59
60 TQString name () const
61 {
62 return name_;
63 }
64 void setName (const TQString & _str)
65 {
66 name_ = _str;
67 }
68
69 bool noInferiors () const
70 {
71 return noInferiors_;
72 }
73 void setNoInferiors (bool _val)
74 {
75 noInferiors_ = _val;
76 }
77
78 bool noSelect () const
79 {
80 return noSelect_;
81 }
82 void setNoSelect (bool _val)
83 {
84 noSelect_ = _val;
85 }
86
87 bool hasChildren () const
88 {
89 return hasChildren_;
90 }
91 void setHasChildren (bool _val)
92 {
93 hasChildren_ = _val;
94 }
95
96 bool hasNoChildren () const
97 {
98 return hasNoChildren_;
99 }
100 void setHasNoChildren (bool _val)
101 {
102 hasNoChildren_ = _val;
103 }
104
105 bool marked () const
106 {
107 return marked_;
108 }
109 void setMarked (bool _val)
110 {
111 marked_ = _val;
112 }
113
114 bool unmarked () const
115 {
116 return unmarked_;
117 }
118 void setUnmarked (bool _val)
119 {
120 unmarked_ = _val;
121 }
122
123private:
124
125 imapParser* parser_;
126 TQString hierarchyDelimiter_;
127 TQString name_;
128 bool noInferiors_;
129 bool noSelect_;
130 bool marked_;
131 bool unmarked_;
132 bool hasChildren_;
133 bool hasNoChildren_;
134 TQStringList attributes_;
135};
136
137#endif
a string used during parsing the string allows you to move the effective start of the string using st...
Definition: imapparser.h:53