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

akonadi

messagestatus.h
00001 /*  -*- mode: C++ -*-
00002     This file is part of Akonadi.
00003     Copyright (c) 2005 Andreas Gungl <a.gungl@gmx.de>
00004     Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
00005     Copyright (c) 2010 Leo Franchi <lfranchi@kde.org>
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Library General Public License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to the
00019     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020     Boston, MA 02110-1301, USA.
00021 */
00022 #ifndef AKONADI_KMIME_MESSAGESTATUS_H
00023 #define AKONADI_KMIME_MESSAGESTATUS_H
00024 
00025 #include <QtCore/QSet>
00026 
00027 #include "akonadi-kmime_export.h"
00028 
00029 class QString;
00030 
00031 namespace Akonadi {
00032 
00033 //---------------------------------------------------------------------------
00051 class AKONADI_KMIME_EXPORT MessageStatus
00052 {
00053   public:
00055     MessageStatus();
00056 
00061     MessageStatus &operator = ( const MessageStatus &other );
00062 
00066     bool operator == ( const MessageStatus &other ) const;
00067 
00071     bool operator != ( const MessageStatus &other ) const;
00072 
00077     bool operator & ( const MessageStatus &other ) const;
00078 
00080     void clear();
00081 
00088     void set( const MessageStatus &other );
00089 
00094     void toggle( const MessageStatus &other );
00095 
00096     /* ----- getters ----------------------------------------------------- */
00097 
00101     bool isOfUnknownStatus() const;
00102 
00106     bool isRead() const;
00107 
00111     bool isDeleted() const;
00112 
00116     bool isReplied() const;
00117 
00121     bool isForwarded() const;
00122 
00126     bool isQueued() const;
00127 
00131     bool isSent() const;
00132 
00136     bool isImportant() const;
00137 
00141     bool isWatched() const;
00142 
00146     bool isIgnored() const;
00147 
00151     bool isToAct() const;
00152 
00156     bool isSpam() const;
00157 
00161     bool isHam() const;
00162 
00166     bool hasAttachment() const;
00167 
00171     bool hasInvitation() const;
00172 
00176     bool isSigned() const;
00177 
00181     bool isEncrypted() const;
00182 
00186     bool hasError() const;
00187 
00188     /* ----- setters ----------------------------------------------------- */
00189 
00191     void setRead( bool read = true );
00192 
00196     void setDeleted( bool deleted = true );
00197 
00201     void setReplied( bool replied = true );
00202 
00206     void setForwarded( bool forwarded = true );
00207 
00211     void setQueued( bool queued = true );
00212 
00216     void setSent( bool sent = true );
00217 
00221     void setImportant( bool important = true );
00222 
00226     void setWatched( bool watched = true );
00227 
00231     void setIgnored( bool ignored = true );
00232 
00236     void setToAct( bool toAct = true );
00237 
00241     void setSpam( bool spam = true );
00242 
00246     void setHam( bool ham = true );
00247 
00251     void setHasAttachment( bool hasAttachment = true );
00252 
00256     void setHasInvitation( bool hasInvitation = true );
00257 
00261     void setSigned( bool value = true );
00262 
00266     void setEncrypted( bool value = true );
00267 
00271     void setHasError( bool value = true );
00272 
00273     /* ----- state representation  --------------------------------------- */
00274 
00280     qint32 toQInt32() const;
00281 
00287     void fromQInt32( qint32 status );
00288 
00295     QString statusStr() const;
00296 
00304     void setStatusFromStr( const QString &aStr );
00305 
00309     QSet<QByteArray> statusFlags() const;
00310 
00314     void setStatusFromFlags( const QSet<QByteArray> &flags );
00315 
00316     /* ----- static accessors to simple states --------------------------- */
00317 
00321     static const MessageStatus statusUnread();
00322 
00327     static const MessageStatus statusRead();
00328 
00333     static const MessageStatus statusDeleted();
00334 
00339     static const MessageStatus statusReplied();
00340 
00345     static const MessageStatus statusForwarded();
00346 
00351     static const MessageStatus statusQueued();
00352 
00357     static const MessageStatus statusSent();
00358 
00363     static const MessageStatus statusImportant();
00364 
00369     static const MessageStatus statusWatched();
00370 
00375     static const MessageStatus statusIgnored();
00376 
00381     static const MessageStatus statusToAct();
00382 
00387     static const MessageStatus statusSpam();
00388 
00393     static const MessageStatus statusHam();
00394 
00399     static const MessageStatus statusHasAttachment();
00400 
00405     static const MessageStatus statusHasInvitation();
00406 
00411     static const MessageStatus statusSigned();
00412 
00417     static const MessageStatus statusEncrypted();
00418 
00423     static const MessageStatus statusHasError();
00424 
00425   private:
00426     quint32 mStatus;
00427 };
00428 
00429 } // namespace Akonadi
00430 
00431 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:15 by doxygen 1.8.0 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-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 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