Akonadi
7 #include "itemfetchhandler.h"
9 #include "cachecleaner.h"
10 #include "connection.h"
11 #include "itemfetchhelper.h"
14 using namespace Akonadi::Server;
16 ItemFetchHandler::ItemFetchHandler(AkonadiServer &akonadi)
21 bool ItemFetchHandler::parseStream()
23 const auto &cmd = Protocol::cmdCast<Protocol::FetchItemsCommand>(m_command);
25 CommandContext context = connection()->context();
26 if (!context.setScopeContext(cmd.scopeContext())) {
27 return failureResponse(QStringLiteral(
"Invalid scope context"));
31 if (context.isEmpty() && cmd.scope().scope() == Scope::Rid) {
32 return failureResponse(QStringLiteral(
"No FETCH context specified"));
37 ItemFetchHelper fetchHelper(connection(), context, cmd.scope(), cmd.itemFetchScope(), cmd.tagFetchScope(), akonadi(), cmd.itemsLimit());
38 if (!fetchHelper.fetchItems()) {
39 return failureResponse(QStringLiteral(
"Failed to fetch items"));
42 return successResponse<Protocol::FetchItemsResponse>();
A RAII helper class to temporarily stop the CacheCleaner.
The handler interfaces describes an entity capable of handling an AkonadiIMAP command.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:01:06 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.