File indexing completed on 2024-05-26 05:13:46

0001 /*
0002     SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "entities.h"
0010 
0011 namespace Akonadi
0012 {
0013 namespace Server
0014 {
0015 class FakePart : public Part
0016 {
0017 public:
0018     FakePart()
0019         : Part()
0020     {
0021     }
0022 
0023     void setPartType(const PartType &partType)
0024     {
0025         m_partType = partType;
0026         Part::setPartType(partType);
0027     }
0028 
0029     PartType partType() const
0030     {
0031         return m_partType;
0032     }
0033 
0034 private:
0035     PartType m_partType;
0036 };
0037 
0038 class FakeTag : public Tag
0039 {
0040 public:
0041     FakeTag()
0042         : Tag()
0043     {
0044     }
0045 
0046     void setTagType(const TagType &tagType)
0047     {
0048         m_tagType = tagType;
0049         Tag::setTagType(tagType);
0050     }
0051 
0052     TagType tagType() const
0053     {
0054         return m_tagType;
0055     }
0056 
0057     void setRemoteId(const QString &remoteId)
0058     {
0059         m_remoteId = remoteId;
0060     }
0061 
0062     QString remoteId() const
0063     {
0064         return m_remoteId;
0065     }
0066 
0067 private:
0068     TagType m_tagType;
0069     QString m_remoteId;
0070 };
0071 
0072 } // namespace Server
0073 } // namespace Akonadi