本文整理汇总了C++中NetworkAdapter::FullName方法的典型用法代码示例。如果您正苦于以下问题:C++ NetworkAdapter::FullName方法的具体用法?C++ NetworkAdapter::FullName怎么用?C++ NetworkAdapter::FullName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkAdapter
的用法示例。
在下文中一共展示了NetworkAdapter::FullName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ref
DviProtocolUpnp::DviProtocolUpnp(DviDevice& aDevice)
: iDevice(aDevice)
, iDvStack(aDevice.GetDvStack())
, iLock("DMUP")
, iUpdateCount(0)
, iSuppressScheduledEvents(false)
{
SetAttribute(kAttributeKeyVersionMajor, "1");
SetAttribute(kAttributeKeyVersionMinor, "1");
iLock.Wait();
iServer = &(iDvStack.ServerUpnp());
NetworkAdapterList& adapterList = iDvStack.Env().NetworkAdapterList();
Functor functor = MakeFunctor(*this, &DviProtocolUpnp::HandleInterfaceChange);
iCurrentAdapterChangeListenerId = adapterList.AddCurrentChangeListener(functor);
iSubnetListChangeListenerId = adapterList.AddSubnetListChangeListener(functor);
std::vector<NetworkAdapter*>* subnetList = adapterList.CreateSubnetList();
AutoNetworkAdapterRef ref(iDvStack.Env(), "DviProtocolUpnp ctor");
const NetworkAdapter* current = ref.Adapter();
if (current != NULL) {
AddInterface(*current);
}
else {
for (TUint i=0; i<subnetList->size(); i++) {
NetworkAdapter* subnet = (*subnetList)[i];
try {
AddInterface(*subnet);
}
catch (NetworkError& ) {
// some hosts may have adapters that don't support multicast
// we can't differentiate between no support ever and transient failure
// (typical on Windows & Mac after hibernation) so just ignore this exception
// and trust that we'll get advertised on another interface.
char* adapterName = subnet->FullName();
LOG2(kTrace, kError, "DvDevice unable to use adapter %s\n", adapterName);
delete adapterName;
}
}
}
NetworkAdapterList::DestroySubnetList(subnetList);
iAliveTimer = new Timer(iDvStack.Env(), MakeFunctor(*this, &DviProtocolUpnp::SendAliveNotifications), "DviProtocolUpnp");
iLock.Signal();
}
示例2: OhNetNetworkAdapterFullName
char* STDCALL OhNetNetworkAdapterFullName(OhNetHandleNetworkAdapter aNif)
{
NetworkAdapter* nif = reinterpret_cast<NetworkAdapter*>(aNif);
ASSERT(nif != NULL);
return nif->FullName();
}