jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-net-sip-SipSession"))]
__jni_bindgen! {
    /// public final class [SipSession](https://developer.android.com/reference/android/net/sip/SipSession.html)
    ///
    /// Required feature: "android-net-sip-SipSession"
    public final class SipSession ("android/net/sip/SipSession") extends crate::java::lang::Object {

        /// [getLocalIp](https://developer.android.com/reference/android/net/sip/SipSession.html#getLocalIp())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getLocalIp<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "getLocalIp", .descriptor == "()Ljava/lang/String;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "getLocalIp\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getLocalProfile](https://developer.android.com/reference/android/net/sip/SipSession.html#getLocalProfile())
        ///
        /// Required features: "android-net-sip-SipProfile"
        #[cfg(any(feature = "all", all(feature = "android-net-sip-SipProfile")))]
        pub fn getLocalProfile<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::net::sip::SipProfile>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "getLocalProfile", .descriptor == "()Landroid/net/sip/SipProfile;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "getLocalProfile\0", "()Landroid/net/sip/SipProfile;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getPeerProfile](https://developer.android.com/reference/android/net/sip/SipSession.html#getPeerProfile())
        ///
        /// Required features: "android-net-sip-SipProfile"
        #[cfg(any(feature = "all", all(feature = "android-net-sip-SipProfile")))]
        pub fn getPeerProfile<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::net::sip::SipProfile>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "getPeerProfile", .descriptor == "()Landroid/net/sip/SipProfile;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "getPeerProfile\0", "()Landroid/net/sip/SipProfile;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getState](https://developer.android.com/reference/android/net/sip/SipSession.html#getState())
        pub fn getState<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "getState", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "getState\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isInCall](https://developer.android.com/reference/android/net/sip/SipSession.html#isInCall())
        pub fn isInCall<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "isInCall", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "isInCall\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getCallId](https://developer.android.com/reference/android/net/sip/SipSession.html#getCallId())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn getCallId<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "getCallId", .descriptor == "()Ljava/lang/String;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "getCallId\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setListener](https://developer.android.com/reference/android/net/sip/SipSession.html#setListener(android.net.sip.SipSession.Listener))
        ///
        /// Required features: "android-net-sip-SipSession_Listener"
        #[cfg(any(feature = "all", all(feature = "android-net-sip-SipSession_Listener")))]
        pub fn setListener<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::net::sip::SipSession_Listener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "setListener", .descriptor == "(Landroid/net/sip/SipSession$Listener;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "setListener\0", "(Landroid/net/sip/SipSession$Listener;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [register](https://developer.android.com/reference/android/net/sip/SipSession.html#register(int))
        pub fn register<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "register", .descriptor == "(I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "register\0", "(I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [unregister](https://developer.android.com/reference/android/net/sip/SipSession.html#unregister())
        pub fn unregister<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "unregister", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "unregister\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [makeCall](https://developer.android.com/reference/android/net/sip/SipSession.html#makeCall(android.net.sip.SipProfile,%20java.lang.String,%20int))
        ///
        /// Required features: "android-net-sip-SipProfile", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-net-sip-SipProfile", feature = "java-lang-String")))]
        pub fn makeCall<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::net::sip::SipProfile>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg2: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "makeCall", .descriptor == "(Landroid/net/sip/SipProfile;Ljava/lang/String;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "makeCall\0", "(Landroid/net/sip/SipProfile;Ljava/lang/String;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [answerCall](https://developer.android.com/reference/android/net/sip/SipSession.html#answerCall(java.lang.String,%20int))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn answerCall<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "answerCall", .descriptor == "(Ljava/lang/String;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "answerCall\0", "(Ljava/lang/String;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [endCall](https://developer.android.com/reference/android/net/sip/SipSession.html#endCall())
        pub fn endCall<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "endCall", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "endCall\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [changeCall](https://developer.android.com/reference/android/net/sip/SipSession.html#changeCall(java.lang.String,%20int))
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn changeCall<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/sip/SipSession", java.flags == PUBLIC, .name == "changeCall", .descriptor == "(Ljava/lang/String;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/sip/SipSession\0", "changeCall\0", "(Ljava/lang/String;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}