/* * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Swift { class EventLoop; class AvahiQuerier : public DNSSDQuerier, public std::enable_shared_from_this { public: AvahiQuerier(EventLoop* eventLoop); ~AvahiQuerier(); std::shared_ptr createBrowseQuery(); std::shared_ptr createRegisterQuery( const std::string& name, int port, const ByteArray& info); std::shared_ptr createResolveServiceQuery( const DNSSDServiceID&); std::shared_ptr createResolveHostnameQuery( const std::string& hostname, int interfaceIndex); void start(); void stop(); AvahiThreadedPoll* getThreadedPoll() const { return threadedPoll; } AvahiClient* getClient() const { return client; } private: EventLoop* eventLoop; AvahiClient* client; AvahiThreadedPoll* threadedPoll; }; }