Clementine-audio-player-Mac.../src/networkremote/zeroconf.h

33 lines
589 B
C
Raw Normal View History

#ifndef ZEROCONF_H
#define ZEROCONF_H
#include <QString>
class Zeroconf {
public:
virtual ~Zeroconf();
2013-02-22 15:29:00 +01:00
void Publish(
const QString& domain,
const QString& type,
const QString& name,
2013-02-22 15:29:00 +01:00
quint16 port);
static Zeroconf* GetZeroconf();
// Truncate a QString to 63 bytes of UTF-8.
static QByteArray TruncateName(const QString& name);
2013-02-22 15:29:00 +01:00
protected:
virtual void PublishInternal(
const QString& domain,
const QString& type,
const QByteArray& name,
quint16 port) = 0;
private:
static Zeroconf* sInstance;
};
#endif // ZEROCONF_H