KIMAP

sessionuiproxy.h
1 /*
2  SPDX-FileCopyrightText: 2009 Andras Mantia <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "kimap_export.h"
10 
11 #include "job.h"
12 
13 #include <QSharedPointer>
14 
15 class KSslErrorUiData;
16 
17 namespace KIMAP
18 {
19 /** @short Interface to display communication errors and wait for user feedback. */
20 class KIMAP_EXPORT SessionUiProxy
21 {
22 public:
24 
25  virtual ~SessionUiProxy();
26  /**
27  * Show an SSL error and ask the user whether it should be ignored or not.
28  * The recommended KDE UI is the following:
29  * @code
30  * #include <kio/ksslui.h>
31  * class UiProxy: public SessionUiProxy {
32  * public:
33  * bool ignoreSslError(const KSslErrorUiData& errorData) {
34  * if (KIO::SslUi::askIgnoreSslErrors(errorData)) {
35  * return true;
36  * } else {
37  * return false;
38  * }
39  * }
40  * };
41  * [...]
42  * Session session(server, port);
43  * UiProxy *proxy = new UiProxy();
44  * session.setUiProxy(proxy);
45  * @endcode
46  * @param errorData contains details about the error.
47  * @return true if the error can be ignored
48  */
49  virtual bool ignoreSslError(const KSslErrorUiData &errorData) = 0;
50 };
51 
52 }
Interface to display communication errors and wait for user feedback.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:51:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.