9#include <boost/asio/io_context.hpp>
54 const std::string& reg_type,
const char* name,
const char* domain, uint16_t port,
const TxtRecord& txt_record,
bool auto_rename,
80 static std::unique_ptr<Advertiser>
create(boost::asio::io_context& io_context);
A class which represents a unique identifier.
A simple callback function wrapper that can be used to store and call a function with a specific sign...
SafeFunction< void(const std::string &error_message)> on_error
Called when an error occurs during registration.
virtual void update_txt_record(Id id, const TxtRecord &txt_record)=0
Updates the TXT record of this service.
SafeFunction< void(const char *reg_type, const char *name)> on_name_conflict
Called when a name conflict occurs during registration.
virtual Id register_service(const std::string ®_type, const char *name, const char *domain, uint16_t port, const TxtRecord &txt_record, bool auto_rename, bool local_only)=0
Registers a service with given arguments.
virtual ~Advertiser()=default
virtual void unregister_service(Id id)=0
Unregisters this service from the mDnsResponder, after which the service will no longer be found on t...
static std::unique_ptr< Advertiser > create(boost::asio::io_context &io_context)
Creates the most appropriate dnssd_advertiser implementation for the platform.
std::map< std::string, std::string > TxtRecord
Simple typedef for representing a TXT record.