File indexing completed on 2024-11-24 04:44:34

0001 /*  This file is part of the KDE project
0002     SPDX-FileCopyrightText: 2009 Kevin Krammer <kevin.krammer@gmx.at>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "itemdeletejob.h"
0008 
0009 #include "session_p.h"
0010 
0011 using namespace Akonadi;
0012 
0013 class FileStore::ItemDeleteJobPrivate
0014 {
0015 public:
0016     Item mItem;
0017 };
0018 
0019 FileStore::ItemDeleteJob::ItemDeleteJob(const Item &item, FileStore::AbstractJobSession *session)
0020     : FileStore::Job(session)
0021     , d(new ItemDeleteJobPrivate())
0022 {
0023     d->mItem = item;
0024 
0025     session->addJob(this);
0026 }
0027 
0028 FileStore::ItemDeleteJob::~ItemDeleteJob() = default;
0029 
0030 Item FileStore::ItemDeleteJob::item() const
0031 {
0032     return d->mItem;
0033 }
0034 
0035 bool FileStore::ItemDeleteJob::accept(FileStore::Job::Visitor *visitor)
0036 {
0037     return visitor->visit(this);
0038 }
0039 
0040 void FileStore::ItemDeleteJob::handleItemDeleted(const Item &item)
0041 {
0042     d->mItem = item;
0043 }
0044 
0045 #include "moc_itemdeletejob.cpp"