// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject/types" ) // vtable for a #GDtlsServerConnection implementation. type DtlsServerConnectionInterface struct { _ structs.HostLayout GIface uintptr } func (x *DtlsServerConnectionInterface) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // `GDtlsServerConnection` is the server-side subclass of // [iface@Gio.DtlsConnection], representing a server-side DTLS connection. type DtlsServerConnection interface { GoPointer() uintptr SetGoPointer(uintptr) } var xDtlsServerConnectionGLibType func() types.GType func DtlsServerConnectionGLibType() types.GType { return xDtlsServerConnectionGLibType() } type DtlsServerConnectionBase struct { Ptr uintptr } func (x *DtlsServerConnectionBase) GoPointer() uintptr { if x == nil { return 0 } return x.Ptr } func (x *DtlsServerConnectionBase) SetGoPointer(ptr uintptr) { x.Ptr = ptr } var xDtlsServerConnectionNew func(uintptr, uintptr, **glib.Error) uintptr // Creates a new #GDtlsServerConnection wrapping @base_socket. func DtlsServerConnectionNew(BaseSocketVar DatagramBased, CertificateVar *TlsCertificate) (*DtlsServerConnectionBase, error) { var cls *DtlsServerConnectionBase var cerr *glib.Error cret := xDtlsServerConnectionNew(BaseSocketVar.GoPointer(), CertificateVar.GoPointer(), &cerr) if cret == 0 { return nil, cerr } cls = &DtlsServerConnectionBase{} cls.Ptr = cret if cerr == nil { return cls, nil } return cls, cerr } func init() { core.SetPackageName("GIO", "gio-2.0") core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GIO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xDtlsServerConnectionNew, libs, "g_dtls_server_connection_new") core.PuregoSafeRegister(&xDtlsServerConnectionGLibType, libs, "g_dtls_server_connection_get_type") }