public unsafe void GetResponseHeaders(cef_response_t *response, long *response_length, cef_string_t *redirectUrl) { fixed(cef_resource_handler_t *self = &this) { ((delegate * unmanaged[Stdcall] < cef_resource_handler_t *, cef_response_t *, long *, cef_string_t *, void >)get_response_headers)(self, response, response_length, redirectUrl); } }
private CefResponse(cef_response_t *ptr) { if (ptr == null) { throw new ArgumentNullException("ptr"); } _self = ptr; }
internal static CefResponse FromNativeOrNull(cef_response_t *ptr) { if (ptr == null) { return(null); } return(new CefResponse(ptr)); }
public void Dispose() { if (_self != null) { Release(); _self = null; } GC.SuppressFinalize(this); }
public void Dispose() { if (_self != null) { Release(); _self = null; } GC.SuppressFinalize(this); }
/// <summary> /// Retrieve response header information. If the response length is not /// known set |response_length| to -1 and ReadResponse() will be called /// until it returns false. If the response length is known set /// |response_length| to a positive value and ReadResponse() will be /// called until it returns false or the specified number of bytes have /// been read. Use the |response| object to set the mime type, http /// status code and other optional header values. /// To redirect the request to a new URL set |redirectUrl| to the new URL. /// </summary> private void get_response_headers(cef_scheme_handler_t *self, cef_response_t *response, long *response_length, cef_string_t *redirectUrl) { ThrowIfObjectDisposed(); var mResponse = CefResponse.From(response); long mResponseLength; string mRedirectUrl = null; this.GetResponseHeaders(mResponse, out mResponseLength, ref mRedirectUrl); *response_length = mResponseLength; if (mRedirectUrl != null) { cef_string_t.Copy(mRedirectUrl, redirectUrl); } }
private void get_response_headers(cef_resource_handler_t *self, cef_response_t *response, long *response_length, cef_string_t *redirectUrl) { CheckSelf(self); var m_response = CefResponse.FromNative(response); long m_responseLength; string m_redirectUrl; GetResponseHeaders(m_response, out m_responseLength, out m_redirectUrl); *response_length = m_responseLength; if (!string.IsNullOrEmpty(m_redirectUrl)) { cef_string_t.Copy(m_redirectUrl, redirectUrl); } }
public static void set_url(cef_response_t *self, cef_string_t *url) { set_url_delegate d; var p = self->_set_url; if (p == _p11) { d = _d11; } else { d = (set_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_url_delegate)); if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } } d(self, url); }
public static cef_string_userfree *get_url(cef_response_t *self) { get_url_delegate d; var p = self->_get_url; if (p == _p10) { d = _d10; } else { d = (get_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_url_delegate)); if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } } return(d(self)); }
public static void set_header_map(cef_response_t *self, cef_string_multimap *headerMap) { set_header_map_delegate d; var p = self->_set_header_map; if (p == _pf) { d = _df; } else { d = (set_header_map_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_header_map_delegate)); if (_pf == IntPtr.Zero) { _df = d; _pf = p; } } d(self, headerMap); }
public static void set_header_by_name(cef_response_t *self, cef_string_t *name, cef_string_t *value, int overwrite) { set_header_by_name_delegate d; var p = self->_set_header_by_name; if (p == _p10) { d = _d10; } else { d = (set_header_by_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_header_by_name_delegate)); if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } } d(self, name, value, overwrite); }
public static void set_mime_type(cef_response_t *self, cef_string_t *mimeType) { set_mime_type_delegate d; var p = self->_set_mime_type; if (p == _pc) { d = _dc; } else { d = (set_mime_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_mime_type_delegate)); if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } } d(self, mimeType); }
public static void set_status_text(cef_response_t *self, cef_string_t *statusText) { set_status_text_delegate d; var p = self->_set_status_text; if (p == _pa) { d = _da; } else { d = (set_status_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_status_text_delegate)); if (_pa == IntPtr.Zero) { _da = d; _pa = p; } } d(self, statusText); }
public static void add_ref(cef_response_t *self) { add_ref_delegate d; var p = self->_base._add_ref; if (p == _p0) { d = _d0; } else { d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } } d(self); }
public static int get_status(cef_response_t *self) { get_status_delegate d; var p = self->_get_status; if (p == _p7) { d = _d7; } else { d = (get_status_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_status_delegate)); if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } } return(d(self)); }
public static void set_error(cef_response_t *self, CefErrorCode error) { set_error_delegate d; var p = self->_set_error; if (p == _p6) { d = _d6; } else { d = (set_error_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_error_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } d(self, error); }
public static CefErrorCode get_error(cef_response_t *self) { get_error_delegate d; var p = self->_get_error; if (p == _p5) { d = _d5; } else { d = (get_error_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_error_delegate)); if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } } return(d(self)); }
public static int is_read_only(cef_response_t *self) { is_read_only_delegate d; var p = self->_is_read_only; if (p == _p4) { d = _d4; } else { d = (is_read_only_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_read_only_delegate)); if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } } return(d(self)); }
public static int has_at_least_one_ref(cef_response_t *self) { has_at_least_one_ref_delegate d; var p = self->_base._has_at_least_one_ref; if (p == _p3) { d = _d3; } else { d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } } return(d(self)); }
public static int release(cef_response_t *self) { release_delegate d; var p = self->_base._release; if (p == _p1) { d = _d1; } else { d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } } return(d(self)); }
public static cef_string_userfree *get_status_text(cef_response_t *self) { get_status_text_delegate d; var p = self->_get_status_text; if (p == _p9) { d = _d9; } else { d = (get_status_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_status_text_delegate)); if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } } return(d(self)); }
public static int get_refct(cef_response_t *self) { get_refct_delegate d; var p = self->_base._get_refct; if (p == _p2) { d = _d2; } else { d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate)); if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } } return(d(self)); }
public static void set_status(cef_response_t *self, int status) { set_status_delegate d; var p = self->_set_status; if (p == _p8) { d = _d8; } else { d = (set_status_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_status_delegate)); if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } } d(self, status); }
public static void set_charset(cef_response_t *self, cef_string_t *charset) { set_charset_delegate d; var p = self->_set_charset; if (p == _pe) { d = _de; } else { d = (set_charset_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_charset_delegate)); if (_pe == IntPtr.Zero) { _de = d; _pe = p; } } d(self, charset); }
public static cef_string_userfree *get_header(cef_response_t *self, cef_string_t *name) { get_header_delegate d; var p = self->_get_header; if (p == _pd) { d = _dd; } else { d = (get_header_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_header_delegate)); if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } } return(d(self, name)); }
public unsafe extern cef_response_filter_t *GetResourceResponseFilter(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response);
public unsafe extern void OnResourceLoadComplete(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, CefUrlRequestStatus status, long received_content_length);
public unsafe extern int OnResourceResponse(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response);
public unsafe extern void OnResourceRedirect(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, cef_string_t *new_url);
private CefResponse(cef_response_t* ptr) { if (ptr == null) throw new ArgumentNullException("ptr"); _self = ptr; }
private void on_resource_load_complete(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, CefUrlRequestStatus status, long received_content_length) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mRequest = CefRequest.FromNative(request); var mResponse = CefResponse.FromNative(response); OnResourceLoadComplete(mBrowser, mFrame, mRequest, mResponse, status, received_content_length); }
internal static CefResponse FromNative(cef_response_t *ptr) { return(new CefResponse(ptr)); }