akonadi
20 #ifndef AKONADI_MOVEJOBIMPL_P_H
21 #define AKONADI_MOVEJOBIMPL_P_H
23 #include "collection.h"
26 #include "protocolhelper_p.h"
28 #include <KLocalizedString>
41 inline void sendCommand(
const char *asapCommand)
43 MoveJob *q =
static_cast<MoveJob *
>(q_func());
44 if (objectsToMove.isEmpty()) {
46 q->setErrorText(i18n(
"No objects specified for moving"));
52 q->setErrorText(i18n(
"No valid destination specified"));
57 QByteArray command =
newTag();
60 }
catch (
const std::exception &e) {
62 q->setErrorText(QString::fromUtf8(e.what()));
68 if (objectsToMove.first().isValid()) {
69 command += QByteArray::number(destination.
id());
71 command += ImapParser::quote(destination.
remoteId().toUtf8());
76 command +=
' ' + QByteArray::number(source.
id());
77 }
else if (!source.
remoteId().isEmpty()) {
78 command +=
' ' + ImapParser::quote(source.
remoteId().toUtf8());
84 typename T::List objectsToMove;
Shared implementation details between item and collection move jobs.
Represents a collection of PIM items.
void writeData(const QByteArray &data)
Sends raw data to the backend.
QByteArray newTag()
Returns a new unique command tag for communication with the backend.
Base class for all actions in the Akonadi storage.
bool isValid() const
Returns whether the entity is valid.
static QByteArray entitySetToByteArray(const QList< T > &_objects, const QByteArray &command)
Converts the given set of items into a protocol representation.
Id id() const
Returns the unique identifier of the entity.
QString remoteId() const
Returns the remote id of the entity.
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jan 29 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.