Fix: SSDP Server spec adjust (#599)

* Fix: SSDP Server spec adjust
- Fix: Windows 7 network overview no longer removes the Hyperion entry
- Fix: The general section should be marked as global
This commit is contained in:
brindosch
2019-08-14 21:19:05 +02:00
committed by GitHub
parent d190e6f294
commit 9d84cdea0c
5 changed files with 49 additions and 24 deletions

View File

@@ -20,6 +20,7 @@ class SSDPHandler : public SSDPServer{
Q_OBJECT
public:
SSDPHandler(WebServer* webserver, const quint16& flatBufPort, QObject * parent = nullptr);
~SSDPHandler();
public slots:
///
@@ -29,6 +30,7 @@ public slots:
///
/// @brief get state changes from webserver
/// @param newState true for started and false for stopped
///
void handleWebServerStateChange(const bool newState);
@@ -61,6 +63,12 @@ private:
///
const QString getLocalAddress();
///
/// @brief Send alive/byebye message based on _deviceList
/// @param alive When true send alive, else byebye
///
void sendAnnounceList(const bool alive);
private slots:
///
/// @brief Handle the mSeach request from SSDPServer
@@ -71,6 +79,10 @@ private slots:
///
void handleMSearchRequest(const QString& target, const QString& mx, const QString address, const quint16 & port);
///
/// @brief Handle changes in the network configuration
/// @param conig New config
///
void handleNetworkConfigurationChanged(const QNetworkConfiguration &config);
private:
@@ -78,4 +90,7 @@ private:
QString _localAddress;
QNetworkConfigurationManager* _NCA;
quint16 _flatbufPort;
QString _uuid;
/// Targets for announcement
std::vector<QString> _deviceList;
};

View File

@@ -67,6 +67,12 @@ public:
///
void setDescriptionAddress(const QString& addr) { _descAddress = addr; };
///
/// @brief Set uuid
/// @param uuid The uuid
///
void setUuid(const QString& uuid) { _uuid = uuid; };
///
/// @brief set new flatbuffer server port
///