KIMAP

sessionuiproxy.h
1/*
2 SPDX-FileCopyrightText: 2009 Andras Mantia <amantia@kde.org>
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
15class KSslErrorUiData;
16
17namespace KIMAP
18{
19/** @short Interface to display communication errors and wait for user feedback. */
20class KIMAP_EXPORT SessionUiProxy
21{
22public:
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.
virtual bool ignoreSslError(const KSslErrorUiData &errorData)=0
Show an SSL error and ask the user whether it should be ignored or not.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:13:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.