All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.purejava.appindicator._GTlsConnectionClass Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
// Generated by jextract

package org.purejava.appindicator;

import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.invoke.VarHandle;
/**
 * {@snippet :
 * struct _GTlsConnectionClass {
 *     struct _GIOStreamClass parent_class;
 *     int (*accept_certificate)(struct _GTlsConnection*,struct _GTlsCertificate*,enum GTlsCertificateFlags);
 *     int (*handshake)(struct _GTlsConnection*,struct _GCancellable*,struct _GError**);
 *     void (*handshake_async)(struct _GTlsConnection*,int,struct _GCancellable*,void (*)(struct _GObject*,struct _GAsyncResult*,void*),void*);
 *     int (*handshake_finish)(struct _GTlsConnection*,struct _GAsyncResult*,struct _GError**);
 *     int (*get_binding_data)(struct _GTlsConnection*,enum GTlsChannelBindingType,struct _GByteArray*,struct _GError**);
 *     char* (*get_negotiated_protocol)(struct _GTlsConnection*);
 *     void* padding[6];
 * };
 * }
 */
public class _GTlsConnectionClass {

    public static MemoryLayout $LAYOUT() {
        return constants$1355.const$1;
    }
    public static MemorySegment parent_class$slice(MemorySegment seg) {
        return seg.asSlice(0, 256);
    }
    /**
     * {@snippet :
 * int (*accept_certificate)(struct _GTlsConnection*,struct _GTlsCertificate*,enum GTlsCertificateFlags);
     * }
     */
    public interface accept_certificate {

        int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2);
        static MemorySegment allocate(accept_certificate fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1355.const$2, fi, constants$62.const$0, scope);
        }
        static accept_certificate ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2) -> {
                try {
                    return (int)constants$955.const$2.invokeExact(symbol, __x0, __x1, __x2);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle accept_certificate$VH() {
        return constants$1355.const$3;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*accept_certificate)(struct _GTlsConnection*,struct _GTlsCertificate*,enum GTlsCertificateFlags);
     * }
     */
    public static MemorySegment accept_certificate$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1355.const$3.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*accept_certificate)(struct _GTlsConnection*,struct _GTlsCertificate*,enum GTlsCertificateFlags);
     * }
     */
    public static void accept_certificate$set(MemorySegment seg, MemorySegment x) {
        constants$1355.const$3.set(seg, x);
    }
    public static MemorySegment accept_certificate$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1355.const$3.get(seg.asSlice(index*sizeof()));
    }
    public static void accept_certificate$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1355.const$3.set(seg.asSlice(index*sizeof()), x);
    }
    public static accept_certificate accept_certificate(MemorySegment segment, Arena scope) {
        return accept_certificate.ofAddress(accept_certificate$get(segment), scope);
    }
    /**
     * {@snippet :
 * int (*handshake)(struct _GTlsConnection*,struct _GCancellable*,struct _GError**);
     * }
     */
    public interface handshake {

        int apply(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment user_data);
        static MemorySegment allocate(handshake fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1355.const$4, fi, constants$12.const$2, scope);
        }
        static handshake ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _a, java.lang.foreign.MemorySegment _b, java.lang.foreign.MemorySegment _user_data) -> {
                try {
                    return (int)constants$12.const$4.invokeExact(symbol, _a, _b, _user_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle handshake$VH() {
        return constants$1355.const$5;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*handshake)(struct _GTlsConnection*,struct _GCancellable*,struct _GError**);
     * }
     */
    public static MemorySegment handshake$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1355.const$5.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*handshake)(struct _GTlsConnection*,struct _GCancellable*,struct _GError**);
     * }
     */
    public static void handshake$set(MemorySegment seg, MemorySegment x) {
        constants$1355.const$5.set(seg, x);
    }
    public static MemorySegment handshake$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1355.const$5.get(seg.asSlice(index*sizeof()));
    }
    public static void handshake$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1355.const$5.set(seg.asSlice(index*sizeof()), x);
    }
    public static handshake handshake(MemorySegment segment, Arena scope) {
        return handshake.ofAddress(handshake$get(segment), scope);
    }
    /**
     * {@snippet :
 * void (*handshake_async)(struct _GTlsConnection*,int,struct _GCancellable*,void (*)(struct _GObject*,struct _GAsyncResult*,void*),void*);
     * }
     */
    public interface handshake_async {

        void apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3, java.lang.foreign.MemorySegment _x4);
        static MemorySegment allocate(handshake_async fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1356.const$0, fi, constants$281.const$5, scope);
        }
        static handshake_async ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3, java.lang.foreign.MemorySegment __x4) -> {
                try {
                    constants$754.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle handshake_async$VH() {
        return constants$1356.const$1;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*handshake_async)(struct _GTlsConnection*,int,struct _GCancellable*,void (*)(struct _GObject*,struct _GAsyncResult*,void*),void*);
     * }
     */
    public static MemorySegment handshake_async$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$1.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*handshake_async)(struct _GTlsConnection*,int,struct _GCancellable*,void (*)(struct _GObject*,struct _GAsyncResult*,void*),void*);
     * }
     */
    public static void handshake_async$set(MemorySegment seg, MemorySegment x) {
        constants$1356.const$1.set(seg, x);
    }
    public static MemorySegment handshake_async$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$1.get(seg.asSlice(index*sizeof()));
    }
    public static void handshake_async$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1356.const$1.set(seg.asSlice(index*sizeof()), x);
    }
    public static handshake_async handshake_async(MemorySegment segment, Arena scope) {
        return handshake_async.ofAddress(handshake_async$get(segment), scope);
    }
    /**
     * {@snippet :
 * int (*handshake_finish)(struct _GTlsConnection*,struct _GAsyncResult*,struct _GError**);
     * }
     */
    public interface handshake_finish {

        int apply(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment user_data);
        static MemorySegment allocate(handshake_finish fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1356.const$2, fi, constants$12.const$2, scope);
        }
        static handshake_finish ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _a, java.lang.foreign.MemorySegment _b, java.lang.foreign.MemorySegment _user_data) -> {
                try {
                    return (int)constants$12.const$4.invokeExact(symbol, _a, _b, _user_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle handshake_finish$VH() {
        return constants$1356.const$3;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*handshake_finish)(struct _GTlsConnection*,struct _GAsyncResult*,struct _GError**);
     * }
     */
    public static MemorySegment handshake_finish$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$3.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*handshake_finish)(struct _GTlsConnection*,struct _GAsyncResult*,struct _GError**);
     * }
     */
    public static void handshake_finish$set(MemorySegment seg, MemorySegment x) {
        constants$1356.const$3.set(seg, x);
    }
    public static MemorySegment handshake_finish$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$3.get(seg.asSlice(index*sizeof()));
    }
    public static void handshake_finish$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1356.const$3.set(seg.asSlice(index*sizeof()), x);
    }
    public static handshake_finish handshake_finish(MemorySegment segment, Arena scope) {
        return handshake_finish.ofAddress(handshake_finish$get(segment), scope);
    }
    /**
     * {@snippet :
 * int (*get_binding_data)(struct _GTlsConnection*,enum GTlsChannelBindingType,struct _GByteArray*,struct _GError**);
     * }
     */
    public interface get_binding_data {

        int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3);
        static MemorySegment allocate(get_binding_data fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1356.const$4, fi, constants$11.const$0, scope);
        }
        static get_binding_data ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3) -> {
                try {
                    return (int)constants$464.const$0.invokeExact(symbol, __x0, __x1, __x2, __x3);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_binding_data$VH() {
        return constants$1356.const$5;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*get_binding_data)(struct _GTlsConnection*,enum GTlsChannelBindingType,struct _GByteArray*,struct _GError**);
     * }
     */
    public static MemorySegment get_binding_data$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$5.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*get_binding_data)(struct _GTlsConnection*,enum GTlsChannelBindingType,struct _GByteArray*,struct _GError**);
     * }
     */
    public static void get_binding_data$set(MemorySegment seg, MemorySegment x) {
        constants$1356.const$5.set(seg, x);
    }
    public static MemorySegment get_binding_data$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1356.const$5.get(seg.asSlice(index*sizeof()));
    }
    public static void get_binding_data$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1356.const$5.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_binding_data get_binding_data(MemorySegment segment, Arena scope) {
        return get_binding_data.ofAddress(get_binding_data$get(segment), scope);
    }
    /**
     * {@snippet :
 * char* (*get_negotiated_protocol)(struct _GTlsConnection*);
     * }
     */
    public interface get_negotiated_protocol {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
        static MemorySegment allocate(get_negotiated_protocol fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1357.const$0, fi, constants$5.const$2, scope);
        }
        static get_negotiated_protocol ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _user_data) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$99.const$0.invokeExact(symbol, _user_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_negotiated_protocol$VH() {
        return constants$1357.const$1;
    }
    /**
     * Getter for field:
     * {@snippet :
     * char* (*get_negotiated_protocol)(struct _GTlsConnection*);
     * }
     */
    public static MemorySegment get_negotiated_protocol$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1357.const$1.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * char* (*get_negotiated_protocol)(struct _GTlsConnection*);
     * }
     */
    public static void get_negotiated_protocol$set(MemorySegment seg, MemorySegment x) {
        constants$1357.const$1.set(seg, x);
    }
    public static MemorySegment get_negotiated_protocol$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1357.const$1.get(seg.asSlice(index*sizeof()));
    }
    public static void get_negotiated_protocol$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1357.const$1.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_negotiated_protocol get_negotiated_protocol(MemorySegment segment, Arena scope) {
        return get_negotiated_protocol.ofAddress(get_negotiated_protocol$get(segment), scope);
    }
    public static MemorySegment padding$slice(MemorySegment seg) {
        return seg.asSlice(304, 48);
    }
    public static long sizeof() { return $LAYOUT().byteSize(); }
    public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); }
    public static MemorySegment allocateArray(long len, SegmentAllocator allocator) {
        return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT()));
    }
    public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); }
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy