Akonadi

mimetypechecker.h
1 /*
2  SPDX-FileCopyrightText: 2009 Kevin Krammer <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef MIMETYPECHECKER_H
8 #define MIMETYPECHECKER_H
9 
10 #include "akonadicore_export.h"
11 
12 #include <QSharedDataPointer>
13 
14 class QString;
15 class QStringList;
16 
17 namespace Akonadi
18 {
19 class Collection;
20 class Item;
21 class MimeTypeCheckerPrivate;
22 
97 class AKONADICORE_EXPORT MimeTypeChecker
98 {
99 public:
105  MimeTypeChecker();
106 
110  MimeTypeChecker(const MimeTypeChecker &other);
111 
115  ~MimeTypeChecker();
116 
120  MimeTypeChecker &operator=(const MimeTypeChecker &other);
121 
130  Q_REQUIRED_RESULT QStringList wantedMimeTypes() const;
131 
139  Q_REQUIRED_RESULT bool hasWantedMimeTypes() const;
140 
148  void setWantedMimeTypes(const QStringList &mimeTypes);
149 
157  void addWantedMimeType(const QString &mimeType);
158 
166  void removeWantedMimeType(const QString &mimeType);
167 
179  Q_REQUIRED_RESULT bool isWantedItem(const Item &item) const;
180 
193  Q_REQUIRED_RESULT bool isWantedCollection(const Collection &collection) const;
194 
205  Q_REQUIRED_RESULT bool isWantedMimeType(const QString &mimeType) const;
206 
217  Q_REQUIRED_RESULT bool containsWantedMimeType(const QStringList &mimeTypes) const;
218 
231  Q_REQUIRED_RESULT static bool isWantedItem(const Item &item, const QString &wantedMimeType);
232 
246  Q_REQUIRED_RESULT static bool isWantedCollection(const Collection &collection, const QString &wantedMimeType);
247 
248 private:
249  //@cond PRIVATE
251  //@endcond
252 };
253 
254 }
255 
256 #endif
Represents a collection of PIM items.
Definition: collection.h:63
Helper for checking MIME types of Collections and Items.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Oct 24 2020 23:21:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.