1 /******************************************************************************
2 * Copyright 2007 by Riccardo Iaconelli <riccardo@kde.org> *
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. *
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. *
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 *******************************************************************************/
20 #ifndef PACKAGEMETADATA_H
21 #define PACKAGEMETADATA_H
23 #include <QtCore/QString>
25 #include <plasma/plasma_export.h>
30 class PLASMA_EXPORT PackageMetadata
39 * Constructs a metadata object using the values in the file at path
41 * @param path path to a metadata.desktop file
43 PackageMetadata(const QString
& path
);
46 bool isComplete() const;
49 * Writes out the metadata to filename, which should be a .desktop
50 * file. It writes out the information in a format that is compatible
54 * @arg filename path to the file to write to
55 * @arg icon path to the package icon
57 void write(const QString
& filename
, const QString
&icon
= QString()) const;
60 * Reads in metadata from a file, which should be a .desktop
61 * file. It writes out the information in a format that is compatible
65 * @arg filename path to the file to write to
67 void read(const QString
&filename
);
70 QString
description() const;
71 QString
serviceType() const;
72 QString
author() const;
73 QString
email() const;
74 QString
version() const;
75 QString
website() const;
76 QString
license() const;
77 QString
application() const;
78 QString
requiredVersion() const;
79 QString
pluginName() const;
80 QString
implementationLanguage() const;
84 void setName(const QString
&);
85 void setDescription(const QString
&);
86 void setServiceType(const QString
&);
87 void setAuthor(const QString
&);
88 void setEmail(const QString
&);
89 void setVersion(const QString
&);
90 void setWebsite(const QString
&);
91 void setLicense(const QString
&);
92 void setApplication(const QString
&);
93 void setRequiredVersion(const QString
&);
94 void setType(const QString
& type
);
95 void setPluginName(const QString
& name
);
96 void setImplementationLanguage(const QString
& language
);