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 fetchRelations() const;
70 bool fetchVirtualReferences() const;
71
72 void addSubscriber();
73 void removeSubscriber();
74
75private:
76 std::unique_ptr<AggregatedItemFetchScopePrivate> const d_ptr;
77 Q_DECLARE_PRIVATE(AggregatedItemFetchScope)
78};
79
80class AggregatedTagFetchScopePrivate;
81class AggregatedTagFetchScope
82{
83public:
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
99private:
100 std::unique_ptr<AggregatedTagFetchScopePrivate> const d_ptr;
101 Q_DECLARE_PRIVATE(AggregatedTagFetchScope)
102};
103
104} // namespace Server
105} // 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 Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.