#[cfg(any(feature = "all", feature = "android-net-TrafficStats"))]
__jni_bindgen! {
public class TrafficStats ("android/net/TrafficStats") extends crate::java::lang::Object {
pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::net::TrafficStats>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/TrafficStats\0", "<init>\0", "()V\0");
__jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getMobileTxPackets<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getMobileTxPackets\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getMobileRxPackets<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getMobileRxPackets\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getMobileTxBytes<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getMobileTxBytes\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getMobileRxBytes<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getMobileRxBytes\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getTotalTxPackets<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getTotalTxPackets\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getTotalRxPackets<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getTotalRxPackets\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getTotalTxBytes<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getTotalTxBytes\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getTotalRxBytes<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getTotalRxBytes\0", "()J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidRxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidRxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTxPackets<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTxPackets\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidRxPackets<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidRxPackets\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTcpTxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTcpTxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTcpRxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTcpRxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidUdpTxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidUdpTxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidUdpRxBytes<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidUdpRxBytes\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTcpTxSegments<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTcpTxSegments\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidTcpRxSegments<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidTcpRxSegments\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidUdpTxPackets<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidUdpTxPackets\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn getUidUdpRxPackets<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/net/TrafficStats\0", "getUidUdpRxPackets\0", "(I)J\0");
__jni_env.call_static_long_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub const UNSUPPORTED : i32 = -1;
}
}