17 #undef SetPort // WIN32INCLUDES this is defined as SetPortA in WinSpool.h which is being included _somewhere_ 21 class CCriticalSection;
30 typedef std::map<std::string, std::string> tTxtRecordMap;
33 ZeroconfService(
const std::string& fcr_name,
const std::string& fcr_type,
const std::string& fcr_domain);
43 void SetName(
const std::string& fcr_name);
44 const std::string& GetName()
const {
return m_name;}
46 void SetType(
const std::string& fcr_type);
47 const std::string& GetType()
const {
return m_type;}
49 void SetDomain(
const std::string& fcr_domain);
50 const std::string& GetDomain()
const {
return m_domain;}
55 void SetIP(
const std::string& fcr_ip);
56 const std::string& GetIP()
const {
return m_ip;}
58 void SetHostname(
const std::string& fcr_hostname);
59 const std::string& GetHostname()
const {
return m_hostname;}
61 void SetPort(
int f_port);
62 int GetPort()
const {
return m_port;}
64 void SetTxtRecords(
const tTxtRecordMap& txt_records);
65 const tTxtRecordMap& GetTxtRecords()
const {
return m_txtrecords_map;}
79 std::string m_hostname;
82 tTxtRecordMap m_txtrecords_map;
104 bool ResolveService(
ZeroconfService& fr_service,
double f_timeout = 1.0);
112 static void ReleaseInstance();
114 static bool IsInstantiated() {
return smp_instance != 0; }
116 virtual void ProcessResults() {}
138 virtual bool doAddServiceType(
const std::string& fcr_service_type) = 0;
139 virtual bool doRemoveServiceType(
const std::string& fcr_service_type) = 0;
140 virtual std::vector<ZeroconfService> doGetFoundServices() = 0;
141 virtual bool doResolveService(
ZeroconfService& fr_service,
double f_timeout) = 0;
150 CCriticalSection* mp_crit_sec;
151 typedef std::set<std::string> tServices;
152 tServices m_services;
153 bool m_started =
false;
161 o <<
"(" << service.GetName() <<
"|" << service.GetType() <<
"|" << service.GetDomain() <<
")";
168 return (fcr_lhs.GetName() + fcr_lhs.GetType() + fcr_lhs.GetDomain() < fcr_rhs.GetName() + fcr_rhs.GetType() + fcr_rhs.GetDomain());
173 return (fcr_lhs.GetName() == fcr_rhs.GetName() && fcr_lhs.GetType() == fcr_rhs.GetType() && fcr_lhs.GetDomain() == fcr_rhs.GetDomain() );
bool RemoveServiceType(const std::string &fcr_service_type)
remove the specified service from discovery
Definition: ZeroconfBrowser.cpp:102
bool AddServiceType(const std::string &fcr_service_type)
methods for browsing and getting results of itadds a service type for browsing
Definition: ZeroconfBrowser.cpp:87
std::vector< ZeroconfService > GetFoundServices()
returns the list of found services if this is updated, the following message with "zeroconf://" as pa...
Definition: ZeroconfBrowser.cpp:114
static std::string toPath(const ZeroconfService &fcr_service)
easy conversion to string and back (used in czeronfdiretory to store this service) ...
Definition: ZeroconfBrowser.cpp:224
void SetIP(const std::string &fcr_ip)
access methods needed during resolve
Definition: ZeroconfBrowser.cpp:203
Definition: ZeroconfBrowser.h:27
void SetName(const std::string &fcr_name)
general access methods
Definition: ZeroconfBrowser.cpp:177
this class provides support for zeroconf browsing
Definition: ZeroconfBrowser.h:24