STDMETHODIMP HostDnsService::COMGETTER(NameServers)(ComSafeArrayOut(BSTR, aNameServers)) { RTCritSectEnter(&m_hCritSect); com::SafeArray<BSTR> nameServers(m_llNameServers.size()); Utf8StrListIterator it; int i = 0; for (it = m_llNameServers.begin(); it != m_llNameServers.end(); ++it, ++i) (*it).cloneTo(&nameServers[i]); nameServers.detachTo(ComSafeArrayOutArg(aNameServers)); RTCritSectLeave(&m_hCritSect); return S_OK; }
void QServiceDiscovery::removeNameServer(int index) { m_nameServers.removeAt(index); emit nameServersChanged(nameServers()); }
void QServiceDiscovery::clearNameServers() { m_nameServers.clear(); emit nameServersChanged(nameServers()); }
void QServiceDiscovery::addNameServer(QNameServer *nameServer) { m_nameServers.append(nameServer); emit nameServersChanged(nameServers()); }