• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi/kmime

messagestatus.cpp

00001 /*
00002     This file is part of Akonadi.
00003     Copyright (c) 2003 Andreas Gungl <a.gungl@gmx.de>
00004     Copyright (c) 2010 KDAB
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 
00023 #include "messagestatus.h"
00024 
00025 #include "messageflags.h"
00026 
00027 #include <KDE/KDebug>
00028 
00029 #include <QtCore/QString>
00030 
00037 enum Status {
00038     StatusUnknown =           0x00000000,
00039     StatusUnread =            0x00000002, // deprecated
00040     StatusRead =              0x00000004,
00041     StatusDeleted =           0x00000010,
00042     StatusReplied =           0x00000020,
00043     StatusForwarded =         0x00000040,
00044     StatusQueued =            0x00000080,
00045     StatusSent =              0x00000100,
00046     StatusFlag =              0x00000200, // flag means important
00047     StatusWatched =           0x00000400,
00048     StatusIgnored =           0x00000800, // forces isRead()
00049     StatusToAct =             0x00001000,
00050     StatusSpam =              0x00002000,
00051     StatusHam =               0x00004000,
00052     StatusHasAttachment =     0x00008000,
00053     StatusHasInvitation =     0x00010000,
00054     StatusSigned =            0x00020000,
00055     StatusEncrypted =         0x00040000,
00056     StatusHasError =          0x00080000
00057 };
00058 
00059 Akonadi::MessageStatus::MessageStatus()
00060 {
00061   mStatus = StatusUnknown;
00062 }
00063 
00064 Akonadi::MessageStatus &Akonadi::MessageStatus::operator = ( const Akonadi::MessageStatus &other )
00065 {
00066   mStatus = other.mStatus;
00067   return *this;
00068 }
00069 
00070 bool Akonadi::MessageStatus::operator == ( const Akonadi::MessageStatus &other ) const
00071 {
00072   return ( mStatus == other.mStatus );
00073 }
00074 
00075 bool Akonadi::MessageStatus::operator != ( const Akonadi::MessageStatus &other ) const
00076 {
00077   return ( mStatus != other.mStatus );
00078 }
00079 
00080 bool Akonadi::MessageStatus::operator & ( const Akonadi::MessageStatus &other ) const
00081 {
00082   if ( mStatus == StatusUnread )
00083     return !(other.mStatus & StatusRead);
00084 
00085   if ( other.mStatus == StatusUnread )
00086     return !(mStatus & StatusRead);
00087 
00088   return ( mStatus & other.mStatus );
00089 }
00090 
00091 void Akonadi::MessageStatus::clear()
00092 {
00093   mStatus = StatusUnknown;
00094 }
00095 
00096 void Akonadi::MessageStatus::set( const Akonadi::MessageStatus &other )
00097 {
00098   Q_ASSERT( !(other.mStatus & StatusUnread) );
00099 
00100   // Those stati are exclusive, but we have to lock at the
00101   // internal representation because Ignored can manipulate
00102   // the result of the getter methods.
00103   if ( other.mStatus & StatusRead ) {
00104     setRead();
00105   }
00106   if ( other.isDeleted() ) {
00107     setDeleted();
00108   }
00109   if ( other.isReplied() ) {
00110     setReplied();
00111   }
00112   if ( other.isForwarded() ) {
00113     setForwarded();
00114   }
00115   if ( other.isQueued() ) {
00116     setQueued();
00117   }
00118   if ( other.isSent() ) {
00119     setSent();
00120   }
00121   if ( other.isImportant() ) {
00122     setImportant();
00123   }
00124 
00125   if ( other.isWatched() ) {
00126     setWatched();
00127   }
00128   if ( other.isIgnored() ) {
00129     setIgnored();
00130   }
00131   if ( other.isToAct() ) {
00132     setToAct();
00133   }
00134   if ( other.isSpam() ) {
00135     setSpam();
00136   }
00137   if ( other.isHam() ) {
00138     setHam();
00139   }
00140   if ( other.hasAttachment() ) {
00141     setHasAttachment();
00142   }
00143   if ( other.hasInvitation() ) {
00144     setHasInvitation();
00145   }
00146   if ( other.isSigned() ) {
00147     setSigned();
00148   }
00149   if ( other.isEncrypted() ) {
00150     setEncrypted();
00151   }
00152   if ( other.hasError() ) {
00153     setHasError();
00154   }
00155 }
00156 
00157 void Akonadi::MessageStatus::toggle( const Akonadi::MessageStatus &other )
00158 {
00159   Q_ASSERT( !(other.mStatus & StatusUnread) );
00160 
00161   if ( other.isDeleted() ) {
00162     setDeleted( !( mStatus & StatusDeleted ) );
00163   }
00164   if ( other.isReplied() ) {
00165     setReplied( !( mStatus & StatusReplied ) );
00166   }
00167   if ( other.isForwarded() ) {
00168     setForwarded( !( mStatus & StatusForwarded ) );
00169   }
00170   if ( other.isQueued() ) {
00171     setQueued( !( mStatus & StatusQueued ) );
00172   }
00173   if ( other.isSent() ) {
00174     setSent( !( mStatus & StatusSent ) );
00175   }
00176   if ( other.isImportant() ) {
00177     setImportant( !( mStatus & StatusFlag ) );
00178   }
00179 
00180   if ( other.isWatched() ) {
00181     setWatched( !( mStatus & StatusWatched ) );
00182   }
00183   if ( other.isIgnored() ) {
00184     setIgnored( !( mStatus & StatusIgnored ) );
00185   }
00186   if ( other.isToAct() ) {
00187     setToAct( !( mStatus & StatusToAct ) );
00188   }
00189   if ( other.isSpam() ) {
00190     setSpam( !( mStatus & StatusSpam ) );
00191   }
00192   if ( other.isHam() ) {
00193     setHam( !( mStatus & StatusHam ) );
00194   }
00195   if ( other.hasAttachment() ) {
00196     setHasAttachment( !( mStatus & StatusHasAttachment ) );
00197   }
00198   if ( other.hasInvitation() ) {
00199     setHasInvitation( !( mStatus & StatusHasInvitation ) );
00200   }
00201   if ( other.isSigned() ) {
00202     setSigned( !( mStatus & StatusSigned ) );
00203   }
00204   if ( other.isEncrypted() ) {
00205     setEncrypted( !( mStatus & StatusEncrypted ) );
00206   }
00207   if ( other.hasError() ) {
00208     setHasError( !( mStatus & StatusHasError ) );
00209   }
00210 }
00211 
00212 bool Akonadi::MessageStatus::isOfUnknownStatus() const
00213 {
00214   return ( mStatus == StatusUnknown );
00215 }
00216 
00217 bool Akonadi::MessageStatus::isRead() const
00218 {
00219   return ( (mStatus & StatusRead) || (mStatus & StatusIgnored) );
00220 }
00221 
00222 bool Akonadi::MessageStatus::isDeleted() const
00223 {
00224   return ( mStatus & StatusDeleted );
00225 }
00226 
00227 bool Akonadi::MessageStatus::isReplied() const
00228 {
00229   return ( mStatus & StatusReplied );
00230 }
00231 
00232 bool Akonadi::MessageStatus::isForwarded() const
00233 {
00234   return ( mStatus & StatusForwarded );
00235 }
00236 
00237 bool Akonadi::MessageStatus::isQueued() const
00238 {
00239   return ( mStatus & StatusQueued );
00240 }
00241 
00242 bool Akonadi::MessageStatus::isSent() const
00243 {
00244    return ( mStatus & StatusSent );
00245 }
00246 
00247 bool Akonadi::MessageStatus::isImportant() const
00248 {
00249   return ( mStatus & StatusFlag );
00250 }
00251 
00252 bool Akonadi::MessageStatus::isWatched() const
00253 {
00254   return ( mStatus & StatusWatched );
00255 }
00256 
00257 bool Akonadi::MessageStatus::isIgnored() const
00258 {
00259   return ( mStatus & StatusIgnored );
00260 }
00261 
00262 bool Akonadi::MessageStatus::isToAct() const
00263 {
00264   return ( mStatus & StatusToAct );
00265 }
00266 
00267 bool Akonadi::MessageStatus::isSpam() const
00268 {
00269   return ( mStatus & StatusSpam );
00270 }
00271 
00272 bool Akonadi::MessageStatus::isHam() const
00273 {
00274   return ( mStatus & StatusHam );
00275 }
00276 
00277 bool Akonadi::MessageStatus::hasAttachment() const
00278 {
00279   return ( mStatus & StatusHasAttachment );
00280 }
00281 
00282 bool Akonadi::MessageStatus::hasInvitation() const
00283 {
00284   return ( mStatus & StatusHasInvitation );
00285 }
00286 
00287 bool Akonadi::MessageStatus::isSigned() const
00288 {
00289   return ( mStatus & StatusSigned );
00290 }
00291 
00292 bool Akonadi::MessageStatus::isEncrypted() const
00293 {
00294   return ( mStatus & StatusEncrypted );
00295 }
00296 
00297 bool Akonadi::MessageStatus::hasError() const
00298 {
00299   return ( mStatus & StatusHasError );
00300 }
00301 
00302 
00303 void Akonadi::MessageStatus::setRead( bool read )
00304 {
00305   if ( read ) {
00306     mStatus |= StatusRead;
00307   } else {
00308     mStatus &= ~StatusRead;
00309   }
00310 }
00311 
00312 void Akonadi::MessageStatus::setDeleted( bool deleted )
00313 {
00314   if ( deleted ) {
00315     mStatus |= StatusDeleted;
00316   } else {
00317     mStatus &= ~StatusDeleted;
00318   }
00319 }
00320 
00321 void Akonadi::MessageStatus::setReplied( bool replied )
00322 {
00323   if ( replied ) {
00324     mStatus |= StatusReplied;
00325   } else {
00326     mStatus &= ~StatusReplied;
00327   }
00328 }
00329 
00330 void Akonadi::MessageStatus::setForwarded( bool forwarded )
00331 {
00332   if ( forwarded ) {
00333     mStatus |= StatusForwarded;
00334   } else {
00335     mStatus &= ~StatusForwarded;
00336   }
00337 }
00338 
00339 void Akonadi::MessageStatus::setQueued( bool queued )
00340 {
00341   if ( queued ) {
00342     mStatus |= StatusQueued;
00343   } else {
00344     mStatus &= ~StatusQueued;
00345   }
00346 }
00347 
00348 void Akonadi::MessageStatus::setSent( bool sent )
00349 {
00350   if ( sent ) {
00351     mStatus &= ~StatusQueued;
00352     mStatus |= StatusSent;
00353   } else {
00354     mStatus &= ~StatusSent;
00355   }
00356 }
00357 
00358 void Akonadi::MessageStatus::setImportant( bool important )
00359 {
00360   if ( important ) {
00361     mStatus |= StatusFlag;
00362   } else {
00363     mStatus &= ~StatusFlag;
00364   }
00365 }
00366 
00367 // Watched and ignored are mutually exclusive
00368 void Akonadi::MessageStatus::setWatched( bool watched )
00369 {
00370   if ( watched ) {
00371     mStatus &= ~StatusIgnored;
00372     mStatus |= StatusWatched;
00373   } else {
00374     mStatus &= ~StatusWatched;
00375   }
00376 }
00377 
00378 void Akonadi::MessageStatus::setIgnored( bool ignored )
00379 {
00380   if ( ignored ) {
00381     mStatus &= ~StatusWatched;
00382     mStatus |= StatusIgnored;
00383   } else {
00384     mStatus &= ~StatusIgnored;
00385   }
00386 }
00387 
00388 void Akonadi::MessageStatus::setToAct( bool toAct )
00389 {
00390   if ( toAct ) {
00391     mStatus |= StatusToAct;
00392   } else {
00393     mStatus &= ~StatusToAct;
00394   }
00395 }
00396 
00397 // Ham and Spam are mutually exclusive
00398 void Akonadi::MessageStatus::setSpam( bool spam )
00399 {
00400   if ( spam ) {
00401     mStatus &= ~StatusHam;
00402     mStatus |= StatusSpam;
00403   } else {
00404     mStatus &= ~StatusSpam;
00405   }
00406 }
00407 
00408 void Akonadi::MessageStatus::setHam( bool ham )
00409 {
00410   if ( ham ) {
00411     mStatus &= ~StatusSpam;
00412     mStatus |= StatusHam;
00413   } else {
00414     mStatus &= ~StatusHam;
00415   }
00416 }
00417 
00418 void Akonadi::MessageStatus::setHasAttachment( bool withAttachment )
00419 {
00420   if ( withAttachment ) {
00421     mStatus |= StatusHasAttachment;
00422   } else {
00423     mStatus &= ~StatusHasAttachment;
00424   }
00425 }
00426 
00427 void Akonadi::MessageStatus::setHasInvitation( bool withInvitation )
00428 {
00429   if ( withInvitation ) {
00430     mStatus |= StatusHasInvitation;
00431   } else {
00432     mStatus &= ~StatusHasInvitation;
00433   }
00434 }
00435 
00436 void Akonadi::MessageStatus::setSigned( bool value )
00437 {
00438   if ( value ) {
00439     mStatus |= StatusSigned;
00440   } else {
00441     mStatus &= ~StatusSigned;
00442   }
00443 }
00444 
00445 void Akonadi::MessageStatus::setEncrypted( bool value )
00446 {
00447   if ( value ) {
00448     mStatus |= StatusEncrypted;
00449   } else {
00450     mStatus &= ~StatusEncrypted;
00451   }
00452 }
00453 
00454 void Akonadi::MessageStatus::setHasError( bool hasError )
00455 {
00456   if ( hasError ) {
00457     mStatus |= StatusHasError;
00458   } else {
00459     mStatus &= ~StatusHasError;
00460   }
00461 }
00462 
00463 qint32 Akonadi::MessageStatus::toQInt32() const
00464 {
00465   return mStatus;
00466 }
00467 
00468 
00469 void Akonadi::MessageStatus::fromQInt32( qint32 status )
00470 {
00471   mStatus = status;
00472 }
00473 
00474 QString Akonadi::MessageStatus::statusStr() const
00475 {
00476   QByteArray sstr;
00477   if ( mStatus & StatusRead ) {
00478     sstr += 'R';
00479   } else {
00480     sstr += 'U';
00481   }
00482   if ( mStatus & StatusDeleted ) {
00483     sstr += 'D';
00484   }
00485   if ( mStatus & StatusReplied ) {
00486     sstr += 'A';
00487   }
00488   if ( mStatus & StatusForwarded ) {
00489     sstr += 'F';
00490   }
00491   if ( mStatus & StatusQueued ) {
00492     sstr += 'Q';
00493   }
00494   if ( mStatus & StatusToAct ) {
00495     sstr += 'K';
00496   }
00497   if ( mStatus & StatusSent ) {
00498     sstr += 'S';
00499   }
00500   if ( mStatus & StatusFlag ) {
00501     sstr += 'G';
00502   }
00503   if ( mStatus & StatusWatched ) {
00504     sstr += 'W';
00505   }
00506   if ( mStatus & StatusIgnored ) {
00507     sstr += 'I';
00508   }
00509   if ( mStatus & StatusSpam ) {
00510     sstr += 'P';
00511   }
00512   if ( mStatus & StatusHam ) {
00513     sstr += 'H';
00514   }
00515   if ( mStatus & StatusHasAttachment ) {
00516     sstr += 'T';
00517   }
00518 
00519   return QLatin1String( sstr );
00520 }
00521 
00522 void Akonadi::MessageStatus::setStatusFromStr( const QString& aStr )
00523 {
00524   mStatus = StatusUnknown;
00525 
00526   if ( aStr.contains( QLatin1Char( 'U' ) ) ) {
00527     setRead( false );
00528   }
00529   if ( aStr.contains( QLatin1Char( 'R' ) ) ) {
00530     setRead();
00531   }
00532   if ( aStr.contains( QLatin1Char( 'D' ) ) ) {
00533     setDeleted();
00534   }
00535   if ( aStr.contains( QLatin1Char( 'A' ) ) ) {
00536     setReplied();
00537   }
00538   if ( aStr.contains( QLatin1Char( 'F' ) ) ) {
00539     setForwarded();
00540   }
00541   if ( aStr.contains( QLatin1Char( 'Q' ) ) ) {
00542     setQueued();
00543   }
00544   if ( aStr.contains( QLatin1Char( 'K' ) ) ) {
00545     setToAct();
00546   }
00547   if ( aStr.contains( QLatin1Char( 'S' ) ) ) {
00548     setSent();
00549   }
00550   if ( aStr.contains( QLatin1Char( 'G' ) ) ) {
00551     setImportant();
00552   }
00553   if ( aStr.contains( QLatin1Char( 'W' ) ) ) {
00554     setWatched();
00555   }
00556   if ( aStr.contains( QLatin1Char( 'I' ) ) ) {
00557     setIgnored();
00558   }
00559   if ( aStr.contains( QLatin1Char( 'P' ) ) ) {
00560     setSpam();
00561   }
00562   if ( aStr.contains( QLatin1Char( 'H' ) ) ) {
00563     setHam();
00564   }
00565   if ( aStr.contains( QLatin1Char( 'T' ) ) ) {
00566     setHasAttachment();
00567   }
00568   if ( aStr.contains( QLatin1Char( 'C' ) ) ) {
00569     setHasAttachment( false );
00570   }
00571 }
00572 
00573 QSet<QByteArray> Akonadi::MessageStatus::statusFlags() const
00574 {
00575   QSet<QByteArray> flags;
00576 
00577   if ( mStatus & StatusDeleted ) {
00578     flags += Akonadi::MessageFlags::Deleted;
00579   } else {
00580     if ( mStatus &  StatusRead )
00581       flags += Akonadi::MessageFlags::Seen;
00582     if ( mStatus & StatusReplied )
00583       flags += Akonadi::MessageFlags::Answered;
00584     if ( mStatus & StatusFlag )
00585       flags += Akonadi::MessageFlags::Flagged;
00586 
00587     // non standard flags
00588     if ( mStatus & StatusSent )
00589       flags += Akonadi::MessageFlags::Sent;
00590     if ( mStatus & StatusQueued )
00591       flags += Akonadi::MessageFlags::Queued;
00592     if ( mStatus & StatusReplied )
00593       flags += Akonadi::MessageFlags::Replied;
00594     if ( mStatus & StatusForwarded )
00595       flags += Akonadi::MessageFlags::Forwarded;
00596     if ( mStatus & StatusToAct )
00597       flags += Akonadi::MessageFlags::ToAct;
00598     if ( mStatus & StatusWatched )
00599       flags += Akonadi::MessageFlags::Watched;
00600     if ( mStatus & StatusIgnored )
00601       flags += Akonadi::MessageFlags::Ignored;
00602     if ( mStatus & StatusHasAttachment )
00603       flags += Akonadi::MessageFlags::HasAttachment;
00604     if ( mStatus & StatusHasInvitation )
00605       flags += Akonadi::MessageFlags::HasInvitation;
00606     if ( mStatus & StatusSigned )
00607       flags += Akonadi::MessageFlags::Signed;
00608     if ( mStatus & StatusEncrypted )
00609       flags += Akonadi::MessageFlags::Encrypted;
00610     if ( mStatus & StatusSpam )
00611       flags += Akonadi::MessageFlags::Spam;
00612     if ( mStatus & StatusHam )
00613       flags += Akonadi::MessageFlags::Ham;
00614     if ( mStatus & StatusHasError )
00615       flags += Akonadi::MessageFlags::HasError;
00616   }
00617 
00618   return flags;
00619 }
00620 
00621 void Akonadi::MessageStatus::setStatusFromFlags( const QSet<QByteArray> &flags )
00622 {
00623   mStatus = StatusUnknown;
00624 
00625   foreach ( const QByteArray &flag, flags ) {
00626     const QByteArray &upperedFlag = flag.toUpper();
00627     if ( upperedFlag ==  Akonadi::MessageFlags::Deleted ) {
00628       setDeleted();
00629     } else if ( upperedFlag == Akonadi::MessageFlags::Seen ) {
00630       setRead();
00631     } else if ( upperedFlag == Akonadi::MessageFlags::Answered ) {
00632       setReplied();
00633     } else if ( upperedFlag == Akonadi::MessageFlags::Flagged ) {
00634       setImportant();
00635 
00636     // non standard flags
00637     } else if ( upperedFlag == Akonadi::MessageFlags::Sent ) {
00638       setSent();
00639     } else if ( upperedFlag == Akonadi::MessageFlags::Queued ) {
00640       setQueued();
00641     } else if ( upperedFlag == Akonadi::MessageFlags::Replied ) {
00642       setReplied();
00643     } else if ( upperedFlag == Akonadi::MessageFlags::Forwarded ) {
00644       setForwarded();
00645     } else if ( upperedFlag == Akonadi::MessageFlags::ToAct ) {
00646       setToAct();
00647     } else if ( upperedFlag == Akonadi::MessageFlags::Watched ) {
00648       setWatched();
00649     } else if ( upperedFlag == Akonadi::MessageFlags::Ignored ) {
00650       setIgnored();
00651     } else if ( upperedFlag ==  Akonadi::MessageFlags::HasAttachment ) {
00652       setHasAttachment();
00653     } else if ( upperedFlag ==  Akonadi::MessageFlags::HasInvitation ) {
00654       setHasInvitation();
00655     } else if ( upperedFlag == Akonadi::MessageFlags::Signed ) {
00656       setSigned();
00657     } else if ( upperedFlag == Akonadi::MessageFlags::Encrypted ) {
00658       setEncrypted();
00659     } else if ( upperedFlag == Akonadi::MessageFlags::Spam ) {
00660       setSpam();
00661     } else if ( upperedFlag == Akonadi::MessageFlags::Ham ) {
00662       setHam();
00663     } else if ( upperedFlag == Akonadi::MessageFlags::HasError ) {
00664       setHasError();
00665     } else {
00666       kWarning() << "Unknown flag:" << flag;
00667     }
00668   }
00669 }
00670 
00671 const Akonadi::MessageStatus Akonadi::MessageStatus::statusUnread()
00672 {
00673   Akonadi::MessageStatus st;
00674   st.mStatus = StatusUnread;
00675   return st;
00676 }
00677 
00678 const Akonadi::MessageStatus Akonadi::MessageStatus::statusRead()
00679 {
00680   Akonadi::MessageStatus st;
00681   st.setRead();
00682   return st;
00683 }
00684 
00685 const Akonadi::MessageStatus Akonadi::MessageStatus::statusDeleted()
00686 {
00687   Akonadi::MessageStatus st;
00688   st.setDeleted();
00689   return st;
00690 }
00691 
00692 const Akonadi::MessageStatus Akonadi::MessageStatus::statusReplied()
00693 {
00694   Akonadi::MessageStatus st;
00695   st.setReplied();
00696   return st;
00697 }
00698 
00699 const Akonadi::MessageStatus Akonadi::MessageStatus::statusForwarded()
00700 {
00701   Akonadi::MessageStatus st;
00702   st.setForwarded();
00703   return st;
00704 }
00705 
00706 const Akonadi::MessageStatus Akonadi::MessageStatus::statusQueued()
00707 {
00708   Akonadi::MessageStatus st;
00709   st.setQueued();
00710   return st;
00711 }
00712 
00713 const Akonadi::MessageStatus Akonadi::MessageStatus::statusSent()
00714 {
00715   Akonadi::MessageStatus st;
00716   st.setSent();
00717   return st;
00718 }
00719 
00720 const Akonadi::MessageStatus Akonadi::MessageStatus::statusImportant()
00721 {
00722   Akonadi::MessageStatus st;
00723   st.setImportant();
00724   return st;
00725 }
00726 
00727 const Akonadi::MessageStatus Akonadi::MessageStatus::statusWatched()
00728 {
00729   Akonadi::MessageStatus st;
00730   st.setWatched();
00731   return st;
00732 }
00733 
00734 const Akonadi::MessageStatus Akonadi::MessageStatus::statusIgnored()
00735 {
00736   Akonadi::MessageStatus st;
00737   st.setIgnored();
00738   return st;
00739 }
00740 
00741 const Akonadi::MessageStatus Akonadi::MessageStatus::statusToAct()
00742 {
00743   Akonadi::MessageStatus st;
00744   st.setToAct();
00745   return st;
00746 }
00747 
00748 const Akonadi::MessageStatus Akonadi::MessageStatus::statusSpam()
00749 {
00750   Akonadi::MessageStatus st;
00751   st.setSpam();
00752   return st;
00753 }
00754 
00755 const Akonadi::MessageStatus Akonadi::MessageStatus::statusHam()
00756 {
00757   Akonadi::MessageStatus st;
00758   st.setHam();
00759   return st;
00760 }
00761 
00762 const Akonadi::MessageStatus Akonadi::MessageStatus::statusHasAttachment()
00763 {
00764   Akonadi::MessageStatus st;
00765   st.setHasAttachment();
00766   return st;
00767 }
00768 
00769 const Akonadi::MessageStatus Akonadi::MessageStatus::statusHasInvitation()
00770 {
00771   MessageStatus st;
00772   st.setHasInvitation();
00773   return st;
00774 }
00775 
00776 const Akonadi::MessageStatus Akonadi::MessageStatus::statusSigned()
00777 {
00778   MessageStatus st;
00779   st.setSigned();
00780   return st;
00781 }
00782 
00783 const Akonadi::MessageStatus Akonadi::MessageStatus::statusEncrypted()
00784 {
00785   MessageStatus st;
00786   st.setEncrypted();
00787   return st;
00788 }
00789 
00790 const Akonadi::MessageStatus Akonadi::MessageStatus::statusHasError()
00791 {
00792   MessageStatus st;
00793   st.setHasError();
00794   return st;
00795 }

akonadi/kmime

Skip menu "akonadi/kmime"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • 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
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal