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

akonadi

collection.h

00001 /*
00002     Copyright (c) 2006 - 2007 Volker Krause <vkrause@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_COLLECTION_H
00021 #define AKONADI_COLLECTION_H
00022 
00023 #include "akonadi_export.h"
00024 
00025 #include <akonadi/entity.h>
00026 
00027 #include <QtCore/QMetaType>
00028 #include <QtCore/QSharedDataPointer>
00029 
00030 class KUrl;
00031 
00032 namespace Akonadi {
00033 
00034 class CachePolicy;
00035 class CollectionPrivate;
00036 class CollectionStatistics;
00037 
00065 class AKONADI_EXPORT Collection : public Entity
00066 {
00067   public:
00071     typedef QList<Collection> List;
00072 
00076     enum Right {
00077       ReadOnly = 0x0,                   
00078       CanChangeItem = 0x1,              
00079       CanCreateItem = 0x2,              
00080       CanDeleteItem = 0x4,              
00081       CanChangeCollection = 0x8,        
00082       CanCreateCollection = 0x10,       
00083       CanDeleteCollection = 0x20,       
00084       AllRights = (CanChangeItem | CanCreateItem | CanDeleteItem |
00085                    CanChangeCollection | CanCreateCollection | CanDeleteCollection) 
00086     };
00087     Q_DECLARE_FLAGS(Rights, Right)
00088 
00089     
00092     Collection();
00093 
00099     explicit Collection( Id id );
00100 
00104     ~Collection();
00105 
00109     Collection( const Collection &other );
00110 
00114     static Collection fromUrl( const KUrl &url );
00115 
00119     QString name() const;
00120 
00126     void setName( const QString &name );
00127 
00131     Rights rights() const;
00132 
00136     void setRights( Rights rights );
00137 
00143     QStringList contentMimeTypes() const;
00144 
00148     void setContentMimeTypes( const QStringList &types );
00149 
00153     Id parent() const;
00154 
00158     void setParent( Id parent );
00159 
00163     void setParent( const Collection &collection );
00164 
00169     QString parentRemoteId() const;
00170 
00174     void setParentRemoteId( const QString &identifier );
00175 
00179     static Collection root();
00180 
00184     static QString mimeType();
00185 
00189     QString resource() const;
00190 
00194     void setResource( const QString &identifier );
00195 
00199     CachePolicy cachePolicy() const;
00200 
00204     void setCachePolicy( const CachePolicy &policy );
00205 
00209     CollectionStatistics statistics() const;
00210 
00214     void setStatistics( const CollectionStatistics &statistics );
00215 
00219     KUrl url() const;
00220 
00221   private:
00222     AKONADI_DECLARE_PRIVATE( Collection )
00223     friend class CollectionFetchJob;
00224     friend class CollectionModifyJob;
00225 };
00226 
00227 }
00228 
00229 AKONADI_EXPORT uint qHash( const Akonadi::Collection &collection );
00230 
00231 Q_DECLARE_METATYPE(Akonadi::Collection)
00232 Q_DECLARE_METATYPE(Akonadi::Collection::List)
00233 
00234 #endif

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
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
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