11 #include "network/Zeroconf.h" 18 #include <avahi-client/client.h> 19 #include <avahi-client/publish.h> 20 #include <avahi-common/defs.h> 22 struct AvahiThreadedPoll;
32 bool doPublishService(
const std::string& fcr_identifier,
33 const std::string& fcr_type,
34 const std::string& fcr_name,
36 const std::vector<std::pair<std::string, std::string> >& txt)
override;
38 bool doForceReAnnounceService(
const std::string& fcr_identifier)
override;
39 bool doRemoveService(
const std::string& fcr_ident)
override;
41 void doStop()
override;
45 static void clientCallback(AvahiClient* fp_client, AvahiClientState f_state,
void*);
47 static void groupCallback(AvahiEntryGroup *fp_group, AvahiEntryGroupState f_state,
void *);
49 static void shutdownCallback(AvahiTimeout *fp_e,
void *);
62 typedef std::map<std::string, std::shared_ptr<ServiceInfo> > tServiceMap;
66 void updateServices(AvahiClient* fp_client);
68 void addService(
const tServiceMap::mapped_type& fp_service_info, AvahiClient* fp_client);
70 AvahiClient* mp_client = 0;
71 AvahiThreadedPoll* mp_poll = 0;
74 tServiceMap m_services;
77 bool m_shutdown =
false;
78 pthread_t m_thread_id = 0;
helper to store information on howto create an avahi-group to publish
Definition: ZeroconfAvahi.cpp:44
CZeroconfAvahi()
Definition: ZeroconfAvahi.cpp:59
this class provides support for zeroconf while the different zeroconf implementations have asynchrono...
Definition: Zeroconf.h:28
~CZeroconfAvahi() override
Definition: ZeroconfAvahi.cpp:81
Definition: ZeroconfAvahi.h:24