本文整理汇总了C++中InitialisationParams类的典型用法代码示例。如果您正苦于以下问题:C++ InitialisationParams类的具体用法?C++ InitialisationParams怎么用?C++ InitialisationParams使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InitialisationParams类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iEnv
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);
}
}
示例2: threadMain
static void threadMain ( void* aData )
{
InitialisationParams* initParams = InitialisationParams::Create();
Logger logger;
FunctorMsg functor = MakeFunctorMsg(logger, &Logger::Log);
initParams->SetLogOutput(functor);
Runner::Main(0, NULL, initParams);
}
示例3: TestDviDiscovery
void TestDviDiscovery(DvStack& aDvStack)
{
InitialisationParams* initParams = aDvStack.Env().InitParams();
TUint oldMsearchTime = initParams->MsearchTimeSecs();
initParams->SetMsearchTime(3); // higher time to give valgrind tests a hope of completing
//Debug::SetLevel(Debug::kNetwork);
Runner runner("SSDP discovery\n");
runner.Add(new SuiteAlive(aDvStack));
runner.Add(new SuiteMsearch(aDvStack));
runner.Run();
initParams->SetMsearchTime(oldMsearchTime);
}
示例4: TestDviDeviceList
void TestDviDeviceList(CpStack& aCpStack, DvStack& aDvStack)
{
InitialisationParams* initParams = aDvStack.Env().InitParams();
TUint oldMsearchTime = initParams->MsearchTimeSecs();
initParams->SetMsearchTime(1);
// Debug::SetLevel(/*Debug::kDevice | Debug::kDvDevice | Debug::kXmlFetch | Debug::kError);
Print("TestDviDeviceList - starting\n");
DvDevices* devices = new DvDevices(aDvStack);
CpDevices* deviceList = new CpDevices;
FunctorCpDevice added = MakeFunctorCpDevice(*deviceList, &CpDevices::Added);
FunctorCpDevice removed = MakeFunctorCpDevice(*deviceList, &CpDevices::Removed);
Print("Count devices implementing service1\n");
Brn domainName("a.b.c");
Brn serviceType("service1");
TUint ver = 1;
CpDeviceListUpnpServiceType* list =
new CpDeviceListUpnpServiceType(aCpStack, domainName, serviceType, ver, added, removed);
std::vector<const char*> udns;
udns.push_back((const char*)gNameDevice1.Ptr());
udns.push_back((const char*)gNameDevice2.Ptr());
deviceList->Validate(udns);
udns.clear();
delete list;
deviceList->Clear();
Print("Count devices implementing service2\n");
serviceType.Set("service2");
list = new CpDeviceListUpnpServiceType(aCpStack, domainName, serviceType, ver, added, removed);
udns.push_back((const char*)gNameDevice1_1.Ptr());
udns.push_back((const char*)gNameDevice2.Ptr());
deviceList->Validate(udns);
udns.clear();
delete list;
delete deviceList;
delete devices;
Print("TestDviDeviceList - completed\n");
initParams->SetMsearchTime(oldMsearchTime);
}
示例5: OhNetInitParamsMsearchTtl
uint32_t STDCALL OhNetInitParamsMsearchTtl(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
return ip->MsearchTtl();
}
示例6: OhNetInitParamsSetMsearchTtl
void STDCALL OhNetInitParamsSetMsearchTtl(OhNetHandleInitParams aParams, uint32_t aTtl)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
ip->SetMsearchTtl(aTtl);
}
示例7: OhNetInitParamsSetAsyncBeginHandler
void STDCALL OhNetInitParamsSetAsyncBeginHandler(OhNetHandleInitParams aParams, OhNetCallbackAsync aCallback, void* aPtr)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
FunctorAsync functor = MakeFunctorAsync(aPtr, (OhNetFunctorAsync)aCallback);
ip->SetAsyncBeginHandler(functor);
}
示例8: OhNetInitParamsDvIsBonjourEnabled
uint32_t STDCALL OhNetInitParamsDvIsBonjourEnabled(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
const TChar* ignore = NULL;
return (ip->DvIsBonjourEnabled(ignore)? 1 : 0);
}
示例9: OhNetInitParamsCpUpnpEventServerPort
uint32_t STDCALL OhNetInitParamsCpUpnpEventServerPort(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
return ip->CpUpnpEventServerPort();
}
示例10: OhNetInitParamsDvMaxUpdateTimeSecs
uint32_t STDCALL OhNetInitParamsDvMaxUpdateTimeSecs(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
return ip->DvMaxUpdateTimeSecs();
}
示例11: OhNetInitParamsSubscriptionDurationSecs
uint32_t STDCALL OhNetInitParamsSubscriptionDurationSecs(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
return ip->SubscriptionDurationSecs();
}
示例12: OhNetInitParamsSetIncludeLoopbackNetworkAdapter
void STDCALL OhNetInitParamsSetIncludeLoopbackNetworkAdapter(OhNetHandleInitParams aParams)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
ip->SetIncludeLoopbackNetworkAdapter();
}
示例13: OhNetInitParamsSetFreeExternalCallback
void STDCALL OhNetInitParamsSetFreeExternalCallback(OhNetHandleInitParams aParams, OhNetCallbackFreeExternal aCallback)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
ip->SetFreeExternalCallback(aCallback);
}
示例14: OhNetInitParamsSetPendingSubscriptionTimeout
void STDCALL OhNetInitParamsSetPendingSubscriptionTimeout(OhNetHandleInitParams aParams, uint32_t aTimeoutMs)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
ip->SetPendingSubscriptionTimeout(aTimeoutMs);
}
示例15: OhNetInitParamsSetSubscriptionDuration
void STDCALL OhNetInitParamsSetSubscriptionDuration(OhNetHandleInitParams aParams, uint32_t aDurationSecs)
{
InitialisationParams* ip = reinterpret_cast<InitialisationParams*>(aParams);
ip->SetSubscriptionDuration(aDurationSecs);
}