Interface WebView.LoadFailedWithTlsErrorsCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
WebView
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface WebView.LoadFailedWithTlsErrorsCallback
extends FunctionPointer
Functional interface declaration of the LoadFailedWithTlsErrorsCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(String failingUri, @Nullable TlsCertificate certificate, Set<TlsCertificateFlags> errors) Emitted when a TLS error occurs during a load operation.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment, MemorySegment, int)method.default intupcall(MemorySegment sourceWebView, MemorySegment failingUri, MemorySegment certificate, int errors) Theupcallmethod is called from native code.
-
Method Details
-
run
boolean run(String failingUri, @Nullable TlsCertificate certificate, Set<TlsCertificateFlags> errors) Emitted when a TLS error occurs during a load operation. To allow an exception for this
certificateand the host offailingUriuse webkit_web_context_allow_tls_certificate_for_host().To handle this signal asynchronously you should call g_object_ref() on
certificateand returntrue.If
falseis returned,WebKitWebView::load-failed will be emitted. The load will finish regardless of the returned value.- Since:
- 2.6
-
upcall
default int upcall(MemorySegment sourceWebView, MemorySegment failingUri, MemorySegment certificate, int errors) Theupcallmethod is called from native code. The parameters are marshaled andrun(String, TlsCertificate, Set)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment, MemorySegment, int)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-