File indexing completed on 2024-12-01 03:37:34
0001 /* 0002 This file is part of KDE. 0003 0004 SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef ATTICA_DOWNLOADITEM_H 0010 #define ATTICA_DOWNLOADITEM_H 0011 0012 #include <QSharedDataPointer> 0013 #include <QUrl> 0014 0015 #include "attica_export.h" 0016 #include "downloaddescription.h" 0017 0018 namespace Attica 0019 { 0020 0021 /** 0022 * @class DownloadItem downloaditem.h <Attica/DownloadItem> 0023 * 0024 * Represents a download item. 0025 */ 0026 class ATTICA_EXPORT DownloadItem 0027 { 0028 public: 0029 typedef QList<DownloadItem> List; 0030 class Parser; 0031 0032 /** 0033 * Creates an empty DownloadItem 0034 */ 0035 DownloadItem(); 0036 0037 /** 0038 * Copy constructor. 0039 * @param other the DownloadItem to copy from 0040 */ 0041 DownloadItem(const DownloadItem &other); 0042 0043 /** 0044 * Assignment operator. 0045 * @param other the DownloadItem to assign from 0046 * @return pointer to this DownloadItem 0047 */ 0048 DownloadItem &operator=(const DownloadItem &other); 0049 0050 /** 0051 * Destructor. 0052 */ 0053 ~DownloadItem(); 0054 0055 void setUrl(const QUrl &url); 0056 QUrl url() const; 0057 void setMimeType(const QString &mimeType); 0058 QString mimeType() const; 0059 void setPackageName(const QString &packageName); 0060 QString packageName() const; 0061 void setPackageRepository(const QString &packageRepository); 0062 QString packageRepository() const; 0063 void setGpgFingerprint(const QString &gpgFingerprint); 0064 QString gpgFingerprint() const; 0065 void setGpgSignature(const QString &gpgSignature); 0066 QString gpgSignature() const; 0067 void setType(Attica::DownloadDescription::Type type); 0068 Attica::DownloadDescription::Type type(); 0069 0070 private: 0071 class Private; 0072 QSharedDataPointer<Private> d; 0073 }; 0074 0075 } 0076 0077 #endif // DOWNLOADITEM_H