[zeroconf] - add new hostname field to the service class - its needed by mdns
authorMemphis <memphis@machzwo.de>
Mon, 10 Jun 2013 21:44:33 +0000 (23:44 +0200)
committerMemphiz <memphis@machzwo.de>
Wed, 12 Jun 2013 17:35:43 +0000 (19:35 +0200)
xbmc/network/ZeroconfBrowser.cpp
xbmc/network/ZeroconfBrowser.h

index 6a930d8..7ffa563 100644 (file)
@@ -208,6 +208,11 @@ void CZeroconfBrowser::ZeroconfService::SetDomain(const CStdString& fcr_domain)
   m_domain = fcr_domain;
 }
 
+void CZeroconfBrowser::ZeroconfService::SetHostname(const CStdString& fcr_hostname)
+{
+  m_hostname = fcr_hostname;
+}
+
 void CZeroconfBrowser::ZeroconfService::SetIP(const CStdString& fcr_ip)
 {
   m_ip = fcr_ip;
index a90c217..8a8b2f8 100644 (file)
@@ -69,6 +69,9 @@ public:
       void SetIP(const CStdString& fcr_ip);
       const CStdString& GetIP() const {return m_ip;}
 
+      void SetHostname(const CStdString& fcr_hostname);
+      const CStdString& GetHostname() const {return m_hostname;}
+
       void SetPort(int f_port);
       int GetPort() const {return m_port;}
     
@@ -84,6 +87,10 @@ public:
       //2 entries below store 1 ip:port pair for this service
       CStdString m_ip;
       int        m_port;
+
+      //used for mdns in case dns resolution fails
+      //we store the hostname and resolve with mdns functions again
+      CStdString m_hostname;
       
       //1 entry below stores the txt-record as a key value map for this service
       tTxtRecordMap m_txtrecords_map;