Changeset 48332 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Sep 6, 2013 3:21:07 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 88760
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r47117 r48332 23 23 24 24 #include "HostImpl.h" 25 #include "HostDnsService.h" 25 26 26 27 #ifdef VBOX_WITH_USB … … 222 223 223 224 HostPowerService *pHostPowerService; 224 225 /* Name resolving */ 226 std::list<com::Bstr> llNameServers; 227 std::list<com::Bstr> llSearchStrings; 228 Bstr DomainName; 229 /* XXX: we need timestamp when these values were set, on repeate in some 230 * (~1h?, 5 min?) period, this values should be refetched from host syetem. 231 */ 225 /** Host's DNS informaton fetching */ 226 HostDnsService *pHostDnsService; 232 227 }; 233 228 … … 324 319 /* Create the list of network interfaces so their metrics get registered. */ 325 320 updateNetIfList(); 321 322 # if defined (RT_OS_DARWIN) 323 m->pHostDnsService = new HostDnsServiceDarwin(); 324 # elif defined(RT_OS_WINDOWS) 325 m->pHostDnsService = new HostDnsServiceWin(); 326 # elif defined(RT_OS_LINUX) 327 m->pHostDnsService = new HostDnsServiceLinux(); 328 # elif defined(RT_OS_SOLARIS) 329 m->pHostDnsService = new HostDnsServiceSolaris(); 330 # elif defined(RT_OS_OS2) 331 m->pHostDnsService = new HostDnsServiceOs2(); 332 # else 333 m->pHostDnsService = new HostDnsService(); 334 # endif 335 336 hrc = m->pHostDnsService->init(); 337 AssertComRCReturn(hrc, hrc); 338 339 hrc = m->pHostDnsService->start(); 340 AssertComRCReturn(hrc, hrc); 326 341 327 342 #if defined (RT_OS_WINDOWS) … … 526 541 #endif 527 542 543 m->pHostDnsService->stop(); 544 545 delete m->pHostDnsService; 528 546 delete m; 529 547 m = NULL; … … 854 872 STDMETHODIMP Host::COMGETTER(NameServers)(ComSafeArrayOut(BSTR, aNameServers)) 855 873 { 856 NOREF(aNameServers); 857 #ifndef RT_OS_WINDOWS 858 NOREF(aNameServersSize); 859 #endif 860 return E_NOTIMPL; 874 CheckComArgOutSafeArrayPointerValid(aNameServers); 875 876 AutoCaller autoCaller(this); 877 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 878 879 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 880 881 return m->pHostDnsService->COMGETTER(NameServers)(ComSafeArrayOutArg(aNameServers)); 861 882 } 862 883 … … 867 888 STDMETHODIMP Host::COMGETTER(DomainName)(BSTR *aDomainName) 868 889 { 869 NOREF(aDomainName); 870 return E_NOTIMPL; 890 /* XXX: note here should be synchronization with thread polling state 891 * changes in name resoving system on host */ 892 893 AutoCaller autoCaller(this); 894 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 895 896 return m->pHostDnsService->COMGETTER(DomainName)(aDomainName); 871 897 } 872 898 … … 877 903 STDMETHODIMP Host::COMGETTER(SearchStrings)(ComSafeArrayOut(BSTR, aSearchStrings)) 878 904 { 879 NOREF(aSearchStrings); 880 #ifndef RT_OS_WINDOWS 881 NOREF(aSearchStringsSize); 882 #endif 883 return E_NOTIMPL; 905 CheckComArgOutSafeArrayPointerValid(aSearchStrings); 906 907 AutoCaller autoCaller(this); 908 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 909 910 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 911 912 return m->pHostDnsService->COMGETTER(SearchStrings)(ComSafeArrayOutArg(aSearchStrings)); 884 913 } 885 914
Note:
See TracChangeset
for help on using the changeset viewer.