File indexing completed on 2024-04-21 14:52:17

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2010 Intel Corporation
0005     SPDX-FileContributor: Mateu Batle Sastre <mbatle@collabora.co.uk>
0006 
0007     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0008 */
0009 
0010 #ifndef ATTICA_DISTRIBUTION_H
0011 #define ATTICA_DISTRIBUTION_H
0012 
0013 #include <QSharedDataPointer>
0014 #include <QUrl>
0015 
0016 #include "attica_export.h"
0017 
0018 namespace Attica
0019 {
0020 /**
0021     @class Distribution distribution.h <Attica/Distribution>
0022 
0023     The Distribution class contains information about one distribution that the server offers.
0024     It consists of an integer id and a distribution name.
0025  */
0026 class ATTICA_EXPORT Distribution
0027 {
0028 public:
0029     typedef QList<Distribution> List;
0030     class Parser;
0031 
0032     /**
0033      * Creates an empty Distribution
0034      */
0035     Distribution();
0036 
0037     /**
0038      * Copy constructor.
0039      * @param other the Distribution to copy from
0040      */
0041     Distribution(const Distribution &other);
0042 
0043     /**
0044      * Assignment operator.
0045      * @param other the Distribution to assign from
0046      * @return pointer to this Distribution
0047      */
0048     Distribution &operator=(const Distribution &other);
0049 
0050     /**
0051      * Destructor.
0052      */
0053     ~Distribution();
0054 
0055     /*
0056      <id>2000</id>
0057      <name>Ark</name>
0058     */
0059 
0060     uint id() const;
0061     void setId(uint id);
0062 
0063     QString name() const;
0064     void setName(const QString &name);
0065 
0066 private:
0067     class Private;
0068     QSharedDataPointer<Private> d;
0069 };
0070 
0071 }
0072 
0073 #endif