STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkName) (BSTR *aNetworkName)
{
    AutoCaller autoCaller(this);
    if (FAILED(autoCaller.rc())) return autoCaller.rc();

    Utf8Str utf8Name("HostInterfaceNetworking-");
    utf8Name.append(Utf8Str(mInterfaceName)) ;
    Bstr netName(utf8Name);
    netName.detachTo(aNetworkName);

    return S_OK;
}
예제 #2
0
파일: IPpbox.cpp 프로젝트: uvbs/MyProjects
 boost::uint16_t get_port(char const* module)
 {
     boost::uint16_t port = 0;
     std::string strModule(module);
     if(strModule == "rtsp")
     {
         std::string netName("0.0.0.0:0");
         config().get("RtspManager","addr",netName);
         framework::network::NetName tmpNet(netName);
         port = tmpNet.port();
     }
     else if(strModule == "http")
     {
         std::string netName("0.0.0.0:0");
         config().get("HttpManager","addr",netName);
         framework::network::NetName tmpNet(netName);
         port = tmpNet.port();
     }
     else
     {
     }
     LOG_WARN("[get_port] Module:" << strModule<<" port:"<<port);
     return port;
 }