// 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 #GTlsServerConnection implementation. type TlsServerConnectionInterface struct { _ structs.HostLayout GIface uintptr } func (x *TlsServerConnectionInterface) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // `GTlsServerConnection` is the server-side subclass of // [class@Gio.TlsConnection], representing a server-side TLS connection. type TlsServerConnection interface { GoPointer() uintptr SetGoPointer(uintptr) } var xTlsServerConnectionGLibType func() types.GType func TlsServerConnectionGLibType() types.GType { return xTlsServerConnectionGLibType() } type TlsServerConnectionBase struct { Ptr uintptr } func (x *TlsServerConnectionBase) GoPointer() uintptr { if x == nil { return 0 } return x.Ptr } func (x *TlsServerConnectionBase) SetGoPointer(ptr uintptr) { x.Ptr = ptr } var xTlsServerConnectionNew func(uintptr, uintptr, **glib.Error) uintptr // Creates a new #GTlsServerConnection wrapping @base_io_stream (which // must have pollable input and output streams). // // See the documentation for #GTlsConnection:base-io-stream for restrictions // on when application code can run operations on the @base_io_stream after // this function has returned. func TlsServerConnectionNew(BaseIoStreamVar *IOStream, CertificateVar *TlsCertificate) (*TlsServerConnectionBase, error) { var cls *TlsServerConnectionBase var cerr *glib.Error cret := xTlsServerConnectionNew(BaseIoStreamVar.GoPointer(), CertificateVar.GoPointer(), &cerr) if cret == 0 { return nil, cerr } cls = &TlsServerConnectionBase{} 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(&xTlsServerConnectionNew, libs, "g_tls_server_connection_new") core.PuregoSafeRegister(&xTlsServerConnectionGLibType, libs, "g_tls_server_connection_get_type") }