Akonadi

aggregatedfetchscope.h
1 /*
2  SPDX-FileCopyrightText: 2017 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QSet>
10 
11 #include <private/protocol_p.h>
12 
13 #include <memory>
14 
15 class QByteArray;
16 
17 namespace Akonadi
18 {
19 namespace Server
20 {
21 class AggregatedCollectionFetchScopePrivate;
22 class AggregatedCollectionFetchScope
23 {
24 public:
25  explicit AggregatedCollectionFetchScope();
26  ~AggregatedCollectionFetchScope();
27 
28  void apply(const Protocol::CollectionFetchScope &oldScope, const Protocol::CollectionFetchScope &newScope);
29 
30  QSet<QByteArray> attributes() const;
31 
32  bool fetchIdOnly() const;
33  bool fetchStatistics() const;
34 
35  void addSubscriber();
36  void removeSubscriber();
37 
38 private:
39  std::unique_ptr<AggregatedCollectionFetchScopePrivate> const d_ptr;
40  Q_DECLARE_PRIVATE(AggregatedCollectionFetchScope)
41 };
42 
43 class AggregatedItemFetchScopePrivate;
44 class AggregatedItemFetchScope
45 {
46 public:
47  explicit AggregatedItemFetchScope();
48  ~AggregatedItemFetchScope();
49 
50  void apply(const Protocol::ItemFetchScope &oldScope, const Protocol::ItemFetchScope &newScope);
51  Protocol::ItemFetchScope toFetchScope() const;
52 
53  QSet<QByteArray> requestedParts() const;
54 
55  Protocol::ItemFetchScope::AncestorDepth ancestorDepth() const;
56  void updateAncestorDepth(Protocol::ItemFetchScope::AncestorDepth oldDepth, Protocol::ItemFetchScope::AncestorDepth newDepth);
57 
58  bool cacheOnly() const;
59  bool fullPayload() const;
60  bool allAttributes() const;
61  bool fetchSize() const;
62  bool fetchMTime() const;
63  bool fetchRemoteRevision() const;
64  bool ignoreErrors() const;
65  bool fetchFlags() const;
66  bool fetchRemoteId() const;
67  bool fetchGID() const;
68  bool fetchTags() const;
69  bool fetchRelations() const;
70  bool fetchVirtualReferences() const;
71 
72  void addSubscriber();
73  void removeSubscriber();
74 
75 private:
76  std::unique_ptr<AggregatedItemFetchScopePrivate> const d_ptr;
77  Q_DECLARE_PRIVATE(AggregatedItemFetchScope)
78 };
79 
80 class AggregatedTagFetchScopePrivate;
81 class AggregatedTagFetchScope
82 {
83 public:
84  explicit AggregatedTagFetchScope();
85  ~AggregatedTagFetchScope();
86 
87  void apply(const Protocol::TagFetchScope &oldScope, const Protocol::TagFetchScope &newScope);
88  Protocol::TagFetchScope toFetchScope() const;
89 
90  QSet<QByteArray> attributes() const;
91 
92  void addSubscriber();
93  void removeSubscriber();
94 
95  bool fetchIdOnly() const;
96  bool fetchRemoteId() const;
97  bool fetchAllAttributes() const;
98 
99 private:
100  std::unique_ptr<AggregatedTagFetchScopePrivate> const d_ptr;
101  Q_DECLARE_PRIVATE(AggregatedTagFetchScope)
102 };
103 
104 } // namespace Server
105 } // namespace Akonadi
106 
KGuiItem apply()
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.