File indexing completed on 2024-11-24 04:43:50
0001 /* 0002 SPDX-FileCopyrightText: 2015-2016 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "ewstaskhandler.h" 0008 0009 #include <KCalendarCore/Todo> 0010 0011 #include "ewscreatetaskjob.h" 0012 #include "ewsfetchtaskdetailjob.h" 0013 #include "ewsmodifytaskjob.h" 0014 0015 using namespace Akonadi; 0016 0017 EwsTaskHandler::EwsTaskHandler() = default; 0018 0019 EwsTaskHandler::~EwsTaskHandler() = default; 0020 0021 EwsItemHandler *EwsTaskHandler::factory() 0022 { 0023 return new EwsTaskHandler(); 0024 } 0025 0026 EwsFetchItemDetailJob *EwsTaskHandler::fetchItemDetailJob(EwsClient &client, QObject *parent, const Akonadi::Collection &collection) 0027 { 0028 return new EwsFetchTaskDetailJob(client, parent, collection); 0029 } 0030 0031 void EwsTaskHandler::setSeenFlag(Item &item, bool value) 0032 { 0033 Q_UNUSED(item) 0034 Q_UNUSED(value) 0035 } 0036 0037 QString EwsTaskHandler::mimeType() 0038 { 0039 return KCalendarCore::Todo::todoMimeType(); 0040 } 0041 0042 bool EwsTaskHandler::setItemPayload(Akonadi::Item &item, const EwsItem &ewsItem) 0043 { 0044 Q_UNUSED(item) 0045 Q_UNUSED(ewsItem) 0046 0047 return true; 0048 } 0049 0050 EwsModifyItemJob *EwsTaskHandler::modifyItemJob(EwsClient &client, const QList<Akonadi::Item> &items, const QSet<QByteArray> &parts, QObject *parent) 0051 { 0052 return new EwsModifyTaskJob(client, items, parts, parent); 0053 } 0054 0055 EwsCreateItemJob * 0056 EwsTaskHandler::createItemJob(EwsClient &client, const Akonadi::Item &item, const Akonadi::Collection &collection, EwsTagStore *tagStore, EwsResource *parent) 0057 { 0058 return new EwsCreateTaskJob(client, item, collection, tagStore, parent); 0059 } 0060 0061 EWS_DECLARE_ITEM_HANDLER(EwsTaskHandler, EwsItemTypeTask)