• Skip to content
  • Skip to link menu
KDE 4.4 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 
00075 class AKONADI_EXPORT Collection : public Entity
00076 {
00077   public:
00081     typedef QList<Collection> List;
00082 
00086     enum Right {
00087       ReadOnly = 0x0,                   
00088       CanChangeItem = 0x1,              
00089       CanCreateItem = 0x2,              
00090       CanDeleteItem = 0x4,              
00091       CanChangeCollection = 0x8,        
00092       CanCreateCollection = 0x10,       
00093       CanDeleteCollection = 0x20,       
00094       CanLinkItem = 0x40,               
00095       CanUnlinkItem = 0x80,             
00096       AllRights = (CanChangeItem | CanCreateItem | CanDeleteItem |
00097                    CanChangeCollection | CanCreateCollection | CanDeleteCollection) 
00098     };
00099     Q_DECLARE_FLAGS(Rights, Right)
00100 
00101     
00104     Collection();
00105 
00111     explicit Collection( Id id );
00112 
00116     ~Collection();
00117 
00121     Collection( const Collection &other );
00122 
00126     static Collection fromUrl( const KUrl &url );
00127 
00131     QString name() const;
00132 
00138     void setName( const QString &name );
00139 
00143     Rights rights() const;
00144 
00148     void setRights( Rights rights );
00149 
00155     QStringList contentMimeTypes() const;
00156 
00160     void setContentMimeTypes( const QStringList &types );
00161 
00166     KDE_DEPRECATED Id parent() const;
00167 
00172     KDE_DEPRECATED void setParent( Id parent );
00173 
00178     KDE_DEPRECATED void setParent( const Collection &collection );
00179 
00185     KDE_DEPRECATED QString parentRemoteId() const;
00186 
00191     KDE_DEPRECATED void setParentRemoteId( const QString &identifier );
00192 
00196     static Collection root();
00197 
00201     static QString mimeType();
00202 
00206     QString resource() const;
00207 
00211     void setResource( const QString &identifier );
00212 
00216     CachePolicy cachePolicy() const;
00217 
00221     void setCachePolicy( const CachePolicy &policy );
00222 
00226     CollectionStatistics statistics() const;
00227 
00231     void setStatistics( const CollectionStatistics &statistics );
00232 
00236     KUrl url() const;
00237 
00238   private:
00239     AKONADI_DECLARE_PRIVATE( Collection )
00240     friend class CollectionFetchJob;
00241     friend class CollectionModifyJob;
00242 };
00243 
00244 }
00245 
00246 AKONADI_EXPORT uint qHash( const Akonadi::Collection &collection );
00250 AKONADI_EXPORT QDebug operator<<( QDebug d, const Akonadi::Collection &collection );
00251 
00252 Q_DECLARE_METATYPE(Akonadi::Collection)
00253 Q_DECLARE_METATYPE(Akonadi::Collection::List)
00254 Q_DECLARE_OPERATORS_FOR_FLAGS( Akonadi::Collection::Rights )
00255 
00256 #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
  •   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.6.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