KIMAP Library
20 #include "expungejob.h"
22 #include <KDE/KLocalizedString>
26 #include "message_p.h"
27 #include "session_p.h"
31 class ExpungeJobPrivate :
public JobPrivate
34 ExpungeJobPrivate( Session *session,
const QString& name ) : JobPrivate( session, name ) { }
35 ~ExpungeJobPrivate() { }
42 using namespace KIMAP;
44 ExpungeJob::ExpungeJob( Session *session )
45 : Job( *new ExpungeJobPrivate( session, i18n(
"Expunge" ) ) )
49 ExpungeJob::~ExpungeJob()
53 void ExpungeJob::doStart()
56 d->tags << d->sessionInternal()->sendCommand(
"EXPUNGE" );
59 void ExpungeJob::handleResponse(
const Message &response )
63 if ( handleErrorReplies( response ) == NotHandled ) {
64 if ( response.content.size() >= 2 ) {
65 QByteArray code = response.content[2].toString();
66 if ( code ==
"EXPUNGE" ) {
70 int id = s.
toInt( &ok );
72 d->items.append(
id );
79 kDebug() <<
"Unhandled response: " << response.toString().constData();
int toInt(bool *ok, int base) const
Expunges the deleted messages in the selected mailbox.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.