Akonadi

itemsearchjob.h
1 /*
2  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_ITEMSEARCHJOB_H
8 #define AKONADI_ITEMSEARCHJOB_H
9 
10 #include "akonadicore_export.h"
11 #include "item.h"
12 #include "job.h"
13 #include "collection.h"
14 
15 
16 namespace Akonadi
17 {
18 
19 class TagFetchScope;
20 class ItemFetchScope;
21 class ItemSearchJobPrivate;
22 class SearchQuery;
23 
56 class AKONADICORE_EXPORT ItemSearchJob : public Job
57 {
58  Q_OBJECT
59 
60 public:
67  explicit ItemSearchJob(QObject *parent = nullptr);
68 
76  explicit ItemSearchJob(const SearchQuery &query, QObject *parent = nullptr);
77 
81  ~ItemSearchJob() override;
82 
88  void setQuery(const SearchQuery &query);
89 
101  void setFetchScope(const ItemFetchScope &fetchScope);
102 
115  ItemFetchScope &fetchScope();
116 
123  void setTagFetchScope(const TagFetchScope &fetchScope);
124 
131  TagFetchScope &tagFetchScope();
132 
136  Q_REQUIRED_RESULT Item::List items() const;
137 
143  void setMimeTypes(const QStringList &mimeTypes);
144 
150  Q_REQUIRED_RESULT QStringList mimeTypes() const;
151 
163  void setSearchCollections(const Collection::List &collections);
164 
173  Q_REQUIRED_RESULT Collection::List searchCollections() const;
174 
184  void setRecursive(bool recursive);
185 
191  bool isRecursive() const;
192 
217  void setRemoteSearchEnabled(bool enabled);
218 
224  Q_REQUIRED_RESULT bool isRemoteSearchEnabled() const;
225 
226 Q_SIGNALS:
236  void itemsReceived(const Akonadi::Item::List &items);
237 
238 protected:
239  void doStart() override;
240  bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override;
241 
242 private:
243  //@cond PRIVATE
244  Q_DECLARE_PRIVATE(ItemSearchJob)
245 
246  Q_PRIVATE_SLOT(d_func(), void timeout())
247  //@endcond
248 };
249 
250 }
251 
252 #endif
Specifies which parts of a tag should be fetched from the Akonadi storage.
Definition: tagfetchscope.h:22
Base class for all actions in the Akonadi storage.
Definition: job.h:80
A query that can be passed to ItemSearchJob or others.
Definition: searchquery.h:115
Specifies which parts of an item should be fetched from the Akonadi storage.
Helper integration between Akonadi and Qt.
Job that searches for items in the Akonadi storage.
Definition: itemsearchjob.h:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Aug 8 2020 23:14:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.