PythonQtWrapper_QAbstractSocket.cpp
681 lines
| 24.5 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QAbstractSocket.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractsocket.h> | ||||
#include <qauthenticator.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qhostaddress.h> | ||||
#include <qlist.h> | ||||
#include <qnetworkproxy.h> | ||||
#include <qobject.h> | ||||
florianlink
|
r24 | bool PythonQtShell_QAbstractSocket::atEnd() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "atEnd"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"atEnd(QAbstractSocket*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::atEnd(); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::bytesAvailable() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesAvailable"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"bytesAvailable(QAbstractSocket*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::bytesAvailable(); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::bytesToWrite() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesToWrite"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"bytesToWrite(QAbstractSocket*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::bytesToWrite(); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::canReadLine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "canReadLine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"canReadLine(QAbstractSocket*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::canReadLine(); | ||||
} | ||||
void PythonQtShell_QAbstractSocket::childEvent(QChildEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"childEvent(QAbstractSocket*,QChildEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QAbstractSocket::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QAbstractSocket::close() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "close"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"close(QAbstractSocket*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QAbstractSocket::close(); | ||||
} | ||||
void PythonQtShell_QAbstractSocket::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"customEvent(QAbstractSocket*,QEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QAbstractSocket::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"event(QAbstractSocket*,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"eventFilter(QAbstractSocket*,QObject* ,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::eventFilter(arg__1, arg__2); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::isSequential() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isSequential"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"isSequential(QAbstractSocket*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::isSequential(); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::open(QIODevice::OpenMode mode) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "open"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"open(QAbstractSocket*,QIODevice::OpenMode )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&mode}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::open(mode); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::pos() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "pos"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"pos(QAbstractSocket*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::pos(); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::readData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"readData(QAbstractSocket*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::readData(data, maxlen); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::readLineData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readLineData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"readLineData(QAbstractSocket*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::readLineData(data, maxlen); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"reset(QAbstractSocket*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::reset(); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::seek(qint64 pos) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "seek"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"seek(QAbstractSocket*,qint64 )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&pos}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::seek(pos); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::size() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "size"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"size(QAbstractSocket*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::size(); | ||||
} | ||||
void PythonQtShell_QAbstractSocket::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"timerEvent(QAbstractSocket*,QTimerEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QAbstractSocket::timerEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::waitForBytesWritten(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForBytesWritten"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"waitForBytesWritten(QAbstractSocket*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::waitForBytesWritten(msecs); | ||||
} | ||||
bool PythonQtShell_QAbstractSocket::waitForReadyRead(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForReadyRead"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"waitForReadyRead(QAbstractSocket*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::waitForReadyRead(msecs); | ||||
} | ||||
qint64 PythonQtShell_QAbstractSocket::writeData(const char* data, qint64 len) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "writeData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QAbstractSocket::staticMetaObject, | ||||
"writeData(QAbstractSocket*,const char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&len}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QAbstractSocket::writeData(data, len); | ||||
} | ||||
florianlink
|
r13 | QAbstractSocket* PythonQtWrapper_QAbstractSocket::new_QAbstractSocket(QAbstractSocket::SocketType socketType, QObject* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QAbstractSocket(socketType, parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | int PythonQtWrapper_QAbstractSocket::socketDescriptor(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->socketDescriptor(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QAbstractSocket::SocketError PythonQtWrapper_QAbstractSocket::error(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->error(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::readLineData(QAbstractSocket* theWrappedObject, char* data, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_readLineData(data, maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QAbstractSocket::peerName(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->peerName(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | unsigned short PythonQtWrapper_QAbstractSocket::peerPort(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->peerPort(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::readBufferSize(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readBufferSize(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::bytesAvailable(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_bytesAvailable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::disconnectFromHost(QAbstractSocket* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->disconnectFromHost(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::waitForDisconnected(QAbstractSocket* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->waitForDisconnected(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::connectToHost(QAbstractSocket* theWrappedObject, const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->connectToHost(address, port, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::waitForReadyRead(QAbstractSocket* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_waitForReadyRead(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::bytesToWrite(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_bytesToWrite(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::isValid(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isValid(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::connectToHost(QAbstractSocket* theWrappedObject, const QString& hostName, unsigned short port, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->connectToHost(hostName, port, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::abort(QAbstractSocket* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->abort(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | unsigned short PythonQtWrapper_QAbstractSocket::localPort(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->localPort(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::atEnd(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_atEnd(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::waitForConnected(QAbstractSocket* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->waitForConnected(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::setProxy(QAbstractSocket* theWrappedObject, const QNetworkProxy& networkProxy) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setProxy(networkProxy); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QAbstractSocket::SocketType PythonQtWrapper_QAbstractSocket::socketType(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return theWrappedObject->socketType(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | QAbstractSocket::SocketState PythonQtWrapper_QAbstractSocket::state(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->state(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::flush(QAbstractSocket* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->flush(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QHostAddress PythonQtWrapper_QAbstractSocket::localAddress(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->localAddress(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::writeData(QAbstractSocket* theWrappedObject, const char* data, qint64 len) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_writeData(data, len); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::setSocketDescriptor(QAbstractSocket* theWrappedObject, int socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->setSocketDescriptor(socketDescriptor, state, openMode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::isSequential(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_isSequential(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::canReadLine(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_canReadLine(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::setReadBufferSize(QAbstractSocket* theWrappedObject, qint64 size) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | theWrappedObject->setReadBufferSize(size); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QAbstractSocket::readData(QAbstractSocket* theWrappedObject, char* data, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_readData(data, maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QNetworkProxy PythonQtWrapper_QAbstractSocket::proxy(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->proxy(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAbstractSocket::close(QAbstractSocket* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_close(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QHostAddress PythonQtWrapper_QAbstractSocket::peerAddress(QAbstractSocket* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return theWrappedObject->peerAddress(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAbstractSocket::waitForBytesWritten(QAbstractSocket* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAbstractSocket*)theWrappedObject)->promoted_waitForBytesWritten(msecs); | ||
florianlink
|
r13 | } | ||