Example #1
0
 static void n_OnResponse_Lokhttp3_Call_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Okhttp3.ICallback __this = global::Java.Lang.Object.GetObject <global::Okhttp3.ICallback> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.ICall     p0     = (global::Okhttp3.ICall)global::Java.Lang.Object.GetObject <global::Okhttp3.ICall> (native_p0, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.Response  p1     = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.OnResponse(p0, p1);
 }
Example #2
0
 static void n_Update_Lokhttp3_Response_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Okhttp3.Internal.IInternalCache __this = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.IInternalCache> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.Response p0 = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p0, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.Response p1 = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.Update(p0, p1);
 }
Example #3
0
 static void n_OnOpen_Lokhttp3_WebSocket_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_webSocket, IntPtr native_response)
 {
     global::Okhttp3.WebSocketListener __this    = global::Java.Lang.Object.GetObject <global::Okhttp3.WebSocketListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.IWebSocket        webSocket = (global::Okhttp3.IWebSocket)global::Java.Lang.Object.GetObject <global::Okhttp3.IWebSocket> (native_webSocket, JniHandleOwnership.DoNotTransfer);
     global::Okhttp3.Response          response  = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_response, JniHandleOwnership.DoNotTransfer);
     __this.OnOpen(webSocket, response);
 }
Example #4
0
        static IntPtr n_OpenResponseBody_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            global::Okhttp3.Internal.Http.IHttpCodec __this = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.Http.IHttpCodec> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Okhttp3.Response p0 = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p0, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.OpenResponseBody(p0));

            return(__ret);
        }
Example #5
0
        static IntPtr n_Put_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            global::Okhttp3.Internal.IInternalCache __this = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.IInternalCache> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Okhttp3.Response p0 = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p0, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Put(p0));

            return(__ret);
        }
            static IntPtr n_PriorResponse_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_priorResponse)
            {
                global::Okhttp3.Response.Builder __this        = global::Java.Lang.Object.GetObject <global::Okhttp3.Response.Builder> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
                global::Okhttp3.Response         priorResponse = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_priorResponse, JniHandleOwnership.DoNotTransfer);
                IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.PriorResponse(priorResponse));

                return(__ret);
            }
Example #7
0
        static IntPtr n_Authenticate_Lokhttp3_Route_Lokhttp3_Response_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
        {
            global::Okhttp3.IAuthenticator __this = global::Java.Lang.Object.GetObject <global::Okhttp3.IAuthenticator> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Okhttp3.Route          p0     = global::Java.Lang.Object.GetObject <global::Okhttp3.Route> (native_p0, JniHandleOwnership.DoNotTransfer);
            global::Okhttp3.Response       p1     = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (native_p1, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Authenticate(p0, p1));

            return(__ret);
        }
        public unsafe void OnResponse(global::Okhttp3.ICall call, global::Okhttp3.Response response)
        {
            const string __id = "onResponse.(Lokhttp3/Call;Lokhttp3/Response;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((call == null) ? IntPtr.Zero : ((global::Java.Lang.Object)call).Handle);
                __args [1] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                _members.InstanceMethods.InvokeAbstractVoidMethod(__id, this, __args);
            } finally {
            }
        }
Example #9
0
        public unsafe global::Okhttp3.ResponseBody OpenResponseBody(global::Okhttp3.Response p0)
        {
            if (id_openResponseBody_Lokhttp3_Response_ == IntPtr.Zero)
            {
                id_openResponseBody_Lokhttp3_Response_ = JNIEnv.GetMethodID(class_ref, "openResponseBody", "(Lokhttp3/Response;)Lokhttp3/ResponseBody;");
            }
            JValue *__args = stackalloc JValue [1];

            __args [0] = new JValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
            global::Okhttp3.ResponseBody __ret = global::Java.Lang.Object.GetObject <global::Okhttp3.ResponseBody> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_openResponseBody_Lokhttp3_Response_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
        public static unsafe global::Okhttp3.Headers VaryHeaders(global::Okhttp3.Response response)
        {
            const string __id = "varyHeaders.(Lokhttp3/Response;)Lokhttp3/Headers;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Java.Lang.Object.GetObject <global::Okhttp3.Headers> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }
            public virtual unsafe global::Okhttp3.Response.Builder PriorResponse(global::Okhttp3.Response priorResponse)
            {
                const string __id = "priorResponse.(Lokhttp3/Response;)Lokhttp3/Response$Builder;";

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                    __args [0] = new JniArgumentValue((priorResponse == null) ? IntPtr.Zero : ((global::Java.Lang.Object)priorResponse).Handle);
                    var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                    return(global::Java.Lang.Object.GetObject <global::Okhttp3.Response.Builder> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
                } finally {
                }
            }
Example #12
0
        public virtual unsafe void OnOpen(global::Okhttp3.IWebSocket webSocket, global::Okhttp3.Response response)
        {
            const string __id = "onOpen.(Lokhttp3/WebSocket;Lokhttp3/Response;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((webSocket == null) ? IntPtr.Zero : ((global::Java.Lang.Object)webSocket).Handle);
                __args [1] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                _members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, __args);
            } finally {
            }
        }
Example #13
0
        public unsafe global::Okhttp3.ResponseBody OpenResponseBody(global::Okhttp3.Response response)
        {
            const string __id = "openResponseBody.(Lokhttp3/Response;)Lokhttp3/ResponseBody;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                var __rm = _members.InstanceMethods.InvokeAbstractObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Okhttp3.ResponseBody> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }
        public unsafe global::Okhttp3.Response Intercept(global::Okhttp3.IInterceptorChain p0)
        {
            if (id_intercept_Lokhttp3_Interceptor_Chain_ == IntPtr.Zero)
            {
                id_intercept_Lokhttp3_Interceptor_Chain_ = JNIEnv.GetMethodID(class_ref, "intercept", "(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;");
            }
            JValue *__args = stackalloc JValue [1];

            __args [0] = new JValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
            global::Okhttp3.Response __ret = global::Java.Lang.Object.GetObject <global::Okhttp3.Response> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_intercept_Lokhttp3_Interceptor_Chain_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
Example #15
0
        public static unsafe bool HasBody(global::Okhttp3.Response response)
        {
            const string __id = "hasBody.(Lokhttp3/Response;)Z";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                var __rm = _members.StaticMethods.InvokeBooleanMethod(__id, __args);
                return(__rm);
            } finally {
            }
        }
Example #16
0
        public unsafe void FailWebSocket(global::Java.Lang.Exception e, global::Okhttp3.Response response)
        {
            const string __id = "failWebSocket.(Ljava/lang/Exception;Lokhttp3/Response;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((e == null) ? IntPtr.Zero : ((global::Java.Lang.Throwable)e).Handle);
                __args [1] = new JniArgumentValue((response == null) ? IntPtr.Zero : ((global::Java.Lang.Object)response).Handle);
                _members.InstanceMethods.InvokeAbstractVoidMethod(__id, this, __args);
            } finally {
            }
        }
Example #17
0
        public unsafe void Update(global::Okhttp3.Response p0, global::Okhttp3.Response p1)
        {
            if (id_update_Lokhttp3_Response_Lokhttp3_Response_ == IntPtr.Zero)
            {
                id_update_Lokhttp3_Response_Lokhttp3_Response_ = JNIEnv.GetMethodID(class_ref, "update", "(Lokhttp3/Response;Lokhttp3/Response;)V");
            }
            JValue *__args = stackalloc JValue [2];

            __args [0] = new JValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
            __args [1] = new JValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
            JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_update_Lokhttp3_Response_Lokhttp3_Response_, __args);
        }
Example #18
0
        public unsafe global::Okhttp3.Internal.Http.ICacheRequest Put(global::Okhttp3.Response p0)
        {
            if (id_put_Lokhttp3_Response_ == IntPtr.Zero)
            {
                id_put_Lokhttp3_Response_ = JNIEnv.GetMethodID(class_ref, "put", "(Lokhttp3/Response;)Lokhttp3/internal/http/CacheRequest;");
            }
            JValue *__args = stackalloc JValue [1];

            __args [0] = new JValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
            global::Okhttp3.Internal.Http.ICacheRequest __ret = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.Http.ICacheRequest> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_put_Lokhttp3_Response_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
Example #19
0
        public unsafe global::Okhttp3.Request Authenticate(global::Okhttp3.Route p0, global::Okhttp3.Response p1)
        {
            if (id_authenticate_Lokhttp3_Route_Lokhttp3_Response_ == IntPtr.Zero)
            {
                id_authenticate_Lokhttp3_Route_Lokhttp3_Response_ = JNIEnv.GetMethodID(class_ref, "authenticate", "(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;");
            }
            JValue *__args = stackalloc JValue [2];

            __args [0] = new JValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
            __args [1] = new JValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
            global::Okhttp3.Request __ret = global::Java.Lang.Object.GetObject <global::Okhttp3.Request> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_authenticate_Lokhttp3_Route_Lokhttp3_Response_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
        public static unsafe bool VaryMatches(global::Okhttp3.Response cachedResponse, global::Okhttp3.Headers cachedRequest, global::Okhttp3.Request newRequest)
        {
            const string __id = "varyMatches.(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue((cachedResponse == null) ? IntPtr.Zero : ((global::Java.Lang.Object)cachedResponse).Handle);
                __args [1] = new JniArgumentValue((cachedRequest == null) ? IntPtr.Zero : ((global::Java.Lang.Object)cachedRequest).Handle);
                __args [2] = new JniArgumentValue((newRequest == null) ? IntPtr.Zero : ((global::Java.Lang.Object)newRequest).Handle);
                var __rm = _members.StaticMethods.InvokeBooleanMethod(__id, __args);
                return(__rm);
            } finally {
            }
        }
            public unsafe Factory(long nowMillis, global::Okhttp3.Request request, global::Okhttp3.Response cacheResponse)
                : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
            {
                const string __id = "(JLokhttp3/Request;Lokhttp3/Response;)V";

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

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                    __args [0] = new JniArgumentValue(nowMillis);
                    __args [1] = new JniArgumentValue((request == null) ? IntPtr.Zero : ((global::Java.Lang.Object)request).Handle);
                    __args [2] = new JniArgumentValue((cacheResponse == null) ? IntPtr.Zero : ((global::Java.Lang.Object)cacheResponse).Handle);
                    var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                    SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                    _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
                } finally {
                }
            }