~ubuntu-branches/ubuntu/vivid/akonadi/vivid-proposed

« back to all changes in this revision

Viewing changes to server/tests/unittest/fakeentities.h

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark
  • Date: 2014-07-18 15:38:49 UTC
  • mfrom: (1.1.52)
  • Revision ID: package-import@ubuntu.com-20140718153849-mrt24e3jsxxikq7m
Tags: 1.12.91-0ubuntu1
* New upstream release needed for KDE 4.13.90 beta 2
* Remove patches applied upstream.
* Update symbols with batchpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2014 Daniel Vrátil <dvratil@redhat.com>
 
3
 
 
4
    This library is free software; you can redistribute it and/or modify it
 
5
    under the terms of the GNU Library General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or (at your
 
7
    option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful, but WITHOUT
 
10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 
12
    License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
    02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef FAKEENTITIES_H
 
21
#define FAKEENTITIES_H
 
22
 
 
23
#include "entities.h"
 
24
 
 
25
namespace Akonadi {
 
26
namespace Server {
 
27
 
 
28
class FakePart: public Part
 
29
{
 
30
public:
 
31
    FakePart()
 
32
        : Part()
 
33
    {
 
34
    }
 
35
 
 
36
    void setPartType(const PartType &partType)
 
37
    {
 
38
        m_partType = partType;
 
39
        Part::setPartType(partType);
 
40
    }
 
41
 
 
42
    PartType partType() const
 
43
    {
 
44
        return m_partType;
 
45
    }
 
46
 
 
47
private:
 
48
    PartType m_partType;
 
49
};
 
50
 
 
51
 
 
52
class FakeTag: public Tag
 
53
{
 
54
public:
 
55
    FakeTag()
 
56
        : Tag()
 
57
    {
 
58
    }
 
59
 
 
60
    void setTagType(const TagType &tagType)
 
61
    {
 
62
        m_tagType = tagType;
 
63
        Tag::setTagType(tagType);
 
64
    }
 
65
 
 
66
    TagType tagType() const
 
67
    {
 
68
        return m_tagType;
 
69
    }
 
70
 
 
71
    void setRemoteId(const QString &remoteId)
 
72
    {
 
73
        m_remoteId = remoteId;
 
74
    }
 
75
 
 
76
    QString remoteId() const
 
77
    {
 
78
        return m_remoteId;
 
79
    }
 
80
 
 
81
private:
 
82
    TagType m_tagType;
 
83
    QString m_remoteId;
 
84
};
 
85
 
 
86
 
 
87
} // namespace Server
 
88
} // namespace Akonadi
 
89
 
 
90
#endif // FAKEENTITIES_H