29 #ifndef BONJOURSERVICEREGISTER_H 30 #define BONJOURSERVICEREGISTER_H 32 #include <QtCore/QObject> 34 #include "bonjourrecord.h" 35 class QSocketNotifier;
37 #ifndef PLATFORM_AMLOGIC 40 #include <avahi-compat-libdns_sd/dns_sd.h> 50 void registerService(
const QString& service,
const int& port);
51 void registerService(
const BonjourRecord &record, quint16 servicePort, std::vector<std::pair<std::string, std::string>> txt = std::vector<std::pair<std::string, std::string>>());
52 inline BonjourRecord registeredRecord()
const {
return finalRecord; }
54 const quint16 & getPort() {
return _port; };
57 void error(DNSServiceErrorType error);
61 void bonjourSocketReadyRead();
64 static void DNSSD_API bonjourRegisterService(DNSServiceRef sdRef, DNSServiceFlags,
65 DNSServiceErrorType errorCode,
const char *name,
66 const char *regtype,
const char *domain,
68 DNSServiceRef dnssref;
69 QSocketNotifier *bonjourSocket;
76 #endif // BONJOURSERVICEREGISTER_H Definition: bonjourrecord.h:35
Definition: bonjourserviceregister.h:43