File indexing completed on 2024-03-24 15:23:48

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2012 Laszlo Papp <lpapp@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_CLOUD_H
0010 #define ATTICA_CLOUD_H
0011 
0012 #include "attica_export.h"
0013 
0014 #include <QList>
0015 #include <QSharedDataPointer>
0016 #include <QUrl>
0017 
0018 namespace Attica
0019 {
0020 
0021 /**
0022  * @class Cloud cloud.h <Attica/Cloud>
0023  *
0024  * Represents a cloud service.
0025  */
0026 class ATTICA_EXPORT Cloud
0027 {
0028 public:
0029     typedef QList<Cloud> List;
0030     class Parser;
0031 
0032     /**
0033      * Creates an empty Cloud
0034      */
0035 
0036     Cloud();
0037 
0038     /**
0039      * Copy constructor.
0040      * @param other the Cloud to copy from
0041      */
0042 
0043     Cloud(const Cloud &other);
0044 
0045     /**
0046      * Assignment operator.
0047      * @param other the Cloud to assign from
0048      * @return pointer to this Activity
0049      */
0050 
0051     Cloud &operator=(const Cloud &other);
0052 
0053     /**
0054      * Destructor.
0055      */
0056 
0057     ~Cloud();
0058 
0059     /**
0060      * Sets the name of the Cloud service
0061      *
0062      * @param name the new name
0063      */
0064 
0065     void setName(const QString &name);
0066 
0067     /**
0068      * Gets the name of the Cloud service.
0069      *
0070      * @return the name
0071      */
0072 
0073     QString name() const;
0074 
0075     /**
0076      * Sets the url of the Cloud service
0077      *
0078      * @param url the new url
0079      */
0080 
0081     void setUrl(const QString &url);
0082 
0083     /**
0084      * Gets the url of the Cloud service.
0085      *
0086      * @return the url
0087      */
0088 
0089     QString url() const;
0090 
0091     /**
0092      * Sets the icon of the Cloud service
0093      *
0094      * @param icon the new icon
0095      */
0096 
0097     void setIcon(const QUrl &icon);
0098 
0099     /**
0100      * Gets the icon of the Cloud service.
0101      *
0102      * @return the icon
0103      */
0104 
0105     QUrl icon() const;
0106 
0107     /**
0108      * Sets the quota of the Cloud service
0109      *
0110      * @param quota the new quota
0111      */
0112 
0113     void setQuota(qulonglong quota);
0114 
0115     /**
0116      * Gets the quota of the Cloud service.
0117      *
0118      * @return the quota
0119      */
0120 
0121     qulonglong quota() const;
0122 
0123     /**
0124      * Sets the free amount of the Cloud service
0125      *
0126      * @param free the new free amount
0127      */
0128 
0129     void setFree(qulonglong free);
0130 
0131     /**
0132      * Gets the free amount of the Cloud service.
0133      *
0134      * @return the free amount
0135      */
0136 
0137     qulonglong free() const;
0138 
0139     /**
0140      * Sets the used amount of the Cloud service
0141      *
0142      * @param used the new used amount
0143      */
0144 
0145     void setUsed(qulonglong used);
0146 
0147     /**
0148      * Gets the used amount of the Cloud service.
0149      *
0150      * @return the used amount
0151      */
0152 
0153     qulonglong used() const;
0154 
0155     /**
0156      * Sets the relative of the Cloud service
0157      *
0158      * @param relative the new relative
0159      */
0160 
0161     void setRelative(float relative);
0162 
0163     /**
0164      * Gets the relative of the Cloud service.
0165      *
0166      * @return the relative
0167      */
0168 
0169     float relative() const;
0170 
0171     /**
0172      * Sets the private key of the Cloud service
0173      *
0174      * @param privateKey the new privateKey
0175      */
0176 
0177     void setKey(const QString &privateKey);
0178 
0179     /**
0180      * Gets the private key of the Cloud service.
0181      *
0182      * @return the private key
0183      */
0184 
0185     QString key() const;
0186 
0187 private:
0188     class Private;
0189     QSharedDataPointer<Private> d;
0190 };
0191 
0192 }
0193 
0194 #endif