当前位置: 首页>>代码示例>>C++>>正文


C++ NetworkAdapter::FullName方法代码示例

本文整理汇总了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();
}
开发者ID:Jacik,项目名称:ohNet,代码行数:42,代码来源:DviProtocolUpnp.cpp

示例2: OhNetNetworkAdapterFullName

char* STDCALL OhNetNetworkAdapterFullName(OhNetHandleNetworkAdapter aNif)
{
    NetworkAdapter* nif = reinterpret_cast<NetworkAdapter*>(aNif);
    ASSERT(nif != NULL);
    return nif->FullName();
}
开发者ID:sewood,项目名称:ohNet,代码行数:6,代码来源:OhNetC.cpp


注:本文中的NetworkAdapter::FullName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。