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

akonadi

  • akonadi
collection.h
1 /*
2  Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_COLLECTION_H
21 #define AKONADI_COLLECTION_H
22 
23 #include "akonadi_export.h"
24 
25 #include <akonadi/entity.h>
26 
27 #include <QtCore/QMetaType>
28 #include <QtCore/QSharedDataPointer>
29 
30 class KUrl;
31 
32 namespace Akonadi {
33 
34 class CachePolicy;
35 class CollectionPrivate;
36 class CollectionStatistics;
37 
75 class AKONADI_EXPORT Collection : public Entity
76 {
77  public:
81  typedef QList<Collection> List;
82 
86  enum Right {
87  ReadOnly = 0x0,
88  CanChangeItem = 0x1,
89  CanCreateItem = 0x2,
90  CanDeleteItem = 0x4,
91  CanChangeCollection = 0x8,
92  CanCreateCollection = 0x10,
93  CanDeleteCollection = 0x20,
94  CanLinkItem = 0x40,
95  CanUnlinkItem = 0x80,
96  AllRights = ( CanChangeItem | CanCreateItem | CanDeleteItem |
97  CanChangeCollection | CanCreateCollection | CanDeleteCollection )
98  };
99  Q_DECLARE_FLAGS( Rights, Right )
100 
101 
104  Collection();
105 
111  explicit Collection( Id id );
112 
116  ~Collection();
117 
121  Collection( const Collection &other );
122 
126  static Collection fromUrl( const KUrl &url );
127 
131  QString name() const;
132 
138  void setName( const QString &name );
139 
143  Rights rights() const;
144 
148  void setRights( Rights rights );
149 
155  QStringList contentMimeTypes() const;
156 
160  void setContentMimeTypes( const QStringList &types );
161 
166  KDE_DEPRECATED Id parent() const;
167 
172  KDE_DEPRECATED void setParent( Id parent );
173 
178  KDE_DEPRECATED void setParent( const Collection &collection );
179 
185  KDE_DEPRECATED QString parentRemoteId() const;
186 
191  KDE_DEPRECATED void setParentRemoteId( const QString &identifier );
192 
196  static Collection root();
197 
201  static QString mimeType();
202 
206  QString resource() const;
207 
211  void setResource( const QString &identifier );
212 
216  CachePolicy cachePolicy() const;
217 
221  void setCachePolicy( const CachePolicy &policy );
222 
226  CollectionStatistics statistics() const;
227 
231  void setStatistics( const CollectionStatistics &statistics );
232 
238  KUrl url() const;
239 
245  enum UrlType {
246  UrlShort = 0,
247  UrlWithName = 1
248  };
249 
255  KUrl url( UrlType type ) const;
256 
262  bool isVirtual() const;
263 
271  void setVirtual(bool isVirtual);
272 
273  private:
274  AKONADI_DECLARE_PRIVATE( Collection )
275  friend class CollectionFetchJob;
276  friend class CollectionModifyJob;
277 };
278 
279 }
280 
281 AKONADI_EXPORT uint qHash( const Akonadi::Collection &collection );
285 AKONADI_EXPORT QDebug operator<<( QDebug d, const Akonadi::Collection &collection );
286 
287 Q_DECLARE_METATYPE(Akonadi::Collection)
288 Q_DECLARE_METATYPE(Akonadi::Collection::List)
289 Q_DECLARE_OPERATORS_FOR_FLAGS( Akonadi::Collection::Rights )
290 
291 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:32 by doxygen 1.8.3.1 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.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • 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