Akonadi

relationfetchjob.h
1 /*
2  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "job.h"
10 #include "relation.h"
11 
12 namespace Akonadi
13 {
14 class Relation;
15 class RelationFetchJobPrivate;
16 
17 /**
18  * @short Job that to fetch relations from Akonadi storage.
19  * @since 4.15
20  */
21 class AKONADICORE_EXPORT RelationFetchJob : public Job
22 {
23  Q_OBJECT
24 
25 public:
26  /**
27  * Creates a new relation fetch job.
28  *
29  * @param relation The relation to fetch.
30  * @param parent The parent object.
31  */
32  explicit RelationFetchJob(const Relation &relation, QObject *parent = nullptr);
33 
34  explicit RelationFetchJob(const QVector<QByteArray> &types, QObject *parent = nullptr);
35 
36  void setResource(const QString &identifier);
37 
38  /**
39  * Returns the relations.
40  */
41  Q_REQUIRED_RESULT Relation::List relations() const;
42 
43 Q_SIGNALS:
44  /**
45  * This signal is emitted whenever new relations have been fetched completely.
46  *
47  * @param relations The fetched relations.
48  */
49  void relationsReceived(const Akonadi::Relation::List &relations);
50 
51 protected:
52  void doStart() override;
53  bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override;
54 
55 private:
56  Q_DECLARE_PRIVATE(RelationFetchJob)
57 };
58 
59 }
An Akonadi Relation.
Definition: relation.h:39
Job that to fetch relations from Akonadi storage.
Base class for all actions in the Akonadi storage.
Definition: job.h:80
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Dec 6 2022 03:53:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.