File indexing completed on 2025-02-16 04:49:58
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 "ewsfetchcontactdetailjob.h" 0008 #include "ewsgetitemrequest.h" 0009 #include "ewsitemshape.h" 0010 #include "ewsresource_debug.h" 0011 0012 using namespace Akonadi; 0013 0014 EwsFetchContactDetailJob::EwsFetchContactDetailJob(EwsClient &client, QObject *parent, const Akonadi::Collection &collection) 0015 : EwsFetchItemDetailJob(client, parent, collection) 0016 { 0017 EwsItemShape shape(EwsShapeIdOnly); 0018 mRequest->setItemShape(shape); 0019 } 0020 0021 EwsFetchContactDetailJob::~EwsFetchContactDetailJob() = default; 0022 0023 void EwsFetchContactDetailJob::processItems(const EwsGetItemRequest::Response::List &responses) 0024 { 0025 Item::List::iterator it = mChangedItems.begin(); 0026 0027 for (const EwsGetItemRequest::Response &resp : responses) { 0028 Item &item = *it; 0029 0030 if (!resp.isSuccess()) { 0031 qCWarningNC(EWSRES_LOG) << QStringLiteral("Failed to fetch item %1").arg(item.remoteId()); 0032 continue; 0033 } 0034 0035 // const EwsItem &ewsItem = resp.item(); 0036 0037 // TODO: Implement 0038 0039 ++it; 0040 } 0041 0042 emitResult(); 0043 } 0044 0045 #include "moc_ewsfetchcontactdetailjob.cpp"