zeroconf/Bonjour: rename class BonjourMonitor to BonjourHelper

This commit is contained in:
Max Kellermann 2021-02-24 13:39:30 +01:00
parent 47461df59c
commit bd0aa74bdd

View File

@ -30,13 +30,13 @@
static constexpr Domain bonjour_domain("bonjour"); static constexpr Domain bonjour_domain("bonjour");
class BonjourMonitor final { class BonjourHelper final {
DNSServiceRef service_ref; DNSServiceRef service_ref;
SocketEvent socket_event; SocketEvent socket_event;
public: public:
BonjourMonitor(EventLoop &_loop, DNSServiceRef _service_ref) BonjourHelper(EventLoop &_loop, DNSServiceRef _service_ref)
:service_ref(_service_ref), :service_ref(_service_ref),
socket_event(_loop, socket_event(_loop,
BIND_THIS_METHOD(OnSocketReady), BIND_THIS_METHOD(OnSocketReady),
@ -45,7 +45,7 @@ public:
socket_event.ScheduleRead(); socket_event.ScheduleRead();
} }
~BonjourMonitor() { ~BonjourHelper() {
DNSServiceRefDeallocate(service_ref); DNSServiceRefDeallocate(service_ref);
} }
@ -60,7 +60,7 @@ protected:
} }
}; };
static BonjourMonitor *bonjour_monitor; static BonjourHelper *bonjour_monitor;
static void static void
dnsRegisterCallback([[maybe_unused]] DNSServiceRef sdRef, dnsRegisterCallback([[maybe_unused]] DNSServiceRef sdRef,
@ -100,7 +100,7 @@ BonjourInit(EventLoop &loop, const char *service_name, unsigned port)
return; return;
} }
bonjour_monitor = new BonjourMonitor(loop, dnsReference); bonjour_monitor = new BonjourHelper(loop, dnsReference);
} }
void void