• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

item_p.h

00001 /*
00002     Copyright (c) 2008 Tobias Koenig <tokoe@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or modify it
00005     under the terms of the GNU Library General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or (at your
00007     option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful, but WITHOUT
00010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012     License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to the
00016     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301, USA.
00018 */
00019 
00020 #ifndef AKONADI_ITEM_P_H
00021 #define AKONADI_ITEM_P_H
00022 
00023 #include <QtCore/QDateTime>
00024 #include <QtCore/QMap>
00025 
00026 #include "entity_p.h"
00027 #include "itempayloadinternals_p.h"
00028 
00029 namespace Akonadi {
00030 
00034 class ItemPrivate : public EntityPrivate
00035 {
00036   public:
00037     ItemPrivate( Item::Id id = -1 )
00038       : EntityPrivate( id ),
00039         mPayload( 0 ),
00040         mRevision( -1 ),
00041         mCollectionId( -1 ),
00042         mSize( 0 ),
00043         mModificationTime(),
00044         mFlagsOverwritten( false ),
00045         mSizeChanged( false ),
00046         mClearPayload( false )
00047     {
00048     }
00049 
00050     ItemPrivate( const ItemPrivate &other )
00051       : EntityPrivate( other )
00052     {
00053       mFlags = other.mFlags;
00054       mRevision = other.mRevision;
00055       mSize = other.mSize;
00056       mModificationTime = other.mModificationTime;
00057       mMimeType = other.mMimeType;
00058       if ( other.mPayload )
00059         mPayload = other.mPayload->clone();
00060       else
00061         mPayload = 0;
00062       mAddedFlags = other.mAddedFlags;
00063       mDeletedFlags = other.mDeletedFlags;
00064       mFlagsOverwritten = other.mFlagsOverwritten;
00065       mSizeChanged = other.mSizeChanged;
00066       mCollectionId = other.mCollectionId;
00067       mClearPayload = other.mClearPayload;
00068     }
00069 
00070     ~ItemPrivate()
00071     {
00072       delete mPayload;
00073     }
00074 
00075     void resetChangeLog()
00076     {
00077       mFlagsOverwritten = false;
00078       mAddedFlags.clear();
00079       mDeletedFlags.clear();
00080       mSizeChanged = false;
00081     }
00082 
00083     EntityPrivate *clone() const
00084     {
00085       return new ItemPrivate( *this );
00086     }
00087 
00088     PayloadBase*  mPayload;
00089     Item::Flags mFlags;
00090     int mRevision;
00091     Entity::Id mCollectionId;
00092     qint64 mSize;
00093     QDateTime mModificationTime;
00094     QString mMimeType;
00095     Item::Flags mAddedFlags;
00096     Item::Flags mDeletedFlags;
00097     bool mFlagsOverwritten;
00098     bool mSizeChanged;
00099     bool mClearPayload;
00100 };
00101 
00102 }
00103 
00104 #endif
00105 

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • 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
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • 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.1
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