コード例 #1
0
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;
}
コード例 #2
0
void QServiceDiscovery::removeNameServer(int index)
{
    m_nameServers.removeAt(index);
    emit nameServersChanged(nameServers());
}
コード例 #3
0
void QServiceDiscovery::clearNameServers()
{
    m_nameServers.clear();
    emit nameServersChanged(nameServers());
}
コード例 #4
0
void QServiceDiscovery::addNameServer(QNameServer *nameServer)
{
    m_nameServers.append(nameServer);
    emit nameServersChanged(nameServers());
}