Changeset View
Changeset View
Standalone View
Standalone View
src/core/protocolhelper_p.h
Show All 34 Lines | |||||
35 | #include "private/tristate_p.h" | 35 | #include "private/tristate_p.h" | ||
36 | 36 | | |||
37 | #include <QString> | 37 | #include <QString> | ||
38 | 38 | | |||
39 | #include <algorithm> | 39 | #include <algorithm> | ||
40 | #include <type_traits> | 40 | #include <type_traits> | ||
41 | #include <functional> | 41 | #include <functional> | ||
42 | #include <cassert> | 42 | #include <cassert> | ||
43 | #include <set> | ||||
43 | 44 | | |||
44 | namespace Akonadi | 45 | namespace Akonadi | ||
45 | { | 46 | { | ||
46 | 47 | | |||
47 | struct ProtocolHelperValuePool { | 48 | struct ProtocolHelperValuePool { | ||
48 | typedef Internal::SharedValuePool<QByteArray, QVector> FlagPool; | 49 | typedef Internal::SharedValuePool<QByteArray, QVector> FlagPool; | ||
49 | typedef Internal::SharedValuePool<QString, QVector> MimeTypePool; | 50 | typedef Internal::SharedValuePool<QString, QVector> MimeTypePool; | ||
50 | 51 | | |||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 67 | public: | |||
131 | static CollectionStatistics parseCollectionStatistics(const Protocol::FetchCollectionStatsResponse &stats); | 132 | static CollectionStatistics parseCollectionStatistics(const Protocol::FetchCollectionStatsResponse &stats); | ||
132 | 133 | | |||
133 | /** | 134 | /** | ||
134 | Convert attributes to their protocol representation. | 135 | Convert attributes to their protocol representation. | ||
135 | */ | 136 | */ | ||
136 | static Protocol::Attributes attributesToProtocol(const Item &item, bool ns = false); | 137 | static Protocol::Attributes attributesToProtocol(const Item &item, bool ns = false); | ||
137 | static Protocol::Attributes attributesToProtocol(const Collection &collection, bool ns = false); | 138 | static Protocol::Attributes attributesToProtocol(const Collection &collection, bool ns = false); | ||
138 | static Protocol::Attributes attributesToProtocol(const Tag &entity, bool ns = false); | 139 | static Protocol::Attributes attributesToProtocol(const Tag &entity, bool ns = false); | ||
140 | static Protocol::Attributes attributesToProtocol(const std::vector<Attribute *> &modifiedAttributes, bool ns = false); | ||||
139 | 141 | | |||
140 | /** | 142 | /** | ||
141 | Encodes part label and namespace. | 143 | Encodes part label and namespace. | ||
142 | */ | 144 | */ | ||
143 | static QByteArray encodePartIdentifier(PartNamespace ns, const QByteArray &label); | 145 | static QByteArray encodePartIdentifier(PartNamespace ns, const QByteArray &label); | ||
144 | 146 | | |||
145 | /** | 147 | /** | ||
146 | Decode part label and namespace. | 148 | Decode part label and namespace. | ||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |