Changeset View
Changeset View
Standalone View
Standalone View
plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksurlhandler.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright (c) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or modify it | ||||
5 | under the terms of the GNU Library General Public License as published by | ||||
6 | the Free Software Foundation; either version 2 of the License, or (at your | ||||
7 | option) any later version. | ||||
8 | | ||||
9 | This library is distributed in the hope that it will be useful, but WITHOUT | ||||
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||||
12 | License for more details. | ||||
13 | | ||||
14 | You should have received a copy of the GNU Library General Public License | ||||
15 | along with this library; see the file COPYING.LIB. If not, write to the | ||||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||||
17 | 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #ifndef GNUPGWKSURLHANDLER_H_ | ||||
21 | #define GNUPGWKSURLHANDLER_H_ | ||||
22 | | ||||
23 | #include <QtGlobal> | ||||
24 | #include <MessageViewer/BodyPartURLHandler> | ||||
25 | | ||||
26 | #include <KMime/Message> | ||||
27 | | ||||
28 | class GnuPGWKSMessagePart; | ||||
29 | | ||||
30 | class ApplicationGnuPGWKSUrlHandler : public MimeTreeParser::Interface::BodyPartURLHandler | ||||
31 | { | ||||
32 | public: | ||||
33 | ApplicationGnuPGWKSUrlHandler() = default; | ||||
34 | | ||||
35 | bool handleClick(MessageViewer::Viewer *viewerInstance, | ||||
36 | MimeTreeParser::Interface::BodyPart *part, | ||||
37 | const QString &path) const Q_DECL_OVERRIDE; | ||||
38 | bool handleContextMenuRequest(MimeTreeParser::Interface::BodyPart *part, | ||||
39 | const QString &path, | ||||
40 | const QPoint &p) const Q_DECL_OVERRIDE; | ||||
41 | QString statusBarMessage(MimeTreeParser::Interface::BodyPart *part, | ||||
42 | const QString &path) const Q_DECL_OVERRIDE; | ||||
43 | | ||||
44 | private: | ||||
45 | bool sendConfirmation(MessageViewer::Viewer *viewerInstance, | ||||
46 | const GnuPGWKSMessagePart &mp) const; | ||||
47 | | ||||
48 | QByteArray createConfirmation(const KMime::Message::Ptr &msg) const; | ||||
49 | }; | ||||
50 | | ||||
51 | | ||||
52 | #endif |