File indexing completed on 2024-12-01 03:37:37

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@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_PUBLISHER_H
0010 #define ATTICA_PUBLISHER_H
0011 
0012 #include <QDate>
0013 #include <QList>
0014 #include <QMap>
0015 #include <QSharedDataPointer>
0016 #include <QStringList>
0017 #include <QUrl>
0018 
0019 #include "attica_export.h"
0020 #include "buildservice.h"
0021 
0022 namespace Attica
0023 {
0024 
0025 /**
0026  * @class Field publisher.h <Attica/Publisher>
0027  *
0028  * Field as set for the class Publisher.
0029  */
0030 struct Field {
0031     QString type;
0032     QString name;
0033     int fieldsize;
0034     bool required;
0035     QStringList options;
0036 };
0037 
0038 /**
0039  * @class Publisher publisher.h <Attica/Publisher>
0040  *
0041  * Represents a publisher.
0042  */
0043 class ATTICA_EXPORT Publisher
0044 {
0045 public:
0046     typedef QList<Publisher> List;
0047     class Parser;
0048 
0049     Publisher();
0050     Publisher(const Publisher &other);
0051     Publisher &operator=(const Publisher &other);
0052     ~Publisher();
0053 
0054     void setId(const QString &);
0055     QString id() const;
0056 
0057     void setName(const QString &);
0058     QString name() const;
0059 
0060     void setUrl(const QString &);
0061     QString url() const;
0062 
0063     void addField(const Field &);
0064     QList<Field> fields() const;
0065 
0066     void addTarget(const Target &);
0067     QList<Target> targets() const;
0068 
0069     bool isValid() const;
0070 
0071 private:
0072     class Private;
0073     QSharedDataPointer<Private> d;
0074 };
0075 
0076 }
0077 
0078 #endif