File indexing completed on 2024-04-14 03:49:30

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 #ifndef ATTICA_BUILDSERVICE_H
0009 #define ATTICA_BUILDSERVICE_H
0010 
0011 #include <QDate>
0012 #include <QList>
0013 #include <QMap>
0014 #include <QSharedDataPointer>
0015 #include <QStringList>
0016 #include <QUrl>
0017 
0018 #include "attica_export.h"
0019 
0020 namespace Attica
0021 {
0022 
0023 /**
0024  * @class Target buildservice.h <Attica/BuildService>
0025  *
0026  * The target in a build service.
0027  */
0028 struct Target {
0029     QString id;
0030     QString name;
0031 };
0032 
0033 /**
0034  * @class BuildService buildservice.h <Attica/BuildService>
0035  *
0036  * Represents a build service.
0037  */
0038 class ATTICA_EXPORT BuildService
0039 {
0040 public:
0041     typedef QList<BuildService> List;
0042     class Parser;
0043 
0044     BuildService();
0045     BuildService(const BuildService &other);
0046     BuildService &operator=(const BuildService &other);
0047     ~BuildService();
0048 
0049     void setId(const QString &);
0050     QString id() const;
0051 
0052     void setName(const QString &);
0053     QString name() const;
0054 
0055     void setUrl(const QString &);
0056     QString url() const;
0057 
0058     void addTarget(const Target &);
0059     QList<Target> targets() const;
0060 
0061     bool isValid() const;
0062 
0063 private:
0064     class Private;
0065     QSharedDataPointer<Private> d;
0066 };
0067 
0068 }
0069 
0070 #endif