File indexing completed on 2024-10-06 12:15:12
0001 /* 0002 SPDX-FileCopyrightText: 2010 Frederik Gladhorn <gladhorn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef ATTICA_LICENSE_H 0008 #define ATTICA_LICENSE_H 0009 0010 #include <QSharedDataPointer> 0011 #include <QUrl> 0012 0013 #include "attica_export.h" 0014 0015 namespace Attica 0016 { 0017 /** 0018 @class License license.h <Attica/License> 0019 0020 The License class contains information about one license that the server offers. 0021 It consists of an integer id, a name and a link to a webpage describing the license. 0022 */ 0023 class ATTICA_EXPORT License 0024 { 0025 public: 0026 typedef QList<License> List; 0027 class Parser; 0028 0029 /** 0030 * Creates an empty License 0031 */ 0032 License(); 0033 0034 /** 0035 * Copy constructor. 0036 * @param other the License to copy from 0037 */ 0038 License(const License &other); 0039 0040 /** 0041 * Assignment operator. 0042 * @param other the License to assign from 0043 * @return pointer to this License 0044 */ 0045 License &operator=(const License &other); 0046 0047 /** 0048 * Destructor. 0049 */ 0050 ~License(); 0051 0052 /* 0053 <id>3</id> 0054 <name>Artistic 2.0</name> 0055 <link>http://dev.perl.org/perl6/rfc/346.html</link> 0056 */ 0057 0058 uint id() const; 0059 void setId(uint id); 0060 0061 QString name() const; 0062 void setName(const QString &name); 0063 0064 QUrl url() const; 0065 void setUrl(const QUrl &url); 0066 0067 private: 0068 class Private; 0069 QSharedDataPointer<Private> d; 0070 }; 0071 0072 } 0073 0074 #endif