Akonadi

aggregatedfetchscope.h
1/*
2 SPDX-FileCopyrightText: 2017 Daniel Vrátil <dvratil@kde.org>
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
15class QByteArray;
16
17namespace Akonadi
18{
19namespace Server
20{
21class AggregatedCollectionFetchScopePrivate;
22class AggregatedCollectionFetchScope
23{
24public:
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
38private:
39 std::unique_ptr<AggregatedCollectionFetchScopePrivate> const d_ptr;
40 Q_DECLARE_PRIVATE(AggregatedCollectionFetchScope)
41};
42
43class AggregatedItemFetchScopePrivate;
44class AggregatedItemFetchScope
45{
46public:
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 fetchVirtualReferences() const;
70
71 void addSubscriber();
72 void removeSubscriber();
73
74private:
75 std::unique_ptr<AggregatedItemFetchScopePrivate> const d_ptr;
76 Q_DECLARE_PRIVATE(AggregatedItemFetchScope)
77};
78
79class AggregatedTagFetchScopePrivate;
80class AggregatedTagFetchScope
81{
82public:
83 explicit AggregatedTagFetchScope();
84 ~AggregatedTagFetchScope();
85
86 void apply(const Protocol::TagFetchScope &oldScope, const Protocol::TagFetchScope &newScope);
87 Protocol::TagFetchScope toFetchScope() const;
88
89 QSet<QByteArray> attributes() const;
90
91 void addSubscriber();
92 void removeSubscriber();
93
94 bool fetchIdOnly() const;
95 bool fetchRemoteId() const;
96 bool fetchAllAttributes() const;
97
98private:
99 std::unique_ptr<AggregatedTagFetchScopePrivate> const d_ptr;
100 Q_DECLARE_PRIVATE(AggregatedTagFetchScope)
101};
102
103} // namespace Server
104} // namespace Akonadi
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:58:37 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.