miqt/qt/network/gen_qhttp2configuration.go

133 lines
3.7 KiB
Go
Raw Normal View History

2024-11-04 09:53:04 +00:00
package network
/*
#include "gen_qhttp2configuration.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QHttp2Configuration struct {
2024-11-19 06:29:06 +00:00
h *C.QHttp2Configuration
isSubclass bool
2024-11-04 09:53:04 +00:00
}
func (this *QHttp2Configuration) cPointer() *C.QHttp2Configuration {
if this == nil {
return nil
}
return this.h
}
func (this *QHttp2Configuration) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQHttp2Configuration constructs the type using only CGO pointers.
2024-11-04 09:53:04 +00:00
func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration {
if h == nil {
return nil
}
return &QHttp2Configuration{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQHttp2Configuration constructs the type using only unsafe pointers.
2024-11-04 09:53:04 +00:00
func UnsafeNewQHttp2Configuration(h unsafe.Pointer) *QHttp2Configuration {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QHttp2Configuration{h: (*C.QHttp2Configuration)(h)}
2024-11-04 09:53:04 +00:00
}
// NewQHttp2Configuration constructs a new QHttp2Configuration object.
func NewQHttp2Configuration() *QHttp2Configuration {
2024-11-19 06:29:06 +00:00
var outptr_QHttp2Configuration *C.QHttp2Configuration = nil
C.QHttp2Configuration_new(&outptr_QHttp2Configuration)
ret := newQHttp2Configuration(outptr_QHttp2Configuration)
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
// NewQHttp2Configuration2 constructs a new QHttp2Configuration object.
func NewQHttp2Configuration2(other *QHttp2Configuration) *QHttp2Configuration {
2024-11-19 06:29:06 +00:00
var outptr_QHttp2Configuration *C.QHttp2Configuration = nil
C.QHttp2Configuration_new2(other.cPointer(), &outptr_QHttp2Configuration)
ret := newQHttp2Configuration(outptr_QHttp2Configuration)
ret.isSubclass = true
return ret
2024-11-04 09:53:04 +00:00
}
func (this *QHttp2Configuration) OperatorAssign(other *QHttp2Configuration) {
C.QHttp2Configuration_OperatorAssign(this.h, other.cPointer())
}
func (this *QHttp2Configuration) SetServerPushEnabled(enable bool) {
C.QHttp2Configuration_SetServerPushEnabled(this.h, (C.bool)(enable))
}
func (this *QHttp2Configuration) ServerPushEnabled() bool {
return (bool)(C.QHttp2Configuration_ServerPushEnabled(this.h))
}
func (this *QHttp2Configuration) SetHuffmanCompressionEnabled(enable bool) {
C.QHttp2Configuration_SetHuffmanCompressionEnabled(this.h, (C.bool)(enable))
}
func (this *QHttp2Configuration) HuffmanCompressionEnabled() bool {
return (bool)(C.QHttp2Configuration_HuffmanCompressionEnabled(this.h))
}
func (this *QHttp2Configuration) SetSessionReceiveWindowSize(size uint) bool {
return (bool)(C.QHttp2Configuration_SetSessionReceiveWindowSize(this.h, (C.uint)(size)))
}
func (this *QHttp2Configuration) SessionReceiveWindowSize() uint {
return (uint)(C.QHttp2Configuration_SessionReceiveWindowSize(this.h))
}
func (this *QHttp2Configuration) SetStreamReceiveWindowSize(size uint) bool {
return (bool)(C.QHttp2Configuration_SetStreamReceiveWindowSize(this.h, (C.uint)(size)))
}
func (this *QHttp2Configuration) StreamReceiveWindowSize() uint {
return (uint)(C.QHttp2Configuration_StreamReceiveWindowSize(this.h))
}
func (this *QHttp2Configuration) SetMaxFrameSize(size uint) bool {
return (bool)(C.QHttp2Configuration_SetMaxFrameSize(this.h, (C.uint)(size)))
}
func (this *QHttp2Configuration) MaxFrameSize() uint {
return (uint)(C.QHttp2Configuration_MaxFrameSize(this.h))
}
func (this *QHttp2Configuration) Swap(other *QHttp2Configuration) {
C.QHttp2Configuration_Swap(this.h, other.cPointer())
}
// Delete this object from C++ memory.
func (this *QHttp2Configuration) Delete() {
2024-11-19 06:29:06 +00:00
C.QHttp2Configuration_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 *QHttp2Configuration) GoGC() {
runtime.SetFinalizer(this, func(this *QHttp2Configuration) {
this.Delete()
runtime.KeepAlive(this.h)
})
}