Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions avahicore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,17 @@ QZeroConf::~QZeroConf()
delete pri;
}

void QZeroConf::setHostName(QString hostName)
{
avahi_server_set_host_name(pri->server, hostName.toLatin1().constData());
}

QString QZeroConf::hostName() const
{
QString name = QString::fromLatin1(avahi_server_get_host_name(pri->server));
return name;
}

void QZeroConf::startServicePublish(const char *name, const char *type, const char *domain, quint16 port)
{
if (pri->group) {
Expand Down
2 changes: 2 additions & 0 deletions qzeroconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ friend class QZeroConfPrivate;
};
QZeroConf(QObject *parent = Q_NULLPTR);
~QZeroConf();
void setHostName(QString hostName);
QString hostName() const;
void startServicePublish(const char *name, const char *type, const char *domain, quint16 port);
void stopServicePublish(void);
bool publishExists(void);
Expand Down