TUint NetworkAdapterList::AddSubnetListener(FunctorNetworkAdapter aFunctor, MapNetworkAdapter& aMap)
{
    iListenerLock.Wait();
    TUint id = iNextListenerId;
    aMap.insert(std::pair<TUint,FunctorNetworkAdapter>(id, aFunctor));
    iNextListenerId++;
    iListenerLock.Signal();
    return id;
}
Exemplo n.º 2
0
TUint NetworkAdapterList::AddSubnetListener(FunctorNetworkAdapter aFunctor, const TChar* aId, MapNetworkAdapter& aMap)
{
    iListenerLock.Wait();
    TUint id = iNextListenerId;
    ListenerNetworkAdapter listener(aFunctor, aId);
    aMap.insert(std::pair<TUint, ListenerNetworkAdapter>(id, listener));
    iNextListenerId++;
    iListenerLock.Signal();
    return id;
}