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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • kmime
messagestatus.h
1 /* -*- mode: C++ -*-
2  This file is part of Akonadi.
3  Copyright (c) 2005 Andreas Gungl <a.gungl@gmx.de>
4  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to the
19  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 #ifndef AKONADI_KMIME_MESSAGESTATUS_H
23 #define AKONADI_KMIME_MESSAGESTATUS_H
24 
25 #include <QtCore/QSet>
26 
27 #include "akonadi-kmime_export.h"
28 
29 class QString;
30 
31 namespace Akonadi {
32 
33 //---------------------------------------------------------------------------
51 class AKONADI_KMIME_EXPORT MessageStatus
52 {
53  public:
55  MessageStatus();
56 
62  MessageStatus &operator = ( const MessageStatus &other );
63 
68  bool operator == ( const MessageStatus &other ) const;
69 
74  bool operator != ( const MessageStatus &other ) const;
75 
81  bool operator & ( const MessageStatus &other ) const;
82 
84  void clear();
85 
93  void set( const MessageStatus &other );
94 
100  void toggle( const MessageStatus &other );
101 
102  /* ----- getters ----------------------------------------------------- */
103 
107  bool isOfUnknownStatus() const;
108 
112  bool isRead() const;
113 
117  bool isDeleted() const;
118 
122  bool isReplied() const;
123 
127  bool isForwarded() const;
128 
132  bool isQueued() const;
133 
137  bool isSent() const;
138 
142  bool isImportant() const;
143 
147  bool isWatched() const;
148 
152  bool isIgnored() const;
153 
157  bool isToAct() const;
158 
162  bool isSpam() const;
163 
167  bool isHam() const;
168 
172  bool hasAttachment() const;
173 
177  bool hasInvitation() const;
178 
182  bool isSigned() const;
183 
187  bool isEncrypted() const;
188 
192  bool hasError() const;
193 
194  /* ----- setters ----------------------------------------------------- */
195 
200  void setRead( bool read = true );
201 
205  void setDeleted( bool deleted = true );
206 
210  void setReplied( bool replied = true );
211 
215  void setForwarded( bool forwarded = true );
216 
220  void setQueued( bool queued = true );
221 
225  void setSent( bool sent = true );
226 
230  void setImportant( bool important = true );
231 
235  void setWatched( bool watched = true );
236 
240  void setIgnored( bool ignored = true );
241 
245  void setToAct( bool toAct = true );
246 
250  void setSpam( bool spam = true );
251 
255  void setHam( bool ham = true );
256 
260  void setHasAttachment( bool hasAttachment = true );
261 
265  void setHasInvitation( bool hasInvitation = true );
266 
270  void setSigned( bool value = true );
271 
275  void setEncrypted( bool value = true );
276 
280  void setHasError( bool value = true );
281 
282  /* ----- state representation --------------------------------------- */
283 
289  qint32 toQInt32() const;
290 
296  void fromQInt32( qint32 status );
297 
304  QString statusStr() const;
305 
313  void setStatusFromStr( const QString &aStr );
314 
318  QSet<QByteArray> statusFlags() const;
319 
323  void setStatusFromFlags( const QSet<QByteArray> &flags );
324 
325  /* ----- static accessors to simple states --------------------------- */
326 
330  static const MessageStatus statusUnread();
331 
336  static const MessageStatus statusRead();
337 
342  static const MessageStatus statusDeleted();
343 
348  static const MessageStatus statusReplied();
349 
354  static const MessageStatus statusForwarded();
355 
360  static const MessageStatus statusQueued();
361 
366  static const MessageStatus statusSent();
367 
372  static const MessageStatus statusImportant();
373 
378  static const MessageStatus statusWatched();
379 
384  static const MessageStatus statusIgnored();
385 
390  static const MessageStatus statusToAct();
391 
396  static const MessageStatus statusSpam();
397 
402  static const MessageStatus statusHam();
403 
408  static const MessageStatus statusHasAttachment();
409 
414  static const MessageStatus statusHasInvitation();
415 
420  static const MessageStatus statusSigned();
421 
426  static const MessageStatus statusEncrypted();
427 
432  static const MessageStatus statusHasError();
433 
434  private:
435  quint32 mStatus;
436 };
437 
438 } // namespace Akonadi
439 
440 #endif
Akonadi::MessageStatus
Akonadi KMime Message Status.
Definition: messagestatus.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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