File indexing completed on 2024-04-28 04:44:22

0001 /*
0002    SPDX-FileCopyrightText: 2015 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
0003 
0004    SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #ifndef UPNPSERVICEDESCRIPTION_H
0008 #define UPNPSERVICEDESCRIPTION_H
0009 
0010 #include "upnplibqt_export.h"
0011 
0012 #include <QList>
0013 #include <QPair>
0014 #include <QString>
0015 #include <QUrl>
0016 #include <QVariant>
0017 
0018 #include <memory>
0019 
0020 class UpnpServiceDescriptionPrivate;
0021 class UpnpActionDescription;
0022 class UpnpStateVariableDescription;
0023 class UpnpEventSubscriber;
0024 class UpnpDeviceDescription;
0025 
0026 /**
0027  * @brief The UpnpServiceDescription class is used to get all data about an UPnP service
0028  */
0029 class UPNPLIBQT_EXPORT UpnpServiceDescription
0030 {
0031 
0032 public:
0033     explicit UpnpServiceDescription();
0034 
0035     UpnpServiceDescription(const UpnpServiceDescription &other);
0036 
0037     UpnpServiceDescription(UpnpServiceDescription &&other) noexcept;
0038 
0039     ~UpnpServiceDescription();
0040 
0041     UpnpServiceDescription &operator=(const UpnpServiceDescription &other);
0042 
0043     UpnpServiceDescription &operator=(UpnpServiceDescription &&other) noexcept;
0044 
0045     void setBaseURL(const QString &newBaseURL);
0046 
0047     [[nodiscard]] const QString &baseURL() const;
0048 
0049     void setServiceType(const QString &newServiceType);
0050 
0051     [[nodiscard]] const QString &serviceType() const;
0052 
0053     void setServiceId(const QString &newServiceId);
0054 
0055     [[nodiscard]] const QString &serviceId() const;
0056 
0057     void setSCPDURL(const QUrl &newSCPDURL);
0058 
0059     [[nodiscard]] const QUrl &SCPDURL() const;
0060 
0061     void setControlURL(const QUrl &newControlURL);
0062 
0063     [[nodiscard]] const QUrl &controlURL() const;
0064 
0065     void setEventURL(const QUrl &newEventURL);
0066 
0067     [[nodiscard]] const QUrl &eventURL() const;
0068 
0069     void setMaximumSubscriptionDuration(int newValue);
0070 
0071     [[nodiscard]] int maximumSubscriptionDuration() const;
0072 
0073     void addAction(const UpnpActionDescription &newAction);
0074 
0075     [[nodiscard]] const UpnpActionDescription &action(const QString &name) const;
0076 
0077     [[nodiscard]] QMap<QString, UpnpActionDescription> &actions();
0078 
0079     [[nodiscard]] const QMap<QString, UpnpActionDescription> &actions() const;
0080 
0081     void addStateVariable(const UpnpStateVariableDescription &newVariable);
0082 
0083     [[nodiscard]] const UpnpStateVariableDescription &stateVariable(const QString &name) const;
0084 
0085     [[nodiscard]] QMap<QString, UpnpStateVariableDescription> &stateVariables();
0086 
0087     [[nodiscard]] const QMap<QString, UpnpStateVariableDescription> &stateVariables() const;
0088 
0089 private:
0090     std::unique_ptr<UpnpServiceDescriptionPrivate> d;
0091 };
0092 
0093 Q_DECLARE_METATYPE(UpnpServiceDescription)
0094 
0095 #endif // UpnpServiceDescription_H