File indexing completed on 2024-11-24 04:43:42
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 "ewsabchpersonhandler.h" 0008 0009 #include <KCalendarCore/Todo> 0010 0011 #include "ewscreateabchpersonjob.h" 0012 #include "ewsfetchabchpersondetailjob.h" 0013 #include "ewsmodifyabchpersonjob.h" 0014 0015 using namespace Akonadi; 0016 0017 EwsAbchPersonHandler::EwsAbchPersonHandler() = default; 0018 0019 EwsAbchPersonHandler::~EwsAbchPersonHandler() = default; 0020 0021 EwsItemHandler *EwsAbchPersonHandler::factory() 0022 { 0023 return new EwsAbchPersonHandler(); 0024 } 0025 0026 EwsFetchItemDetailJob *EwsAbchPersonHandler::fetchItemDetailJob(EwsClient &client, QObject *parent, const Akonadi::Collection &collection) 0027 { 0028 return new EwsFetchAbchContactDetailsJob(client, parent, collection); 0029 } 0030 0031 void EwsAbchPersonHandler::setSeenFlag(Item &item, bool value) 0032 { 0033 Q_UNUSED(item) 0034 Q_UNUSED(value) 0035 } 0036 0037 QString EwsAbchPersonHandler::mimeType() 0038 { 0039 return KCalendarCore::Todo::todoMimeType(); 0040 } 0041 0042 bool EwsAbchPersonHandler::setItemPayload(Akonadi::Item &item, const EwsItem &ewsItem) 0043 { 0044 Q_UNUSED(item) 0045 Q_UNUSED(ewsItem) 0046 0047 return true; 0048 } 0049 0050 EwsModifyItemJob *EwsAbchPersonHandler::modifyItemJob(EwsClient &client, const QList<Akonadi::Item> &items, const QSet<QByteArray> &parts, QObject *parent) 0051 { 0052 return new EwsModifyAbchPersonJob(client, items, parts, parent); 0053 } 0054 0055 EwsCreateItemJob *EwsAbchPersonHandler::createItemJob(EwsClient &client, 0056 const Akonadi::Item &item, 0057 const Akonadi::Collection &collection, 0058 EwsTagStore *tagStore, 0059 EwsResource *parent) 0060 { 0061 return new EwsCreateAbchPersonJob(client, item, collection, tagStore, parent); 0062 } 0063 0064 EWS_DECLARE_ITEM_HANDLER(EwsAbchPersonHandler, EwsItemTypeAbchPerson)