KIMAP::SessionUiProxy Class

Interface to display communication errors and wait for user feedback. More...

Header: #include <KIMAP/SessionUiProxy>
CMake: find_package(KPim6IMAP REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::IMAP)

Public Types

Ptr

Public Functions

virtual bool ignoreSslError(const KSslErrorUiData &errorData) = 0

Detailed Description

Member Type Documentation

[alias] SessionUiProxy::Ptr

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