⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectivityinstanceobject.cpp

📁 270的linux说明
💻 CPP
📖 第 1 页 / 共 2 页
字号:
                                IntelMobileString wsRtn;                                IntelMobileString wsParams = CStringHelper::Param2Str(sUriDestination.GetValue());                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyURL.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyUsername.GetValue()));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyPassword.GetValue()));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sTimeOut));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sRetryCount));                                IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("IsReachableEx"), (IntelMobileChar*)wsParams.c_str());                                wsRtn = infoString;                                CStringHelper::Str2Param(wsRtn, bReachable);                                delete []infoString;                        } CATCHBLOCK                }                else                        THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("IsReachableEx"));        }        else                THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("IsReachableEx"));        return bReachable;} // IsReachable()//==============================================================================// GetNetworkAdapter()//==============================================================================StringObject Intel::Mobile::Context::ConnectivityInstance::GetNetworkAdapterKey( StringObject sUriDestination ){	IntelMobileChar* sKey = NULL;	if (m_pImpl)	{		Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);		if (pAPI_Instance)		{			TRYBLOCK {				IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetNetworkAdapterKey"), sUriDestination.GetValue() );				IntelMobileString wsRtn = infoString;				vector<IntelMobileString> vectParam;				bool bRtn;				CStringHelper::Str2ParamVect(wsRtn, vectParam);				CStringHelper::Str2Param(vectParam[0], bRtn);				if(bRtn)					CStringHelper::Str2Param(vectParam[1], sKey);				delete []infoString;			} CATCHBLOCK		}		else			THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetNetworkAdapterKey"));	}	else		THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetNetworkAdapterKey"));	return StringObject(sKey);} // GetNetworkAdapter()//==============================================================================// GetNetworkLinkProtocol()//==============================================================================StringObject Intel::Mobile::Context::ConnectivityInstance::GetNetworkLinkProtocolKey( StringObject sUriDestination ){	IntelMobileChar* sKey = NULL;	if (m_pImpl)	{		Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);		if (pAPI_Instance)		{			TRYBLOCK {				IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetNetworkLinkProtocolKey"), sUriDestination.GetValue());				IntelMobileString wsRtn = infoString;				vector<IntelMobileString> vectParam;				bool bRtn;				CStringHelper::Str2ParamVect(wsRtn, vectParam);				CStringHelper::Str2Param(vectParam[0], bRtn);				if(bRtn)					CStringHelper::Str2Param(vectParam[1], sKey);				delete []infoString;			} CATCHBLOCK		}		else			THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetNetworkLinkProtocolKey"));	}	else		THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetNetworkLinkProtocolKey"));	return StringObject(sKey);} // GetNetworkLinkProtocol()//==============================================================================// GetLatency()//==============================================================================unsigned __int32 Intel::Mobile::Context::ConnectivityInstance::GetLatency( StringObject sUriDestination ){	ULONG uValue = 0U;	if (m_pImpl)	{		Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);		if (pAPI_Instance)		{			TRYBLOCK {				IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetLatency"), sUriDestination.GetValue());				IntelMobileString wsRtn = infoString;				// Fix SCR#1058				CStringHelper::Str2Param(wsRtn, uValue);				//vector<IntelMobileString> vectParam;				//bool bRtn;				//CStringHelper::Str2ParamVect(wsRtn, vectParam);				//CStringHelper::Str2Param(vectParam[0], bRtn);				//if(bRtn)				//	CStringHelper::Str2Param(vectParam[1], uValue);				// End of Fix SCR#1058				delete []infoString;			} CATCHBLOCK		}		else			THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));	}	else		THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));	return uValue;} // GetLatency()//==============================================================================// GetLatency() Uses what ever IE uses for proxy settings.  Pass in timeout values.//==============================================================================unsigned __int32 Intel::Mobile::Context::ConnectivityInstance::GetLatency( StringObject sUriDestination, unsigned int sTimeOut, unsigned int sRetryCount ){        ULONG uValue = 0U;        if (m_pImpl)        {                Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);                if (pAPI_Instance)                {                        TRYBLOCK {                                IntelMobileString wsParams = CStringHelper::Param2Str(sUriDestination.GetValue() );                                wsParams.append(IntelMobileText(","));                                wsParams.append(IntelMobileText("N"));                                wsParams.append(IntelMobileText(","));                                wsParams.append(IntelMobileText("123"));                                wsParams.append(IntelMobileText(","));                                wsParams.append(IntelMobileText("123"));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sTimeOut));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sRetryCount));                                IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetLatencyEx"), (IntelMobileChar*)wsParams.c_str());                                IntelMobileString wsRtn = infoString;                                CStringHelper::Str2Param(wsRtn, uValue);                                delete []infoString;                        } CATCHBLOCK                }                else                        THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        }        else                THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        return uValue;} // GetLatency()//==============================================================================// GetLatency() Pass in proxy info.  Default timeout values as 1 minute and try only 1 time.//==============================================================================unsigned __int32 Intel::Mobile::Context::ConnectivityInstance::GetLatency( StringObject sUriDestination, StringObject sProxyURL, StringObject sProxyUsername, StringObject sProxyPassword ){        ULONG uValue = 0U;        if (m_pImpl)        {                Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);                if (pAPI_Instance)                {                        TRYBLOCK {                                IntelMobileString wsParams = CStringHelper::Param2Str(sUriDestination.GetValue() );                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyURL.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyUsername.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyPassword.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(IntelMobileText("0"));                                wsParams.append(IntelMobileText(","));                                wsParams.append(IntelMobileText("1"));                                IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetLatencyEx"), (IntelMobileChar*)wsParams.c_str());                                IntelMobileString wsRtn = infoString;                                CStringHelper::Str2Param(wsRtn, uValue);                                delete []infoString;                        } CATCHBLOCK                }                else                        THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        }        else                THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        return uValue;} // GetLatency()//==============================================================================// GetLatency() Pass in proxy and timeout info.//==============================================================================unsigned __int32 Intel::Mobile::Context::ConnectivityInstance::GetLatency( StringObject sUriDestination, StringObject sProxyURL, StringObject sProxyUsername, StringObject sProxyPassword,unsigned int sTimeOut, unsigned int sRetryCount ){        ULONG uValue = 0U;        if (m_pImpl)        {                Intel::Mobile::BaseAPI::InstanceObject *pAPI_Instance = reinterpret_cast<Intel::Mobile::BaseAPI::InstanceObject *>(m_pImpl);                if (pAPI_Instance)                {                        TRYBLOCK {                                IntelMobileString wsParams = CStringHelper::Param2Str(sUriDestination.GetValue() );                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyURL.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyUsername.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sProxyPassword.GetValue() ));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sTimeOut));                                wsParams.append(IntelMobileText(","));                                wsParams.append(CStringHelper::Param2Str(sRetryCount));                                IntelMobileChar* infoString = pAPI_Instance->InvokeMethod( IntelMobileText("GetLatencyEx"), (IntelMobileChar*)wsParams.c_str());                                IntelMobileString wsRtn = infoString;                                CStringHelper::Str2Param(wsRtn, uValue);                                delete []infoString;                        } CATCHBLOCK                }                else                        THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        }        else                THROWNE(IntelMobileText("Intel::Mobile::Context::ConnectivityInstance"), IntelMobileText("GetLatency"));        return uValue;} // GetLatency()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -