KSmtp::SessionUiProxy Class
Interface to display communication errors and wait for user feedback. More...
| Header: | #include <sessionuiproxy.h> |
| CMake: | find_package(KPim6 REQUIRED COMPONENTS SMTP)target_link_libraries(mytarget PRIVATE KPim6::SMTP) |
Public Functions
| virtual bool | ignoreSslError(const KSslErrorUiData &errorData) = 0 |
Detailed Description
Member Function Documentation
[pure virtual] bool SessionUiProxy::ignoreSslError(const KSslErrorUiData &errorData)
Show an SSL error and ask the user whether it should be ignored or not. The recommended KDE UI is the following:
#include <kio/ksslui.h>
class UiProxy: public SessionUiProxy {
public:
bool ignoreSslError(const KSslErrorUiData& errorData) {
if (KIO::SslUi::askIgnoreSslErrors(errorData)) {
return true;
} else {
return false;
}
}
};
[...]
Session session(server, port);
UiProxy *proxy = new UiProxy();
session.setUiProxy(proxy);
errorData contains details about the error. Returns true if the error can be ignored