miqt/qt6/network/gen_qocspresponse.go

128 lines
3.4 KiB
Go
Raw Normal View History

2024-11-04 09:53:04 +00:00
package network
/*
#include "gen_qocspresponse.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QOcspCertificateStatus int
const (
QOcspCertificateStatus__Good QOcspCertificateStatus = 0
QOcspCertificateStatus__Revoked QOcspCertificateStatus = 1
QOcspCertificateStatus__Unknown QOcspCertificateStatus = 2
)
type QOcspRevocationReason int
const (
QOcspRevocationReason__None QOcspRevocationReason = -1
QOcspRevocationReason__Unspecified QOcspRevocationReason = 0
QOcspRevocationReason__KeyCompromise QOcspRevocationReason = 1
QOcspRevocationReason__CACompromise QOcspRevocationReason = 2
QOcspRevocationReason__AffiliationChanged QOcspRevocationReason = 3
QOcspRevocationReason__Superseded QOcspRevocationReason = 4
QOcspRevocationReason__CessationOfOperation QOcspRevocationReason = 5
QOcspRevocationReason__CertificateHold QOcspRevocationReason = 6
QOcspRevocationReason__RemoveFromCRL QOcspRevocationReason = 7
)
type QOcspResponse struct {
2024-11-19 06:29:06 +00:00
h *C.QOcspResponse
isSubclass bool
2024-11-04 09:53:04 +00:00
}
func (this *QOcspResponse) cPointer() *C.QOcspResponse {
if this == nil {
return nil
}
return this.h
}
func (this *QOcspResponse) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQOcspResponse constructs the type using only CGO pointers.
2024-11-04 09:53:04 +00:00
func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-11-04 09:53:04 +00:00
return &QOcspResponse{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQOcspResponse constructs the type using only unsafe pointers.
2024-11-04 09:53:04 +00:00
func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse {
2024-12-07 04:15:57 +00:00
return newQOcspResponse((*C.QOcspResponse)(h))
2024-11-04 09:53:04 +00:00
}
// NewQOcspResponse constructs a new QOcspResponse object.
func NewQOcspResponse() *QOcspResponse {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOcspResponse(C.QOcspResponse_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
// NewQOcspResponse2 constructs a new QOcspResponse object.
func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOcspResponse(C.QOcspResponse_new2(other.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
func (this *QOcspResponse) OperatorAssign(other *QOcspResponse) {
C.QOcspResponse_OperatorAssign(this.h, other.cPointer())
}
func (this *QOcspResponse) CertificateStatus() QOcspCertificateStatus {
return (QOcspCertificateStatus)(C.QOcspResponse_CertificateStatus(this.h))
}
func (this *QOcspResponse) RevocationReason() QOcspRevocationReason {
return (QOcspRevocationReason)(C.QOcspResponse_RevocationReason(this.h))
}
func (this *QOcspResponse) Responder() *QSslCertificate {
_goptr := newQSslCertificate(C.QOcspResponse_Responder(this.h))
2024-11-04 09:53:04 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QOcspResponse) Subject() *QSslCertificate {
_goptr := newQSslCertificate(C.QOcspResponse_Subject(this.h))
2024-11-04 09:53:04 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QOcspResponse) Swap(other *QOcspResponse) {
C.QOcspResponse_Swap(this.h, other.cPointer())
}
// Delete this object from C++ memory.
func (this *QOcspResponse) Delete() {
2024-11-19 06:29:06 +00:00
C.QOcspResponse_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 *QOcspResponse) GoGC() {
runtime.SetFinalizer(this, func(this *QOcspResponse) {
this.Delete()
runtime.KeepAlive(this.h)
})
}