Ejemplo n.º 1
0
 static void OverrideRequestCertificate(GLib.GType gtype, RequestCertificateNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("request_certificate"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Ejemplo n.º 2
0
        private GLib.TlsInteractionResult InternalRequestCertificate(GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable cancellable)
        {
            RequestCertificateNativeDelegate unmanaged = class_abi.BaseOverride <RequestCertificateNativeDelegate>(this.LookupGType(), "request_certificate");

            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            int    __result = unmanaged(this.Handle, connection == null ? IntPtr.Zero : connection.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((GLib.TlsInteractionResult)__result);
        }
Ejemplo n.º 3
0
        private GLib.TlsInteractionResult InternalRequestCertificate(GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable cancellable)
        {
            RequestCertificateNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("request_certificate"));
                unmanaged = (RequestCertificateNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RequestCertificateNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            int    __result = unmanaged(this.Handle, connection == null ? IntPtr.Zero : connection.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((GLib.TlsInteractionResult)__result);
        }