KIMAP2
25#include "kimap_debug.h"
27using namespace KIMAP2;
31 tags << sessionInternal()->sendCommand(command, args);
32 m_currentCommand = command +
"" + args;
36 :
KJob(session), d_ptr(new JobPrivate(session,
"Job"))
40Job::Job(JobPrivate &dd)
41 :
KJob(dd.m_session), d_ptr(&dd)
50Session *Job::session()
const
59 d->sessionInternal()->addJob(
this);
62void Job::handleResponse(
const Message &response)
64 handleErrorReplies(response);
67void Job::connectionLost()
71 setErrorText(
"Connection to server lost: " + d->m_errorMessage);
78 d->m_socketError =
error;
81void Job::setErrorMessage(
const QString &msg)
84 d->m_errorMessage = msg;
87Job::HandlerResponse Job::handleErrorReplies(
const Message &response)
92 if (!response.content.isEmpty() &&
93 d->tags.contains(response.content.first().toString())) {
94 if (response.content.size() < 2) {
95 setErrorText(QString(
"%1 failed, malformed reply from the server.").arg(d->m_name));
96 }
else if (response.content[1].toString() !=
"OK") {
98 setErrorText(QString(
"%1 failed, server replied: %2.\n Sent command: %3").arg(d->m_name).arg(QLatin1String(response.toString().constData())).arg(QString(d->m_currentCommand)));
100 d->tags.removeAll(response.content.first().toString());
101 if (d->tags.isEmpty()) {
void setErrorText(const QString &errorText)
void setError(int errorCode)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:10:33 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.