File indexing completed on 2024-11-10 04:40:30
0001 /* 0002 SPDX-FileCopyrightText: 2006-2007 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "akonadicore_export.h" 0010 #include "job_p.h" 0011 0012 namespace Akonadi 0013 { 0014 namespace Protocol 0015 { 0016 class PartMetaData; 0017 class Command; 0018 class ModifyItemsCommand; 0019 using ModifyItemsCommandPtr = QSharedPointer<ModifyItemsCommand>; 0020 } 0021 0022 /** 0023 * @internal 0024 */ 0025 class AKONADICORE_EXPORT ItemModifyJobPrivate : public JobPrivate 0026 { 0027 public: 0028 enum Operation { 0029 RemoteId, 0030 RemoteRevision, 0031 Gid, 0032 Dirty, 0033 }; 0034 0035 explicit ItemModifyJobPrivate(ItemModifyJob *parent); 0036 0037 void setClean(); 0038 Protocol::PartMetaData preparePart(const QByteArray &partName); 0039 0040 void conflictResolved(); 0041 void conflictResolveError(const QString &message); 0042 0043 void doUpdateItemRevision(Item::Id id, int oldRevision, int newRevision) override; 0044 0045 QString jobDebuggingString() const override; 0046 Protocol::ModifyItemsCommandPtr fullCommand() const; 0047 0048 void setSilent(bool silent); 0049 0050 Q_DECLARE_PUBLIC(ItemModifyJob) 0051 0052 QSet<int> mOperations; 0053 QByteArray mTag; 0054 Item::List mItems; 0055 bool mRevCheck = true; 0056 QSet<QByteArray> mParts; 0057 QSet<QByteArray> mForeignParts; 0058 QByteArray mPendingData; 0059 bool mIgnorePayload = false; 0060 bool mAutomaticConflictHandlingEnabled = true; 0061 bool mSilent = false; 0062 }; 0063 0064 }