summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imaplist.h
blob: 9aa01f78d0ec8a71a1d77e975913cf1e8babf03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#ifndef _IMAPLIST_H
#define _IMAPLIST_H
/**********************************************************************
 *
 *   imaplist.h  - IMAP4rev1 list response handler
 *   Copyright (C) 2000 Sven Carstens
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 *   Send comments and bug fixes to
 *
 *********************************************************************/

#include <tqstringlist.h>
#include <tqstring.h>

class parseString;
class imapParser;

//the class handling the responses from list
class imapList
{
public:

  imapList ();
  imapList (const TQString &, imapParser &);
  imapList (const imapList &);
    imapList & operator = (const imapList &);

  // process the attributes  
  void parseAttributes( parseString & );  

  // return all atributes concatenated
  TQString attributesAsString() const 
  { 
    return attributes_.join(","); 
  }

  TQString hierarchyDelimiter () const
  {
    return hierarchyDelimiter_;
  }
  void setHierarchyDelimiter (const TQString & _str)
  {
    hierarchyDelimiter_ = _str;
  }

  TQString name () const
  {
    return name_;
  }
  void setName (const TQString & _str)
  {
    name_ = _str;
  }

  bool noInferiors () const
  {
    return noInferiors_;
  }
  void setNoInferiors (bool _val)
  {
    noInferiors_ = _val;
  }

  bool noSelect () const
  {
    return noSelect_;
  }
  void setNoSelect (bool _val)
  {
    noSelect_ = _val;
  }

  bool hasChildren () const
  {
    return hasChildren_;
  }
  void setHasChildren (bool _val)
  {
    hasChildren_ = _val;
  }

  bool hasNoChildren () const
  {
    return hasNoChildren_;
  }
  void setHasNoChildren (bool _val)
  {
    hasNoChildren_ = _val;
  }

  bool marked () const
  {
    return marked_;
  }
  void setMarked (bool _val)
  {
    marked_ = _val;
  }

  bool unmarked () const
  {
    return unmarked_;
  }
  void setUnmarked (bool _val)
  {
    unmarked_ = _val;
  }

private:

  imapParser* parser_;
  TQString hierarchyDelimiter_;
  TQString name_;
  bool noInferiors_;
  bool noSelect_;
  bool marked_;
  bool unmarked_;
  bool hasChildren_;
  bool hasNoChildren_;
  TQStringList attributes_;
};

#endif