public unsafe void Connect(int connectTimeout, int readTimeout, int writeTimeout, int pingIntervalMillis, bool connectionRetryEnabled, global::Okhttp3.ICall call, global::Okhttp3.EventListener eventListener)
        {
            const string __id = "connect.(IIIIZLokhttp3/Call;Lokhttp3/EventListener;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [7];
                __args [0] = new JniArgumentValue(connectTimeout);
                __args [1] = new JniArgumentValue(readTimeout);
                __args [2] = new JniArgumentValue(writeTimeout);
                __args [3] = new JniArgumentValue(pingIntervalMillis);
                __args [4] = new JniArgumentValue(connectionRetryEnabled);
                __args [5] = new JniArgumentValue((call == null) ? IntPtr.Zero : ((global::Java.Lang.Object)call).Handle);
                __args [6] = new JniArgumentValue((eventListener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)eventListener).Handle);
                _members.InstanceMethods.InvokeAbstractVoidMethod(__id, this, __args);
            } finally {
            }
        }
Example #2
0
        public unsafe RouteSelector(global::Okhttp3.Address address, global::Okhttp3.Internal.Connection.RouteDatabase routeDatabase, global::Okhttp3.ICall call, global::Okhttp3.EventListener eventListener)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((address == null) ? IntPtr.Zero : ((global::Java.Lang.Object)address).Handle);
                __args [1] = new JniArgumentValue((routeDatabase == null) ? IntPtr.Zero : ((global::Java.Lang.Object)routeDatabase).Handle);
                __args [2] = new JniArgumentValue((call == null) ? IntPtr.Zero : ((global::Java.Lang.Object)call).Handle);
                __args [3] = new JniArgumentValue((eventListener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)eventListener).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }
        public unsafe StreamAllocation(global::Okhttp3.ConnectionPool connectionPool, global::Okhttp3.Address address, global::Okhttp3.ICall call, global::Okhttp3.EventListener eventListener, global::Java.Lang.Object callStackTrace)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/Call;Lokhttp3/EventListener;Ljava/lang/Object;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [5];
                __args [0] = new JniArgumentValue((connectionPool == null) ? IntPtr.Zero : ((global::Java.Lang.Object)connectionPool).Handle);
                __args [1] = new JniArgumentValue((address == null) ? IntPtr.Zero : ((global::Java.Lang.Object)address).Handle);
                __args [2] = new JniArgumentValue((call == null) ? IntPtr.Zero : ((global::Java.Lang.Object)call).Handle);
                __args [3] = new JniArgumentValue((eventListener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)eventListener).Handle);
                __args [4] = new JniArgumentValue((callStackTrace == null) ? IntPtr.Zero : ((global::Java.Lang.Object)callStackTrace).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }
        public unsafe RealInterceptorChain(global::System.Collections.Generic.IList <global::Okhttp3.IInterceptor> interceptors, global::Okhttp3.Internal.Connection.StreamAllocation streamAllocation, global::Okhttp3.Internal.Http.IHttpCodec httpCodec, global::Okhttp3.Internal.Connection.RealConnection connection, int index, global::Okhttp3.Request request, global::Okhttp3.ICall call, global::Okhttp3.EventListener eventListener, int connectTimeout, int readTimeout, int writeTimeout)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Ljava/util/List;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/internal/http/HttpCodec;Lokhttp3/internal/connection/RealConnection;ILokhttp3/Request;Lokhttp3/Call;Lokhttp3/EventListener;III)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_interceptors = global::Android.Runtime.JavaList <global::Okhttp3.IInterceptor> .ToLocalJniHandle(interceptors);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [11];
                __args [0]  = new JniArgumentValue(native_interceptors);
                __args [1]  = new JniArgumentValue((streamAllocation == null) ? IntPtr.Zero : ((global::Java.Lang.Object)streamAllocation).Handle);
                __args [2]  = new JniArgumentValue((httpCodec == null) ? IntPtr.Zero : ((global::Java.Lang.Object)httpCodec).Handle);
                __args [3]  = new JniArgumentValue((connection == null) ? IntPtr.Zero : ((global::Java.Lang.Object)connection).Handle);
                __args [4]  = new JniArgumentValue(index);
                __args [5]  = new JniArgumentValue((request == null) ? IntPtr.Zero : ((global::Java.Lang.Object)request).Handle);
                __args [6]  = new JniArgumentValue((call == null) ? IntPtr.Zero : ((global::Java.Lang.Object)call).Handle);
                __args [7]  = new JniArgumentValue((eventListener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)eventListener).Handle);
                __args [8]  = new JniArgumentValue(connectTimeout);
                __args [9]  = new JniArgumentValue(readTimeout);
                __args [10] = new JniArgumentValue(writeTimeout);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_interceptors);
            }
        }