add documentation

This commit is contained in:
Simon Stürz 2016-05-04 19:02:59 +02:00 committed by Michael Zanetti
parent cddb23182f
commit 07a1ac1fb3
4 changed files with 26 additions and 2 deletions

View File

@ -10,7 +10,10 @@
\section2 The \tt{guh-plugins-merkur} package:
\annotatedlist guh-plugins-merkur
\section2 The \tt{guh-tests} plugins:
\section2 The \tt{guh-plugins-maker} package:
\annotatedlist guh-plugins-maker
\section2 The \tt{guh-tests} package plugins:
\annotatedlist guh-tests
*/

View File

@ -38,7 +38,7 @@ AvahiServiceEntry::AvahiServiceEntry() :
}
/*! Constructs a new \l{AvahiServiceEntry} with the given \a name, \a hostAddress, \a domain, \a hostName, \a port, \a protocol, \a txt and \a flags.*/
/*! Constructs a new \l{AvahiServiceEntry} with the given \a name, \a serviceType, \a hostAddress, \a domain, \a hostName, \a port, \a protocol, \a txt and \a flags.*/
AvahiServiceEntry::AvahiServiceEntry(QString name, QString serviceType, QHostAddress hostAddress, QString domain, QString hostName, quint16 port, QAbstractSocket::NetworkLayerProtocol protocol, QStringList txt, AvahiLookupResultFlags flags) :
m_name(name),
m_serviceType(serviceType),

View File

@ -46,6 +46,7 @@
/*! \fn void QtAvahiService::serviceStateChanged(const QtAvahiServiceState &state);
This signal will be emitted when the \a state of this \l{QtAvahiService} has changed.
*/
#include "qtavahiservice.h"
#include "qtavahiservice_p.h"

View File

@ -18,12 +18,29 @@
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*!
\class QtAvahiServiceBrowser
\brief Allowes to browse avahi services in the local network.
\ingroup hardware
\inmodule libguh
*/
/*! \fn void QtAvahiServiceBrowser::serviceEntryAdded(const AvahiServiceEntry &entry);
This signal will be emitted when a new \a entry was added to the current entry list.
*/
/*! \fn void QtAvahiServiceBrowser::serviceEntryRemoved(const AvahiServiceEntry &entry);
This signal will be emitted when a new \a entry was removed from the current entry list.
*/
#include "qtavahiservicebrowser.h"
#include "qtavahiservicebrowser_p.h"
#include "loggingcategories.h"
#include <avahi-common/error.h>
/*! Constructs a new \l{QtAvahiServiceBrowser} with the given \a parent. */
QtAvahiServiceBrowser::QtAvahiServiceBrowser(QObject *parent) :
QObject(parent),
d_ptr(new QtAvahiServiceBrowserPrivate(new QtAvahiClient))
@ -31,6 +48,7 @@ QtAvahiServiceBrowser::QtAvahiServiceBrowser(QObject *parent) :
connect(d_ptr->client, &QtAvahiClient::clientStateChanged, this, &QtAvahiServiceBrowser::onClientStateChanged);
}
/*! Destructs this \l{QtAvahiServiceBrowser}. */
QtAvahiServiceBrowser::~QtAvahiServiceBrowser()
{
// Delete each service browser
@ -48,11 +66,13 @@ QtAvahiServiceBrowser::~QtAvahiServiceBrowser()
delete d_ptr;
}
/*! Enables this \l{QtAvahiServiceBrowser} and starts the service browsing. */
void QtAvahiServiceBrowser::enable()
{
d_ptr->client->start();
}
/*! Returns the current \l{AvahiServiceEntry} list of this \l{QtAvahiServiceBrowser}. */
QList<AvahiServiceEntry> QtAvahiServiceBrowser::serviceEntries() const
{
return m_serviceEntries;