• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.4 API Reference
  • KDE Home
  • Contact Us
 

kioslave/imap4

  • kioslave
  • imap4
imapinfo.h
1 #ifndef _IMAPINFO_H
2 #define _IMAPINFO_H
3 /**********************************************************************
4  *
5  * imapinfo.h - IMAP4rev1 SELECT / EXAMINE 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 <QStringList>
27 #include <QString>
28 #include <QLatin1String>
29 
30 //class handling the info we get on EXAMINE and SELECT
31 class imapInfo
32 {
33 public:
34 
35 
36  enum MessageAttribute
37  {
38  Seen = 1 << 0,
39  Answered = 1 << 1,
40  Flagged = 1 << 2,
41  Deleted = 1 << 3,
42  Draft = 1 << 4,
43  Recent = 1 << 5,
44  User = 1 << 6,
45  // non standard flags
46  Forwarded = 1 << 7,
47  Todo = 1 << 8,
48  Watched = 1 << 9,
49  Ignored = 1 << 10
50  };
51 
52 
53  imapInfo ();
54  imapInfo (const QStringList &);
55  imapInfo (const imapInfo &);
56  imapInfo & operator = (const imapInfo &);
57 
58  static ulong _flags (const QByteArray &);
59 
60  void setCount (ulong l)
61  {
62  countAvailable_ = true;
63  count_ = l;
64  }
65 
66  void setRecent (ulong l)
67  {
68  recentAvailable_ = true;
69  recent_ = l;
70  }
71 
72  void setUnseen (ulong l)
73  {
74  unseenAvailable_ = true;
75  unseen_ = l;
76  }
77 
78  void setUidValidity (ulong l)
79  {
80  uidValidityAvailable_ = true;
81  uidValidity_ = l;
82  }
83 
84  void setUidNext (ulong l)
85  {
86  uidNextAvailable_ = true;
87  uidNext_ = l;
88  }
89 
90  void setFlags (ulong l)
91  {
92  flagsAvailable_ = true;
93  flags_ = l;
94  }
95 
96  void setFlags (const QByteArray & inFlag)
97  {
98  flagsAvailable_ = true;
99  flags_ = _flags (inFlag);
100  }
101 
102  void setPermanentFlags (ulong l)
103  {
104  permanentFlagsAvailable_ = true;
105  permanentFlags_ = l;
106  }
107 
108  void setPermanentFlags (const QByteArray& inFlag)
109  {
110  permanentFlagsAvailable_ = true;
111  permanentFlags_ = _flags (inFlag);
112  }
113 
114  void setReadWrite (bool b)
115  {
116  readWriteAvailable_ = true;
117  readWrite_ = b;
118  }
119 
120  void setAlert( const char* cstr )
121  {
122  alert_ = QLatin1String( cstr );
123  }
124 
125  ulong count () const
126  {
127  return count_;
128  }
129 
130  ulong recent () const
131  {
132  return recent_;
133  }
134 
135  ulong unseen () const
136  {
137  return unseen_;
138  }
139 
140  ulong uidValidity () const
141  {
142  return uidValidity_;
143  }
144 
145  ulong uidNext () const
146  {
147  return uidNext_;
148  }
149 
150  ulong flags () const
151  {
152  return flags_;
153  }
154 
155  ulong permanentFlags () const
156  {
157  return permanentFlags_;
158  }
159 
160  bool readWrite () const
161  {
162  return readWrite_;
163  }
164 
165  ulong countAvailable () const
166  {
167  return countAvailable_;
168  }
169 
170  ulong recentAvailable () const
171  {
172  return recentAvailable_;
173  }
174 
175  ulong unseenAvailable () const
176  {
177  return unseenAvailable_;
178  }
179 
180  ulong uidValidityAvailable () const
181  {
182  return uidValidityAvailable_;
183  }
184 
185  ulong uidNextAvailable () const
186  {
187  return uidNextAvailable_;
188  }
189 
190  ulong flagsAvailable () const
191  {
192  return flagsAvailable_;
193  }
194 
195  ulong permanentFlagsAvailable () const
196  {
197  return permanentFlagsAvailable_;
198  }
199 
200  bool readWriteAvailable () const
201  {
202  return readWriteAvailable_;
203  }
204 
205  QString alert() const
206  {
207  return alert_;
208  }
209 
210 private:
211 
212  QString alert_;
213 
214  ulong count_;
215  ulong recent_;
216  ulong unseen_;
217  ulong uidValidity_;
218  ulong uidNext_;
219  ulong flags_;
220  ulong permanentFlags_;
221  bool readWrite_;
222 
223  bool countAvailable_;
224  bool recentAvailable_;
225  bool unseenAvailable_;
226  bool uidValidityAvailable_;
227  bool uidNextAvailable_;
228  bool flagsAvailable_;
229  bool permanentFlagsAvailable_;
230  bool readWriteAvailable_;
231 };
232 
233 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 11 2012 12:12:56 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kioslave/imap4

Skip menu "kioslave/imap4"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.9.4 API Reference

Skip menu "kdepimlibs-4.9.4 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal