kutils: implement KDNSSD::isSupported()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-10-10 01:35:08 +03:00
parent bafbb328e9
commit 24a9ce64c2
2 changed files with 11 additions and 0 deletions

View file

@ -458,6 +458,15 @@ KDNSSD::~KDNSSD()
delete d;
}
bool KDNSSD::isSupported()
{
#if defined(HAVE_AVAHI)
return true;
#else
return false;
#endif
}
bool KDNSSD::publishService(const QByteArray &servicetype, const uint serviceport, const QString &servicename)
{
return d->publishService(servicetype, serviceport, servicename);

View file

@ -71,6 +71,8 @@ public:
KDNSSD(QObject *parent = nullptr);
~KDNSSD();
static bool isSupported();
/*!
@brief Publishes service of type @p servicetype on port @p serviceport with name
@p servicename on the default domain.