DvStack::DvStack(OpenHome::Environment& aEnv) : iEnv(aEnv) , iBootId(1) , iNextBootId(2) , iMdns(NULL) { iEnv.SetDvStack(this); iSsdpNotifierManager = new DviSsdpNotifierManager(*this); iPropertyUpdateCollection = new DviPropertyUpdateCollection(*this); InitialisationParams* initParams = iEnv.InitParams(); TUint port = initParams->DvUpnpServerPort(); iDviDeviceMap = new DviDeviceMap; iDviServerUpnp = new DviServerUpnp(*this, port); iSubscriptionManager = new DviSubscriptionManager(*this); iDviServerWebSocket = new DviServerWebSocket(*this); const TChar* hostName = NULL; if (initParams->DvIsBonjourEnabled(hostName)) { #ifndef DEFINE_WINDOWS_UNIVERSAL iMdns = new OpenHome::Net::MdnsProvider(iEnv, hostName); #endif } if (initParams->DvNumLpecThreads() == 0) { iLpecServer = NULL; } else { port = initParams->DvLpecServerPort(); iLpecServer = new DviServerLpec(*this, port); } }
uint32_t STDCALL OhNetInitParamsDvUpnpServerPort(OhNetHandleInitParams aParams) { InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams); return ip->DvUpnpServerPort(); }