forked from jbagg/QtZeroConf
Emit removeService() for all discovered services when browser is stopped.
This commit is contained in:
@ -208,8 +208,10 @@ public:
|
||||
browser = NULL;
|
||||
|
||||
QMap<QString, QZeroConfService *>::iterator i;
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++)
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++) {
|
||||
emit pub->serviceRemoved(*i);
|
||||
delete *i;
|
||||
}
|
||||
pub->services.clear();
|
||||
|
||||
QMap<QString, AvahiServiceResolver *>::iterator r;
|
||||
|
@ -220,8 +220,10 @@ public:
|
||||
browser = NULL;
|
||||
|
||||
QMap<QString, QZeroConfService *>::iterator i;
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++)
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++) {
|
||||
emit pub->serviceRemoved(*i);
|
||||
delete *i;
|
||||
}
|
||||
pub->services.clear();
|
||||
|
||||
QMap<QString, AvahiSServiceResolver *>::iterator r;
|
||||
|
@ -250,8 +250,10 @@ void QZeroConfPrivate::cleanUp(DNSServiceRef toClean)
|
||||
browserSocket = NULL;
|
||||
}
|
||||
QMap<QString, QZeroConfService *>::iterator i;
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++)
|
||||
for (i = pub->services.begin(); i != pub->services.end(); i++) {
|
||||
emit pub->serviceRemoved(*i);
|
||||
delete *i;
|
||||
}
|
||||
pub->services.clear();
|
||||
}
|
||||
else if (toClean == dnssRef) {
|
||||
|
@ -74,12 +74,14 @@ public:
|
||||
~QZeroConf();
|
||||
void startServicePublish(const char *name, const char *type, const char *domain, quint16 port);
|
||||
void stopServicePublish(void);
|
||||
bool publishExists(void);
|
||||
inline void startBrowser(QString type)
|
||||
{
|
||||
startBrowser(type, QAbstractSocket::IPv4Protocol);
|
||||
}
|
||||
void startBrowser(QString type, QAbstractSocket::NetworkLayerProtocol protocol);
|
||||
void stopBrowser(void);
|
||||
bool browserExists(void);
|
||||
void addServiceTxtRecord(QString nameOnly);
|
||||
void addServiceTxtRecord(QString name, QString value);
|
||||
void clearServiceTxtRecords();
|
||||
|
Reference in New Issue
Block a user