2024-11-04 09:53:04 +00:00
|
|
|
package network
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qsslellipticcurve.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QSslEllipticCurve struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QSslEllipticCurve
|
|
|
|
isSubclass bool
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) cPointer() *C.QSslEllipticCurve {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQSslEllipticCurve constructs the type using only CGO pointers.
|
2024-11-04 09:53:04 +00:00
|
|
|
func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QSslEllipticCurve{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQSslEllipticCurve constructs the type using only unsafe pointers.
|
2024-11-04 09:53:04 +00:00
|
|
|
func UnsafeNewQSslEllipticCurve(h unsafe.Pointer) *QSslEllipticCurve {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QSslEllipticCurve{h: (*C.QSslEllipticCurve)(h)}
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSslEllipticCurve constructs a new QSslEllipticCurve object.
|
|
|
|
func NewQSslEllipticCurve() *QSslEllipticCurve {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil
|
|
|
|
|
|
|
|
C.QSslEllipticCurve_new(&outptr_QSslEllipticCurve)
|
|
|
|
ret := newQSslEllipticCurve(outptr_QSslEllipticCurve)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSslEllipticCurve2 constructs a new QSslEllipticCurve object.
|
|
|
|
func NewQSslEllipticCurve2(param1 *QSslEllipticCurve) *QSslEllipticCurve {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil
|
|
|
|
|
|
|
|
C.QSslEllipticCurve_new2(param1.cPointer(), &outptr_QSslEllipticCurve)
|
|
|
|
ret := newQSslEllipticCurve(outptr_QSslEllipticCurve)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QSslEllipticCurve_FromShortName(name string) *QSslEllipticCurve {
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
_ret := C.QSslEllipticCurve_FromShortName(name_ms)
|
|
|
|
_goptr := newQSslEllipticCurve(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
func QSslEllipticCurve_FromLongName(name string) *QSslEllipticCurve {
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
_ret := C.QSslEllipticCurve_FromLongName(name_ms)
|
|
|
|
_goptr := newQSslEllipticCurve(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) ShortName() string {
|
|
|
|
var _ms C.struct_miqt_string = C.QSslEllipticCurve_ShortName(this.h)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) LongName() string {
|
|
|
|
var _ms C.struct_miqt_string = C.QSslEllipticCurve_LongName(this.h)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) IsValid() bool {
|
|
|
|
return (bool)(C.QSslEllipticCurve_IsValid(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSslEllipticCurve) IsTlsNamedCurve() bool {
|
|
|
|
return (bool)(C.QSslEllipticCurve_IsTlsNamedCurve(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QSslEllipticCurve) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QSslEllipticCurve_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 *QSslEllipticCurve) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QSslEllipticCurve) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|