1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef ATTICA_PUBLISHER_H
10#define ATTICA_PUBLISHER_H
11
12#include <QDate>
13#include <QList>
14#include <QMap>
15#include <QSharedDataPointer>
16#include <QStringList>
17#include <QUrl>
18
19#include "attica_export.h"
20#include "buildservice.h"
21
22namespace Attica
23{
24
25/*!
26 * \class Attica::Field
27 * \inheaderfile Attica/Publisher
28 * \inmodule Attica
29 *
30 * \brief Field as set for the class Publisher.
31 */
32struct Field {
33 /*!
34 * \variable Attica::Field::type
35 */
36 QString type;
37
38 /*!
39 * \variable Attica::Field::name
40 */
41 QString name;
42
43 /*!
44 * \variable Attica::Field::fieldsize
45 */
46 int fieldsize;
47
48 /*!
49 * \variable Attica::Field::required
50 */
51 bool required;
52
53 /*!
54 * \variable Attica::Field::options
55 */
56 QStringList options;
57};
58
59/*!
60 * \class Attica::Publisher
61 * \inheaderfile Attica/Publisher
62 * \inmodule Attica
63 *
64 * \brief Represents a publisher.
65 */
66class ATTICA_EXPORT Publisher
67{
68public:
69 /*!
70 *
71 */
72 typedef QList<Publisher> List;
73 class Parser;
74
75 /*!
76 *
77 */
78 Publisher();
79 Publisher(const Publisher &other);
80 Publisher &operator=(const Publisher &other);
81 ~Publisher();
82
83 /*!
84 *
85 */
86 void setId(const QString &);
87
88 /*!
89 *
90 */
91 QString id() const;
92
93 /*!
94 *
95 */
96 void setName(const QString &);
97
98 /*!
99 *
100 */
101 QString name() const;
102
103 /*!
104 *
105 */
106 void setUrl(const QString &);
107
108 /*!
109 *
110 */
111 QString url() const;
112
113 /*!
114 *
115 */
116 void addField(const Field &);
117
118 /*!
119 *
120 */
121 QList<Field> fields() const;
122
123 /*!
124 *
125 */
126 void addTarget(const Target &);
127
128 /*!
129 *
130 */
131 QList<Target> targets() const;
132
133 /*!
134 *
135 */
136 bool isValid() const;
137
138private:
139 class Private;
140 QSharedDataPointer<Private> d;
141};
142
143}
144
145#endif
146

source code of attica/src/publisher.h