miqt/qt6/network/gen_qsslcertificateextension.go

123 lines
3.5 KiB
Go
Raw Normal View History

2024-11-04 09:53:04 +00:00
package network
/*
#include "gen_qsslcertificateextension.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt6"
"runtime"
"unsafe"
)
type QSslCertificateExtension struct {
2024-11-19 06:29:06 +00:00
h *C.QSslCertificateExtension
isSubclass bool
2024-11-04 09:53:04 +00:00
}
func (this *QSslCertificateExtension) cPointer() *C.QSslCertificateExtension {
if this == nil {
return nil
}
return this.h
}
func (this *QSslCertificateExtension) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQSslCertificateExtension constructs the type using only CGO pointers.
2024-11-04 09:53:04 +00:00
func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificateExtension {
if h == nil {
return nil
}
return &QSslCertificateExtension{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQSslCertificateExtension constructs the type using only unsafe pointers.
2024-11-04 09:53:04 +00:00
func UnsafeNewQSslCertificateExtension(h unsafe.Pointer) *QSslCertificateExtension {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QSslCertificateExtension{h: (*C.QSslCertificateExtension)(h)}
2024-11-04 09:53:04 +00:00
}
// NewQSslCertificateExtension constructs a new QSslCertificateExtension object.
func NewQSslCertificateExtension() *QSslCertificateExtension {
2024-11-19 06:29:06 +00:00
var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil
C.QSslCertificateExtension_new(&outptr_QSslCertificateExtension)
ret := newQSslCertificateExtension(outptr_QSslCertificateExtension)
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
// NewQSslCertificateExtension2 constructs a new QSslCertificateExtension object.
func NewQSslCertificateExtension2(other *QSslCertificateExtension) *QSslCertificateExtension {
2024-11-19 06:29:06 +00:00
var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil
C.QSslCertificateExtension_new2(other.cPointer(), &outptr_QSslCertificateExtension)
ret := newQSslCertificateExtension(outptr_QSslCertificateExtension)
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
func (this *QSslCertificateExtension) OperatorAssign(other *QSslCertificateExtension) {
C.QSslCertificateExtension_OperatorAssign(this.h, other.cPointer())
}
func (this *QSslCertificateExtension) Swap(other *QSslCertificateExtension) {
C.QSslCertificateExtension_Swap(this.h, other.cPointer())
}
func (this *QSslCertificateExtension) Oid() string {
var _ms C.struct_miqt_string = C.QSslCertificateExtension_Oid(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QSslCertificateExtension) Name() string {
var _ms C.struct_miqt_string = C.QSslCertificateExtension_Name(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QSslCertificateExtension) Value() *qt6.QVariant {
_ret := C.QSslCertificateExtension_Value(this.h)
_goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret))
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QSslCertificateExtension) IsCritical() bool {
return (bool)(C.QSslCertificateExtension_IsCritical(this.h))
}
func (this *QSslCertificateExtension) IsSupported() bool {
return (bool)(C.QSslCertificateExtension_IsSupported(this.h))
}
// Delete this object from C++ memory.
func (this *QSslCertificateExtension) Delete() {
2024-11-19 06:29:06 +00:00
C.QSslCertificateExtension_Delete(this.h, C.bool(this.isSubclass))
2024-11-04 09:53:04 +00:00
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QSslCertificateExtension) GoGC() {
runtime.SetFinalizer(this, func(this *QSslCertificateExtension) {
this.Delete()
runtime.KeepAlive(this.h)
})
}