File indexing completed on 2024-05-12 05:17:15

0001 /*
0002     SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "logoutjob.h"
0008 
0009 #include <KLocalizedString>
0010 
0011 #include "job_p.h"
0012 #include "response_p.h"
0013 #include "session_p.h"
0014 
0015 namespace KIMAP
0016 {
0017 class LogoutJobPrivate : public JobPrivate
0018 {
0019 public:
0020     LogoutJobPrivate(Session *session, const QString &name)
0021         : JobPrivate(session, name)
0022     {
0023     }
0024     ~LogoutJobPrivate()
0025     {
0026     }
0027 };
0028 }
0029 
0030 using namespace KIMAP;
0031 
0032 LogoutJob::LogoutJob(Session *session)
0033     : Job(*new LogoutJobPrivate(session, i18n("Logout")))
0034 {
0035 }
0036 
0037 LogoutJob::~LogoutJob()
0038 {
0039 }
0040 
0041 void LogoutJob::doStart()
0042 {
0043     Q_D(LogoutJob);
0044     d->tags << d->sessionInternal()->sendCommand("LOGOUT");
0045 }
0046 
0047 void LogoutJob::connectionLost()
0048 {
0049     emitResult();
0050 }
0051 
0052 #include "moc_logoutjob.cpp"