diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-08-02 18:14:00 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-08-02 18:14:00 +0200 |
commit | 92d6fbd8f6a504da869454ca85f861e30c89a73c (patch) | |
tree | 99c7d66317659e129e2ed67f14d8f3a7006368c2 /framework/domain/mimetreeparser/interface.h | |
parent | 2d0608ddf1b84991ca7a693ce00e70b6447644d9 (diff) | |
download | kube-92d6fbd8f6a504da869454ca85f861e30c89a73c.tar.gz kube-92d6fbd8f6a504da869454ca85f861e30c89a73c.zip |
make signs & encrytiopn work
Diffstat (limited to 'framework/domain/mimetreeparser/interface.h')
-rw-r--r-- | framework/domain/mimetreeparser/interface.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/framework/domain/mimetreeparser/interface.h b/framework/domain/mimetreeparser/interface.h index a6a7f39d..a482a824 100644 --- a/framework/domain/mimetreeparser/interface.h +++ b/framework/domain/mimetreeparser/interface.h | |||
@@ -54,7 +54,12 @@ class EncryptionError; | |||
54 | 54 | ||
55 | class Key; | 55 | class Key; |
56 | class Signature; | 56 | class Signature; |
57 | class SignaturePrivate; | ||
57 | class Encryption; | 58 | class Encryption; |
59 | class EncryptionPrivate; | ||
60 | |||
61 | typedef std::shared_ptr<Signature> SignaturePtr; | ||
62 | typedef std::shared_ptr<Encryption> EncryptionPtr; | ||
58 | 63 | ||
59 | class Parser; | 64 | class Parser; |
60 | class ParserPrivate; | 65 | class ParserPrivate; |
@@ -109,6 +114,7 @@ class Content | |||
109 | public: | 114 | public: |
110 | typedef std::shared_ptr<Content> Ptr; | 115 | typedef std::shared_ptr<Content> Ptr; |
111 | Content(const QByteArray &content, Part *parent); | 116 | Content(const QByteArray &content, Part *parent); |
117 | Content(ContentPrivate *d_ptr); | ||
112 | virtual ~Content(); | 118 | virtual ~Content(); |
113 | 119 | ||
114 | QByteArray content() const; | 120 | QByteArray content() const; |
@@ -121,8 +127,8 @@ public: | |||
121 | // overwrite default charset with given charset | 127 | // overwrite default charset with given charset |
122 | QString encodedContent(QByteArray charset) const; | 128 | QString encodedContent(QByteArray charset) const; |
123 | 129 | ||
124 | virtual QVector<Signature> signatures() const; | 130 | QVector<SignaturePtr> signatures() const; |
125 | virtual QVector<Encryption> encryptions() const; | 131 | QVector<EncryptionPtr> encryptions() const; |
126 | MailMime::Ptr mailMime() const; | 132 | MailMime::Ptr mailMime() const; |
127 | virtual QByteArray type() const; | 133 | virtual QByteArray type() const; |
128 | Part* parent() const; | 134 | Part* parent() const; |
@@ -134,6 +140,7 @@ class PlainTextContent : public Content | |||
134 | { | 140 | { |
135 | public: | 141 | public: |
136 | PlainTextContent(const QByteArray &content, Part *parent); | 142 | PlainTextContent(const QByteArray &content, Part *parent); |
143 | PlainTextContent(ContentPrivate *d_ptr); | ||
137 | QByteArray type() const Q_DECL_OVERRIDE; | 144 | QByteArray type() const Q_DECL_OVERRIDE; |
138 | }; | 145 | }; |
139 | 146 | ||
@@ -141,6 +148,7 @@ class HtmlContent : public Content | |||
141 | { | 148 | { |
142 | public: | 149 | public: |
143 | HtmlContent(const QByteArray &content, Part *parent); | 150 | HtmlContent(const QByteArray &content, Part *parent); |
151 | HtmlContent(ContentPrivate* d_ptr); | ||
144 | QByteArray type() const Q_DECL_OVERRIDE; | 152 | QByteArray type() const Q_DECL_OVERRIDE; |
145 | }; | 153 | }; |
146 | 154 | ||
@@ -171,9 +179,8 @@ public: | |||
171 | int keyLength() const; | 179 | int keyLength() const; |
172 | 180 | ||
173 | private: | 181 | private: |
174 | std::unique_ptr<CertContentPrivate> d; | 182 | std::unique_ptr<CertContentPrivate> d; |
175 | }; | 183 | }; |
176 | |||
177 | class Part | 184 | class Part |
178 | { | 185 | { |
179 | public: | 186 | public: |
@@ -189,8 +196,8 @@ public: | |||
189 | QVector<Part::Ptr> subParts() const; | 196 | QVector<Part::Ptr> subParts() const; |
190 | Part *parent() const; | 197 | Part *parent() const; |
191 | 198 | ||
192 | virtual QVector<Signature> signatures() const; | 199 | QVector<SignaturePtr> signatures() const; |
193 | virtual QVector<Encryption> encryptions() const; | 200 | QVector<EncryptionPtr> encryptions() const; |
194 | virtual MailMime::Ptr mailMime() const; | 201 | virtual MailMime::Ptr mailMime() const; |
195 | protected: | 202 | protected: |
196 | std::unique_ptr<PartPrivate> d; | 203 | std::unique_ptr<PartPrivate> d; |
@@ -298,12 +305,20 @@ class Key | |||
298 | 305 | ||
299 | class Signature | 306 | class Signature |
300 | { | 307 | { |
308 | public: | ||
309 | typedef std::shared_ptr<Signature> Ptr; | ||
310 | Signature(); | ||
311 | Signature(SignaturePrivate *); | ||
312 | ~Signature(); | ||
313 | |||
301 | Key key() const; | 314 | Key key() const; |
302 | QDateTime creationDateTime() const; | 315 | QDateTime creationDateTime() const; |
303 | QDateTime expirationTime() const; | 316 | QDateTime expirationTime() const; |
304 | bool neverExpires() const; | 317 | bool neverExpires() const; |
305 | 318 | ||
306 | //template <> StatusObject<SignatureVerificationResult> verify() const; | 319 | //template <> StatusObject<SignatureVerificationResult> verify() const; |
320 | private: | ||
321 | std::unique_ptr<SignaturePrivate> d; | ||
307 | }; | 322 | }; |
308 | 323 | ||
309 | /* | 324 | /* |
@@ -313,7 +328,14 @@ class Signature | |||
313 | */ | 328 | */ |
314 | class Encryption | 329 | class Encryption |
315 | { | 330 | { |
331 | public: | ||
332 | typedef std::shared_ptr<Encryption> Ptr; | ||
333 | Encryption(); | ||
334 | Encryption(EncryptionPrivate *); | ||
335 | ~Encryption(); | ||
316 | std::vector<Key> recipients() const; | 336 | std::vector<Key> recipients() const; |
337 | private: | ||
338 | std::unique_ptr<EncryptionPrivate> d; | ||
317 | }; | 339 | }; |
318 | 340 | ||
319 | class Parser | 341 | class Parser |