File indexing completed on 2024-09-15 07:10:28
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 UPNPCONTROLABSTRACTDEVICE_H 0008 #define UPNPCONTROLABSTRACTDEVICE_H 0009 0010 #include "upnplibqt_export.h" 0011 0012 #include "upnpabstractdevice.h" 0013 0014 #include <QObject> 0015 0016 #include <memory> 0017 0018 class UpnpControlAbstractDevicePrivate; 0019 class QNetworkReply; 0020 class UpnpControlAbstractService; 0021 0022 class UPNPLIBQT_EXPORT UpnpControlAbstractDevice : public UpnpAbstractDevice 0023 { 0024 0025 Q_OBJECT 0026 0027 public: 0028 explicit UpnpControlAbstractDevice(QObject *parent = nullptr); 0029 0030 ~UpnpControlAbstractDevice() override; 0031 0032 [[nodiscard]] std::unique_ptr<UpnpControlAbstractService> serviceById(const QString &serviceId) const; 0033 0034 [[nodiscard]] std::unique_ptr<UpnpControlAbstractService> serviceByIndex(int serviceIndex) const; 0035 0036 Q_SIGNALS: 0037 0038 void inError(); 0039 0040 public Q_SLOTS: 0041 0042 private Q_SLOTS: 0043 0044 protected: 0045 [[nodiscard]] std::unique_ptr<UpnpControlAbstractService> serviceFromDescription(const UpnpServiceDescription &description) const; 0046 0047 private: 0048 std::unique_ptr<UpnpControlAbstractDevicePrivate> d; 0049 }; 0050 0051 #endif // UPNPDEVICEDISCOVERY_H