Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 48331)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 48332)
@@ -23,4 +23,5 @@
 
 #include "HostImpl.h"
+#include "HostDnsService.h"
 
 #ifdef VBOX_WITH_USB
@@ -222,12 +223,6 @@
 
     HostPowerService        *pHostPowerService;
-
-    /* Name resolving */
-    std::list<com::Bstr>     llNameServers;
-    std::list<com::Bstr>     llSearchStrings;
-    Bstr                     DomainName;
-    /* XXX: we need timestamp when these values were set, on repeate in some 
-     *  (~1h?, 5 min?) period, this values should be refetched from host syetem.
-     */
+    /** Host's DNS informaton fetching */
+    HostDnsService          *pHostDnsService;
 };
 
@@ -324,4 +319,24 @@
     /* Create the list of network interfaces so their metrics get registered. */
     updateNetIfList();
+
+# if defined (RT_OS_DARWIN)
+    m->pHostDnsService = new HostDnsServiceDarwin();
+# elif defined(RT_OS_WINDOWS)
+    m->pHostDnsService = new HostDnsServiceWin();
+# elif defined(RT_OS_LINUX)
+    m->pHostDnsService = new HostDnsServiceLinux();
+# elif defined(RT_OS_SOLARIS)
+    m->pHostDnsService = new HostDnsServiceSolaris();
+# elif defined(RT_OS_OS2)
+    m->pHostDnsService = new HostDnsServiceOs2();
+# else
+    m->pHostDnsService = new HostDnsService();
+# endif
+
+    hrc = m->pHostDnsService->init();
+    AssertComRCReturn(hrc, hrc);
+
+    hrc = m->pHostDnsService->start();
+    AssertComRCReturn(hrc, hrc);
 
 #if defined (RT_OS_WINDOWS)
@@ -526,4 +541,7 @@
 #endif
 
+    m->pHostDnsService->stop();
+
+    delete m->pHostDnsService;
     delete m;
     m = NULL;
@@ -854,9 +872,12 @@
 STDMETHODIMP Host::COMGETTER(NameServers)(ComSafeArrayOut(BSTR, aNameServers))
 {
-    NOREF(aNameServers);
-#ifndef RT_OS_WINDOWS
-    NOREF(aNameServersSize);
-#endif
-    return E_NOTIMPL;
+    CheckComArgOutSafeArrayPointerValid(aNameServers);
+
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    return m->pHostDnsService->COMGETTER(NameServers)(ComSafeArrayOutArg(aNameServers));
 }
 
@@ -867,6 +888,11 @@
 STDMETHODIMP Host::COMGETTER(DomainName)(BSTR *aDomainName)
 {
-    NOREF(aDomainName);
-    return E_NOTIMPL;
+    /* XXX: note here should be synchronization with thread polling state 
+     * changes in name resoving system on host */
+    
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    return m->pHostDnsService->COMGETTER(DomainName)(aDomainName);
 }
 
@@ -877,9 +903,12 @@
 STDMETHODIMP Host::COMGETTER(SearchStrings)(ComSafeArrayOut(BSTR, aSearchStrings))
 {
-    NOREF(aSearchStrings);
-#ifndef RT_OS_WINDOWS
-    NOREF(aSearchStringsSize);
-#endif
-    return E_NOTIMPL;
+    CheckComArgOutSafeArrayPointerValid(aSearchStrings);
+
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    return m->pHostDnsService->COMGETTER(SearchStrings)(ComSafeArrayOutArg(aSearchStrings));
 }
 
