1 /* This file is part of the KDE project
2    Copyright (C) 2011 Inge Wallin <inge@lysator.liu.se>
3 
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Library General Public
6    License as published by the Free Software Foundation; either
7    version 2 of the License, or (at your option) any later version.
8 
9    This library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Library General Public 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
16    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17    Boston, MA 02110-1301, USA.
18 */
19 
20 
21 // Own
22 #include "KoOdfManifestEntry.h"
23 
24 #include <QString>
25 
26 class Q_DECL_HIDDEN KoOdfManifestEntry::Private
27 {
28 public:
Private()29     Private() {};
30 
31     QString  fullPath;          // manifest:full-path
32     QString  mediaType;         // manifest:media-type
33     QString  version;           // manifest:version  (isNull==true if not present)
34 };
35 
36 
37 // ----------------------------------------------------------------
38 
39 
KoOdfManifestEntry(const QString & fullPath,const QString & mediaType,const QString & version)40 KoOdfManifestEntry::KoOdfManifestEntry(const QString &fullPath, const QString &mediaType,
41                                        const QString &version)
42     : d(new Private())
43 {
44     d->fullPath = fullPath;
45     d->mediaType = mediaType;
46     d->version = version;
47 }
48 
KoOdfManifestEntry(const KoOdfManifestEntry & other)49 KoOdfManifestEntry::KoOdfManifestEntry(const KoOdfManifestEntry &other)
50     : d(new Private())
51 {
52     d->fullPath = other.d->fullPath;
53     d->mediaType = other.d->mediaType;
54     d->version = other.d->version;
55 }
56 
~KoOdfManifestEntry()57 KoOdfManifestEntry::~KoOdfManifestEntry()
58 {
59     delete d;
60 }
61 
operator =(const KoOdfManifestEntry & other)62 KoOdfManifestEntry &KoOdfManifestEntry::operator=(const KoOdfManifestEntry &other)
63 {
64     d->fullPath = other.d->fullPath;
65     d->mediaType = other.d->mediaType;
66     d->version = other.d->version;
67 
68     return *this;
69 }
70 
71 
fullPath() const72 QString KoOdfManifestEntry::fullPath() const
73 {
74     return d->fullPath;
75 }
76 
setFullPath(const QString & fullPath)77 void KoOdfManifestEntry::setFullPath(const QString &fullPath)
78 {
79     d->fullPath = fullPath;
80 }
81 
mediaType() const82 QString KoOdfManifestEntry::mediaType() const
83 {
84     return d->mediaType;
85 }
86 
setMediaType(const QString & mediaType)87 void KoOdfManifestEntry::setMediaType(const QString &mediaType)
88 {
89     d->mediaType = mediaType;
90 }
91 
version() const92 QString KoOdfManifestEntry::version() const
93 {
94     return d->version;
95 }
96 
setVersion(const QString & version)97 void KoOdfManifestEntry::setVersion(const QString &version)
98 {
99     d->version = version;
100 }
101 
102