Go to the documentation of this file.
7 #include <QDomDocument>
8 #include <QRecursiveMutex>
9 #include <QNetworkAccessManager>
10 #include <QNetworkReply>
11 #include <QNetworkRequest>
29 QString name, QString url)
82 void AddServer(
const QString &usn,
const QString &url);
87 void ParseBrowse(
const QUrl &url, QNetworkReply *reply);
95 static void ParseDevice(QDomElement &element, QString &controlURL,
96 QString &eventURL, QString &friendlyName);
99 static void ParseService(QDomElement &element, QString &controlURL,
132 #endif // UPNPSCANNER_H
void customEvent(QEvent *event) override
Processes subscription and SSDP cache update events.
void timerEvent(QTimerEvent *event) override
static UPNPScanner * gUPNPScanner
void ScheduleUpdate(void)
void GetInitialMetadata(VideoMetadataListManager::metadata_list *list, meta_dir_node *node)
QMultiMap< QUrl, QNetworkReply * > m_browseRequests
UPNPScanner(UPNPSubscription *sub)
QHash< QString, UpnpMediaServer * > m_servers
QMultiMap< QUrl, QNetworkReply * > m_descriptionRequests
QNetworkAccessManager * m_network
void GetServerContent(QString &usn, MediaServerItem *content, VideoMetadataListManager::metadata_list *list, meta_dir_node *node)
void ScheduleRenewal(const QString &usn, std::chrono::seconds timeout)
Creates a QTimer to trigger a subscription renewal for a given media server.
QDomDocument * FindResult(const QDomNode &n, uint &num, uint &total, uint &updateid)
UPNPSubscription * m_subscription
QMap< QString, QString > ServerList(void)
void RemoveServer(const QString &usn)
void AddServer(const QString &usn, const QString &url)
void ParseBrowse(const QUrl &url, QNetworkReply *reply)
void SendBrowseRequest(const QUrl &url, const QString &objectid)
static MThread * gUPNPScannerThread
void replyFinished(QNetworkReply *reply)
bool ParseDescription(const QUrl &url, QNetworkReply *reply)
static UPNPScanner * Instance(UPNPSubscription *sub=nullptr)
static void ParseDevice(QDomElement &element, QString &controlURL, QString &eventURL, QString &friendlyName)
static QRecursiveMutex * gUPNPScannerLock
This is a wrapper around QThread that does several additional things.
static void Enable(bool enable, UPNPSubscription *sub=nullptr)
void FindItems(const QDomNode &n, MediaServerItem &content, bool &resetparent)
void CheckFailure(const QUrl &url)
void BrowseNextContainer(void)
static void ParseServiceList(QDomElement &element, QString &controlURL, QString &eventURL)
static bool gUPNPScannerEnabled
void GetMetadata(VideoMetadataListManager::metadata_list *list, meta_dir_node *node)
Fill the given metadata_list and meta_dir_node with the metadata of content retrieved from known medi...
static void ParseService(QDomElement &element, QString &controlURL, QString &eventURL)