miqt/qt/network/gen_qtcpsocket.cpp

1424 lines
41 KiB
C++
Raw Normal View History

2024-11-19 19:29:06 +13:00
#include <QAbstractSocket>
#include <QChildEvent>
#include <QEvent>
2024-11-19 19:29:06 +13:00
#include <QIODevice>
#include <QMetaMethod>
2024-11-04 22:53:04 +13:00
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTcpSocket>
#include <QTimerEvent>
2024-11-19 19:29:06 +13:00
#include <QVariant>
2024-11-04 22:53:04 +13:00
#include <qtcpsocket.h>
#include "gen_qtcpsocket.h"
#ifdef __cplusplus
extern "C" {
#endif
2025-02-01 13:45:16 +13:00
void miqt_exec_callback_QTcpSocket_resume(QTcpSocket*, intptr_t);
void miqt_exec_callback_QTcpSocket_connectToHost(QTcpSocket*, intptr_t, struct miqt_string, uint16_t, int, int);
void miqt_exec_callback_QTcpSocket_disconnectFromHost(QTcpSocket*, intptr_t);
long long miqt_exec_callback_QTcpSocket_bytesAvailable(const QTcpSocket*, intptr_t);
long long miqt_exec_callback_QTcpSocket_bytesToWrite(const QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_canReadLine(const QTcpSocket*, intptr_t);
void miqt_exec_callback_QTcpSocket_setReadBufferSize(QTcpSocket*, intptr_t, long long);
intptr_t miqt_exec_callback_QTcpSocket_socketDescriptor(const QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_setSocketDescriptor(QTcpSocket*, intptr_t, intptr_t, int, int);
void miqt_exec_callback_QTcpSocket_setSocketOption(QTcpSocket*, intptr_t, int, QVariant*);
QVariant* miqt_exec_callback_QTcpSocket_socketOption(QTcpSocket*, intptr_t, int);
void miqt_exec_callback_QTcpSocket_close(QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_isSequential(const QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_atEnd(const QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_waitForConnected(QTcpSocket*, intptr_t, int);
bool miqt_exec_callback_QTcpSocket_waitForReadyRead(QTcpSocket*, intptr_t, int);
bool miqt_exec_callback_QTcpSocket_waitForBytesWritten(QTcpSocket*, intptr_t, int);
bool miqt_exec_callback_QTcpSocket_waitForDisconnected(QTcpSocket*, intptr_t, int);
long long miqt_exec_callback_QTcpSocket_readData(QTcpSocket*, intptr_t, char*, long long);
long long miqt_exec_callback_QTcpSocket_readLineData(QTcpSocket*, intptr_t, char*, long long);
long long miqt_exec_callback_QTcpSocket_writeData(QTcpSocket*, intptr_t, const char*, long long);
bool miqt_exec_callback_QTcpSocket_open(QTcpSocket*, intptr_t, int);
long long miqt_exec_callback_QTcpSocket_pos(const QTcpSocket*, intptr_t);
long long miqt_exec_callback_QTcpSocket_size(const QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_seek(QTcpSocket*, intptr_t, long long);
bool miqt_exec_callback_QTcpSocket_reset(QTcpSocket*, intptr_t);
bool miqt_exec_callback_QTcpSocket_event(QTcpSocket*, intptr_t, QEvent*);
bool miqt_exec_callback_QTcpSocket_eventFilter(QTcpSocket*, intptr_t, QObject*, QEvent*);
void miqt_exec_callback_QTcpSocket_timerEvent(QTcpSocket*, intptr_t, QTimerEvent*);
void miqt_exec_callback_QTcpSocket_childEvent(QTcpSocket*, intptr_t, QChildEvent*);
void miqt_exec_callback_QTcpSocket_customEvent(QTcpSocket*, intptr_t, QEvent*);
void miqt_exec_callback_QTcpSocket_connectNotify(QTcpSocket*, intptr_t, QMetaMethod*);
void miqt_exec_callback_QTcpSocket_disconnectNotify(QTcpSocket*, intptr_t, QMetaMethod*);
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-04 22:53:04 +13:00
class MiqtVirtualQTcpSocket final : public QTcpSocket {
2024-11-19 19:29:06 +13:00
public:
MiqtVirtualQTcpSocket(): QTcpSocket() {};
MiqtVirtualQTcpSocket(QObject* parent): QTcpSocket(parent) {};
virtual ~MiqtVirtualQTcpSocket() override = default;
2024-11-19 19:29:06 +13:00
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__resume = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void resume() override {
2025-02-01 13:45:16 +13:00
if (handle__resume == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::resume();
return;
}
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_resume(this, handle__resume);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_resume() {
2024-11-19 19:29:06 +13:00
QTcpSocket::resume();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__connectToHost = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void connectToHost(const QString& hostName, quint16 port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override {
2025-02-01 13:45:16 +13:00
if (handle__connectToHost == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::connectToHost(hostName, port, mode, protocol);
return;
}
const QString hostName_ret = hostName;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray hostName_b = hostName_ret.toUtf8();
struct miqt_string hostName_ms;
hostName_ms.len = hostName_b.length();
hostName_ms.data = static_cast<char*>(malloc(hostName_ms.len));
memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len);
struct miqt_string sigval1 = hostName_ms;
quint16 port_ret = port;
uint16_t sigval2 = static_cast<uint16_t>(port_ret);
QIODevice::OpenMode mode_ret = mode;
int sigval3 = static_cast<int>(mode_ret);
QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol;
int sigval4 = static_cast<int>(protocol_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_connectToHost(this, handle__connectToHost, sigval1, sigval2, sigval3, sigval4);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_connectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) {
2024-11-19 19:29:06 +13:00
QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len);
QTcpSocket::connectToHost(hostName_QString, static_cast<quint16>(port), static_cast<QIODevice::OpenMode>(mode), static_cast<QAbstractSocket::NetworkLayerProtocol>(protocol));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__disconnectFromHost = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void disconnectFromHost() override {
2025-02-01 13:45:16 +13:00
if (handle__disconnectFromHost == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::disconnectFromHost();
return;
}
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_disconnectFromHost(this, handle__disconnectFromHost);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_disconnectFromHost() {
2024-11-19 19:29:06 +13:00
QTcpSocket::disconnectFromHost();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__bytesAvailable = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual qint64 bytesAvailable() const override {
2025-02-01 13:45:16 +13:00
if (handle__bytesAvailable == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::bytesAvailable();
}
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_bytesAvailable(this, handle__bytesAvailable);
2024-11-19 19:29:06 +13:00
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_bytesAvailable() const {
2024-11-19 19:29:06 +13:00
qint64 _ret = QTcpSocket::bytesAvailable();
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__bytesToWrite = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual qint64 bytesToWrite() const override {
2025-02-01 13:45:16 +13:00
if (handle__bytesToWrite == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::bytesToWrite();
}
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_bytesToWrite(this, handle__bytesToWrite);
2024-11-19 19:29:06 +13:00
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_bytesToWrite() const {
2024-11-19 19:29:06 +13:00
qint64 _ret = QTcpSocket::bytesToWrite();
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__canReadLine = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool canReadLine() const override {
2025-02-01 13:45:16 +13:00
if (handle__canReadLine == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::canReadLine();
}
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_canReadLine(this, handle__canReadLine);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_canReadLine() const {
2024-11-19 19:29:06 +13:00
return QTcpSocket::canReadLine();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__setReadBufferSize = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void setReadBufferSize(qint64 size) override {
2025-02-01 13:45:16 +13:00
if (handle__setReadBufferSize == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::setReadBufferSize(size);
return;
}
qint64 size_ret = size;
long long sigval1 = static_cast<long long>(size_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_setReadBufferSize(this, handle__setReadBufferSize, sigval1);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_setReadBufferSize(long long size) {
2024-11-19 19:29:06 +13:00
QTcpSocket::setReadBufferSize(static_cast<qint64>(size));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__socketDescriptor = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual qintptr socketDescriptor() const override {
2025-02-01 13:45:16 +13:00
if (handle__socketDescriptor == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::socketDescriptor();
}
2025-02-01 13:45:16 +13:00
intptr_t callback_return_value = miqt_exec_callback_QTcpSocket_socketDescriptor(this, handle__socketDescriptor);
2024-11-19 19:29:06 +13:00
return (qintptr)(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
intptr_t virtualbase_socketDescriptor() const {
2024-11-19 19:29:06 +13:00
qintptr _ret = QTcpSocket::socketDescriptor();
return (intptr_t)(_ret);
2024-11-19 19:29:06 +13:00
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__setSocketDescriptor = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) override {
2025-02-01 13:45:16 +13:00
if (handle__setSocketDescriptor == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::setSocketDescriptor(socketDescriptor, state, openMode);
}
qintptr socketDescriptor_ret = socketDescriptor;
intptr_t sigval1 = (intptr_t)(socketDescriptor_ret);
2024-11-19 19:29:06 +13:00
QAbstractSocket::SocketState state_ret = state;
int sigval2 = static_cast<int>(state_ret);
QIODevice::OpenMode openMode_ret = openMode;
int sigval3 = static_cast<int>(openMode_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_setSocketDescriptor(this, handle__setSocketDescriptor, sigval1, sigval2, sigval3);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_setSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast<QAbstractSocket::SocketState>(state), static_cast<QIODevice::OpenMode>(openMode));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__setSocketOption = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override {
2025-02-01 13:45:16 +13:00
if (handle__setSocketOption == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::setSocketOption(option, value);
return;
}
QAbstractSocket::SocketOption option_ret = option;
int sigval1 = static_cast<int>(option_ret);
const QVariant& value_ret = value;
// Cast returned reference into pointer
QVariant* sigval2 = const_cast<QVariant*>(&value_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_setSocketOption(this, handle__setSocketOption, sigval1, sigval2);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_setSocketOption(int option, QVariant* value) {
2024-11-19 19:29:06 +13:00
QTcpSocket::setSocketOption(static_cast<QAbstractSocket::SocketOption>(option), *value);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__socketOption = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual QVariant socketOption(QAbstractSocket::SocketOption option) override {
2025-02-01 13:45:16 +13:00
if (handle__socketOption == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::socketOption(option);
}
QAbstractSocket::SocketOption option_ret = option;
int sigval1 = static_cast<int>(option_ret);
2025-02-01 13:45:16 +13:00
QVariant* callback_return_value = miqt_exec_callback_QTcpSocket_socketOption(this, handle__socketOption, sigval1);
2024-11-19 19:29:06 +13:00
return *callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
QVariant* virtualbase_socketOption(int option) {
2024-11-19 19:29:06 +13:00
return new QVariant(QTcpSocket::socketOption(static_cast<QAbstractSocket::SocketOption>(option)));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__close = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual void close() override {
2025-02-01 13:45:16 +13:00
if (handle__close == 0) {
2024-11-19 19:29:06 +13:00
QTcpSocket::close();
return;
}
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_close(this, handle__close);
2024-11-19 19:29:06 +13:00
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_close() {
2024-11-19 19:29:06 +13:00
QTcpSocket::close();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__isSequential = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool isSequential() const override {
2025-02-01 13:45:16 +13:00
if (handle__isSequential == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::isSequential();
}
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_isSequential(this, handle__isSequential);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_isSequential() const {
2024-11-19 19:29:06 +13:00
return QTcpSocket::isSequential();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__atEnd = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool atEnd() const override {
2025-02-01 13:45:16 +13:00
if (handle__atEnd == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::atEnd();
}
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_atEnd(this, handle__atEnd);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_atEnd() const {
2024-11-19 19:29:06 +13:00
return QTcpSocket::atEnd();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__waitForConnected = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool waitForConnected(int msecs) override {
2025-02-01 13:45:16 +13:00
if (handle__waitForConnected == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForConnected(msecs);
}
int sigval1 = msecs;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_waitForConnected(this, handle__waitForConnected, sigval1);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_waitForConnected(int msecs) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForConnected(static_cast<int>(msecs));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__waitForReadyRead = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool waitForReadyRead(int msecs) override {
2025-02-01 13:45:16 +13:00
if (handle__waitForReadyRead == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForReadyRead(msecs);
}
int sigval1 = msecs;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_waitForReadyRead(this, handle__waitForReadyRead, sigval1);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_waitForReadyRead(int msecs) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForReadyRead(static_cast<int>(msecs));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__waitForBytesWritten = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool waitForBytesWritten(int msecs) override {
2025-02-01 13:45:16 +13:00
if (handle__waitForBytesWritten == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForBytesWritten(msecs);
}
int sigval1 = msecs;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_waitForBytesWritten(this, handle__waitForBytesWritten, sigval1);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_waitForBytesWritten(int msecs) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForBytesWritten(static_cast<int>(msecs));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__waitForDisconnected = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual bool waitForDisconnected(int msecs) override {
2025-02-01 13:45:16 +13:00
if (handle__waitForDisconnected == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForDisconnected(msecs);
}
int sigval1 = msecs;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_waitForDisconnected(this, handle__waitForDisconnected, sigval1);
2024-11-19 19:29:06 +13:00
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_waitForDisconnected(int msecs) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::waitForDisconnected(static_cast<int>(msecs));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__readData = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual qint64 readData(char* data, qint64 maxlen) override {
2025-02-01 13:45:16 +13:00
if (handle__readData == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::readData(data, maxlen);
}
char* sigval1 = data;
qint64 maxlen_ret = maxlen;
long long sigval2 = static_cast<long long>(maxlen_ret);
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_readData(this, handle__readData, sigval1, sigval2);
2024-11-19 19:29:06 +13:00
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_readData(char* data, long long maxlen) {
2024-11-19 19:29:06 +13:00
qint64 _ret = QTcpSocket::readData(data, static_cast<qint64>(maxlen));
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__readLineData = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
virtual qint64 readLineData(char* data, qint64 maxlen) override {
2025-02-01 13:45:16 +13:00
if (handle__readLineData == 0) {
2024-11-19 19:29:06 +13:00
return QTcpSocket::readLineData(data, maxlen);
}
char* sigval1 = data;
qint64 maxlen_ret = maxlen;
long long sigval2 = static_cast<long long>(maxlen_ret);
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_readLineData(this, handle__readLineData, sigval1, sigval2);
2024-11-19 19:29:06 +13:00
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_readLineData(char* data, long long maxlen) {
2024-11-19 19:29:06 +13:00
qint64 _ret = QTcpSocket::readLineData(data, static_cast<qint64>(maxlen));
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__writeData = 0;
2024-11-19 19:29:06 +13:00
// Subclass to allow providing a Go implementation
2025-02-01 13:45:16 +13:00
virtual qint64 writeData(const char* data, qint64 len) override {
if (handle__writeData == 0) {
return QTcpSocket::writeData(data, len);
2024-11-19 19:29:06 +13:00
}
const char* sigval1 = (const char*) data;
2025-02-01 13:45:16 +13:00
qint64 len_ret = len;
long long sigval2 = static_cast<long long>(len_ret);
2024-11-19 19:29:06 +13:00
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_writeData(this, handle__writeData, sigval1, sigval2);
2024-11-19 19:29:06 +13:00
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_writeData(const char* data, long long len) {
2024-11-19 19:29:06 +13:00
2025-02-01 13:45:16 +13:00
qint64 _ret = QTcpSocket::writeData(data, static_cast<qint64>(len));
2024-11-19 19:29:06 +13:00
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__open = 0;
// Subclass to allow providing a Go implementation
virtual bool open(QIODevice::OpenMode mode) override {
2025-02-01 13:45:16 +13:00
if (handle__open == 0) {
return QTcpSocket::open(mode);
}
QIODevice::OpenMode mode_ret = mode;
int sigval1 = static_cast<int>(mode_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_open(this, handle__open, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_open(int mode) {
return QTcpSocket::open(static_cast<QIODevice::OpenMode>(mode));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__pos = 0;
// Subclass to allow providing a Go implementation
virtual qint64 pos() const override {
2025-02-01 13:45:16 +13:00
if (handle__pos == 0) {
return QTcpSocket::pos();
}
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_pos(this, handle__pos);
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_pos() const {
qint64 _ret = QTcpSocket::pos();
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__size = 0;
// Subclass to allow providing a Go implementation
virtual qint64 size() const override {
2025-02-01 13:45:16 +13:00
if (handle__size == 0) {
return QTcpSocket::size();
}
2025-02-01 13:45:16 +13:00
long long callback_return_value = miqt_exec_callback_QTcpSocket_size(this, handle__size);
return static_cast<qint64>(callback_return_value);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
long long virtualbase_size() const {
qint64 _ret = QTcpSocket::size();
return static_cast<long long>(_ret);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__seek = 0;
// Subclass to allow providing a Go implementation
virtual bool seek(qint64 pos) override {
2025-02-01 13:45:16 +13:00
if (handle__seek == 0) {
return QTcpSocket::seek(pos);
}
qint64 pos_ret = pos;
long long sigval1 = static_cast<long long>(pos_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_seek(this, handle__seek, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_seek(long long pos) {
return QTcpSocket::seek(static_cast<qint64>(pos));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__reset = 0;
// Subclass to allow providing a Go implementation
virtual bool reset() override {
2025-02-01 13:45:16 +13:00
if (handle__reset == 0) {
return QTcpSocket::reset();
}
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_reset(this, handle__reset);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_reset() {
return QTcpSocket::reset();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__event = 0;
// Subclass to allow providing a Go implementation
virtual bool event(QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__event == 0) {
return QTcpSocket::event(event);
}
QEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_event(this, handle__event, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_event(QEvent* event) {
return QTcpSocket::event(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__eventFilter = 0;
// Subclass to allow providing a Go implementation
virtual bool eventFilter(QObject* watched, QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__eventFilter == 0) {
return QTcpSocket::eventFilter(watched, event);
}
QObject* sigval1 = watched;
QEvent* sigval2 = event;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QTcpSocket_eventFilter(this, handle__eventFilter, sigval1, sigval2);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_eventFilter(QObject* watched, QEvent* event) {
return QTcpSocket::eventFilter(watched, event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__timerEvent = 0;
// Subclass to allow providing a Go implementation
virtual void timerEvent(QTimerEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__timerEvent == 0) {
QTcpSocket::timerEvent(event);
return;
}
QTimerEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_timerEvent(this, handle__timerEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_timerEvent(QTimerEvent* event) {
QTcpSocket::timerEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__childEvent = 0;
// Subclass to allow providing a Go implementation
virtual void childEvent(QChildEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__childEvent == 0) {
QTcpSocket::childEvent(event);
return;
}
QChildEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_childEvent(this, handle__childEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_childEvent(QChildEvent* event) {
QTcpSocket::childEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__customEvent = 0;
// Subclass to allow providing a Go implementation
virtual void customEvent(QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__customEvent == 0) {
QTcpSocket::customEvent(event);
return;
}
QEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_customEvent(this, handle__customEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_customEvent(QEvent* event) {
QTcpSocket::customEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__connectNotify = 0;
// Subclass to allow providing a Go implementation
virtual void connectNotify(const QMetaMethod& signal) override {
2025-02-01 13:45:16 +13:00
if (handle__connectNotify == 0) {
QTcpSocket::connectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_connectNotify(this, handle__connectNotify, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_connectNotify(QMetaMethod* signal) {
QTcpSocket::connectNotify(*signal);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__disconnectNotify = 0;
// Subclass to allow providing a Go implementation
virtual void disconnectNotify(const QMetaMethod& signal) override {
2025-02-01 13:45:16 +13:00
if (handle__disconnectNotify == 0) {
QTcpSocket::disconnectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QTcpSocket_disconnectNotify(this, handle__disconnectNotify, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_disconnectNotify(QMetaMethod* signal) {
QTcpSocket::disconnectNotify(*signal);
}
2024-11-19 19:29:06 +13:00
};
2024-12-07 17:15:57 +13:00
QTcpSocket* QTcpSocket_new() {
return new MiqtVirtualQTcpSocket();
2024-11-04 22:53:04 +13:00
}
2024-12-07 17:15:57 +13:00
QTcpSocket* QTcpSocket_new2(QObject* parent) {
return new MiqtVirtualQTcpSocket(parent);
}
void QTcpSocket_virtbase(QTcpSocket* src, QAbstractSocket** outptr_QAbstractSocket) {
*outptr_QAbstractSocket = static_cast<QAbstractSocket*>(src);
2024-11-04 22:53:04 +13:00
}
2025-02-01 13:45:16 +13:00
QMetaObject* QTcpSocket_metaObject(const QTcpSocket* self) {
2024-11-04 22:53:04 +13:00
return (QMetaObject*) self->metaObject();
}
2025-02-01 13:45:16 +13:00
void* QTcpSocket_metacast(QTcpSocket* self, const char* param1) {
2024-11-04 22:53:04 +13:00
return self->qt_metacast(param1);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_tr(const char* s) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::tr(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_trUtf8(const char* s) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::trUtf8(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_tr2(const char* s, const char* c) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::tr(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_tr3(const char* s, const char* c, int n) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::tr(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_trUtf82(const char* s, const char* c) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::trUtf8(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QTcpSocket_trUtf83(const char* s, const char* c, int n) {
2024-11-04 22:53:04 +13:00
QString _ret = QTcpSocket::trUtf8(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_resume(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__resume = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_resume(void* self) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_resume();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_connectToHost(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__connectToHost = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_connectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_connectToHost(hostName, port, mode, protocol);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_disconnectFromHost(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__disconnectFromHost = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_disconnectFromHost(void* self) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_disconnectFromHost();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_bytesAvailable(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__bytesAvailable = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_bytesAvailable(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_bytesAvailable();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_bytesToWrite(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__bytesToWrite = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_bytesToWrite(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_bytesToWrite();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_canReadLine(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__canReadLine = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_canReadLine(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_canReadLine();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_setReadBufferSize(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__setReadBufferSize = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_setReadBufferSize(void* self, long long size) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_setReadBufferSize(size);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_socketDescriptor(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__socketDescriptor = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
intptr_t QTcpSocket_virtualbase_socketDescriptor(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_socketDescriptor();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_setSocketDescriptor(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__setSocketDescriptor = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_setSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_setSocketDescriptor(socketDescriptor, state, openMode);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_setSocketOption(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__setSocketOption = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_setSocketOption(void* self, int option, QVariant* value) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_setSocketOption(option, value);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_socketOption(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__socketOption = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
QVariant* QTcpSocket_virtualbase_socketOption(void* self, int option) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_socketOption(option);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_close(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__close = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_close(void* self) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_close();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_isSequential(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__isSequential = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_isSequential(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_isSequential();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_atEnd(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__atEnd = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_atEnd(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_atEnd();
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_waitForConnected(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__waitForConnected = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_waitForConnected(void* self, int msecs) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_waitForConnected(msecs);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_waitForReadyRead(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__waitForReadyRead = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_waitForReadyRead(void* self, int msecs) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_waitForReadyRead(msecs);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_waitForBytesWritten(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__waitForBytesWritten = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_waitForBytesWritten(void* self, int msecs) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_waitForBytesWritten(msecs);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_waitForDisconnected(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__waitForDisconnected = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_waitForDisconnected(void* self, int msecs) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_waitForDisconnected(msecs);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_readData(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__readData = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_readData(void* self, char* data, long long maxlen) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_readData(data, maxlen);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_readLineData(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__readLineData = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_readLineData(void* self, char* data, long long maxlen) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_readLineData(data, maxlen);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_writeData(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__writeData = slot;
return true;
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_writeData(void* self, const char* data, long long len) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_writeData(data, len);
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_open(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__open = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_open(void* self, int mode) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_open(mode);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_pos(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__pos = slot;
return true;
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_pos(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_pos();
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_size(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__size = slot;
return true;
}
2025-02-01 13:45:16 +13:00
long long QTcpSocket_virtualbase_size(const void* self) {
return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_size();
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_seek(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__seek = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_seek(void* self, long long pos) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_seek(pos);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_reset(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__reset = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_reset(void* self) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_reset();
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_event(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__event = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_event(void* self, QEvent* event) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_event(event);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_eventFilter(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__eventFilter = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) {
return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_eventFilter(watched, event);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_timerEvent(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__timerEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_timerEvent(void* self, QTimerEvent* event) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_timerEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_childEvent(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__childEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_childEvent(void* self, QChildEvent* event) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_childEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_customEvent(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__customEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_customEvent(void* self, QEvent* event) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_customEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_connectNotify(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__connectNotify = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_connectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_connectNotify(signal);
}
2025-02-01 13:45:16 +13:00
bool QTcpSocket_override_virtual_disconnectNotify(void* self, intptr_t slot) {
MiqtVirtualQTcpSocket* self_cast = dynamic_cast<MiqtVirtualQTcpSocket*>( (QTcpSocket*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__disconnectNotify = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_disconnectNotify(signal);
}
2025-02-01 13:45:16 +13:00
void QTcpSocket_delete(QTcpSocket* self) {
delete self;
2024-11-04 22:53:04 +13:00
}