📄 bandwidthinstancejni.cpp
字号:
* Method: GetSessionPercentTx * Signature: (J)F */JNIEXPORT jfloat JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionPercentTxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); float fRtn = 0.0; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionPercentTx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, fRtn); delete []infoString; return fRtn; //return TheBandwidthInstance->GetSessionRateTx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionPercentTx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetSessionPercentRx * Signature: (J)F */JNIEXPORT jfloat JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionPercentRxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); float fRtn = 0.0; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionPercentRx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, fRtn); delete []infoString; return fRtn; //return TheBandwidthInstance->GetSessionRateRx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionPercentRx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetEffectiveSessionLimitTx * Signature: (J)F */JNIEXPORT jfloat JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetEffectiveSessionLimitTxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); float fRtn = 0.0; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetEffectiveSessionLimitTx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, fRtn); delete []infoString; return fRtn; //return TheBandwidthInstance->GetEffectiveSessionLimitTx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetEffectiveSessionLimitTx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetEffectiveSessionLimitRx * Signature: (J)F */JNIEXPORT jfloat JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetEffectiveSessionLimitRxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); float fRtn = 0.0; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetEffectiveSessionLimitRx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, fRtn); return fRtn; //return TheBandwidthInstance->GetEffectiveSessionLimitRx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetEffectiveSessionLimitRx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetSessionAdaptivelyLimitable * Signature: (J)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionAdaptivelyLimitableNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionAdaptivelyLimitable"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->GetSessionAdaptivelyLimitable( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionAdaptivelyLimitable()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetSessionAdaptive * Signature: (J)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionAdaptiveNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionAdaptive"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->GetSessionAdaptive( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionAdaptive()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: SetSessionAdaptive * Signature: (JZ)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_SetSessionAdaptiveNative( JNIEnv *JniEnv, jobject JObject, jlong socketId, jboolean isAdaptive ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; wsParams.append(IntelMobileText(",")); wsParams.append(CStringHelper::Param2Str(isAdaptive)); IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("SetSessionAdaptive"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->SetSessionAdaptive( (UINT64)socketId, isAdaptive ? true : false ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("SetSessionAdaptive()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetSessionLimitedTx * Signature: (J)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionLimitedTxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionLimitedTx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->GetSessionLimitedTx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionLimitedTx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: GetSessionLimitedRx * Signature: (J)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_GetSessionLimitedRxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("GetSessionLimitedRx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->GetSessionLimitedRx( (UINT64)socketId ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("GetSessionLimitedRx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: SetSessionLimitedTx * Signature: (JZ)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_SetSessionLimitedTxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId, jboolean isLimited ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; wsParams.append(IntelMobileText(",")); wsParams.append(CStringHelper::Param2Str(isLimited)); IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("SetSessionLimitedTx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->SetSessionLimitedTx( (UINT64)socketId, isLimited ? true : false ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("SetSessionLimitedTx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: SetSessionLimitedRx * Signature: (JZ)Z */JNIEXPORT jboolean JNICALL Java_com_intel_mobile_context_BandwidthInstance_SetSessionLimitedRxNative( JNIEnv *JniEnv, jobject JObject, jlong socketId, jboolean isLimited ){ try { InstanceObject * TheBandwidthInstance = (InstanceObject *) Get_nativeObjRef( JniEnv, JObject ); bool bRtn = false; printf(", what's mean\n"); IntelMobileString wsParams = CStringHelper::Param2Str(socketId), wsRtn; wsParams.append(IntelMobileText(",")); wsParams.append(CStringHelper::Param2Str(isLimited)); IntelMobileChar* infoString = TheBandwidthInstance->InvokeMethod( IntelMobileText("SetSessionLimitedRx"), (IntelMobileChar*)wsParams.c_str()); wsRtn = infoString; CStringHelper::Str2Param(wsRtn, bRtn); delete []infoString; return bRtn; //return TheBandwidthInstance->SetSessionLimitedRx( (UINT64)socketId, isLimited ? true : false ); } catch (IntelMobileException Ex) { ThrowException( JniEnv, Ex ); } catch (...) { ThrowUnknownException( JniEnv, IntelMobileText("BandwidthInstance"), IntelMobileText("SetSessionLimitedRx()") ); } return NULL;}/* * Class: com_intel_mobile_context_BandwidthInstance * Method: ThrowNotConnect * Signature: ()V */JNIEXPORT void JNICALL Java_com_intel_mobile_context_BandwidthInstance_ThrowNotConnectNative( JNIEnv *JniEnv, jclass JClass){ ThrowException(JniEnv, "com/intel/mobile/base/IntelMobileException", IntelMobileText("Fail to convert the Socket to socketId."), IntelMobileText("BandwidthInstance"), IntelMobileText("getSocketId()"), IntelMobileText("0x80045060"), NULL);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -