forked from jbagg/QtZeroConf
Add publishExists() and browserExists() api calls.
This commit is contained in:
@ -271,6 +271,14 @@ void QZeroConf::stopServicePublish(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool QZeroConf::publishExists(void)
|
||||
{
|
||||
if (pri->group)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// http://www.zeroconf.org/rendezvous/txtrecords.html
|
||||
|
||||
void QZeroConf::addServiceTxtRecord(QString nameOnly)
|
||||
@ -314,3 +322,11 @@ void QZeroConf::stopBrowser(void)
|
||||
{
|
||||
pri->broswerCleanUp();
|
||||
}
|
||||
|
||||
bool QZeroConf::browserExists(void)
|
||||
{
|
||||
if (pri->browser)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
@ -311,6 +311,14 @@ void QZeroConf::stopServicePublish(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool QZeroConf::publishExists(void)
|
||||
{
|
||||
if (pri->group)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// http://www.zeroconf.org/rendezvous/txtrecords.html
|
||||
|
||||
void QZeroConf::addServiceTxtRecord(QString nameOnly)
|
||||
@ -354,3 +362,11 @@ void QZeroConf::stopBrowser(void)
|
||||
{
|
||||
pri->broswerCleanUp();
|
||||
}
|
||||
|
||||
bool QZeroConf::browserExists(void)
|
||||
{
|
||||
if (pri->browser)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
16
bonjour.cpp
16
bonjour.cpp
@ -320,6 +320,14 @@ void QZeroConf::stopServicePublish(void)
|
||||
pri->cleanUp(pri->dnssRef);
|
||||
}
|
||||
|
||||
bool QZeroConf::publishExists(void)
|
||||
{
|
||||
if (pri->dnssRef)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void QZeroConf::addServiceTxtRecord(QString nameOnly)
|
||||
{
|
||||
pri->txt.append((quint8) nameOnly.size());
|
||||
@ -376,3 +384,11 @@ void QZeroConf::stopBrowser(void)
|
||||
{
|
||||
pri->cleanUp(pri->browser);
|
||||
}
|
||||
|
||||
bool QZeroConf::browserExists(void)
|
||||
{
|
||||
if (pri->browser)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user