|
|
#include "PythonQtWrapper_QLocalServer.h"
|
|
|
|
|
|
#include <PythonQtSignalReceiver.h>
|
|
|
#include <PythonQtMethodInfo.h>
|
|
|
#include <PythonQtConversion.h>
|
|
|
#include <QVariant>
|
|
|
#include <qbytearray.h>
|
|
|
#include <qcoreevent.h>
|
|
|
#include <qlist.h>
|
|
|
#include <qlocalserver.h>
|
|
|
#include <qlocalsocket.h>
|
|
|
#include <qobject.h>
|
|
|
|
|
|
void PythonQtShell_QLocalServer::childEvent(QChildEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"" , "QChildEvent*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QLocalServer::childEvent(arg__1);
|
|
|
}
|
|
|
void PythonQtShell_QLocalServer::customEvent(QEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"" , "QEvent*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QLocalServer::customEvent(arg__1);
|
|
|
}
|
|
|
bool PythonQtShell_QLocalServer::event(QEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"bool" , "QEvent*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
|
|
|
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) {
|
|
|
if (args[0]==NULL) {
|
|
|
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result);
|
|
|
} else {
|
|
|
returnValue = *((bool*)args[0]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QLocalServer::event(arg__1);
|
|
|
}
|
|
|
bool PythonQtShell_QLocalServer::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 char* argumentList[] ={"bool" , "QObject*" , "QEvent*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList);
|
|
|
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) {
|
|
|
if (args[0]==NULL) {
|
|
|
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result);
|
|
|
} else {
|
|
|
returnValue = *((bool*)args[0]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QLocalServer::eventFilter(arg__1, arg__2);
|
|
|
}
|
|
|
bool PythonQtShell_QLocalServer::hasPendingConnections() const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hasPendingConnections");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"bool"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
|
|
|
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) {
|
|
|
if (args[0]==NULL) {
|
|
|
PythonQt::priv()->handleVirtualOverloadReturnError("hasPendingConnections", methodInfo, result);
|
|
|
} else {
|
|
|
returnValue = *((bool*)args[0]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QLocalServer::hasPendingConnections();
|
|
|
}
|
|
|
void PythonQtShell_QLocalServer::incomingConnection(quintptr socketDescriptor)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "incomingConnection");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"" , "quintptr"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
|
|
|
void* args[2] = {NULL, (void*)&socketDescriptor};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QLocalServer::incomingConnection(socketDescriptor);
|
|
|
}
|
|
|
QLocalSocket* PythonQtShell_QLocalServer::nextPendingConnection()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "nextPendingConnection");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"QLocalSocket*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
|
|
|
QLocalSocket* 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) {
|
|
|
if (args[0]==NULL) {
|
|
|
PythonQt::priv()->handleVirtualOverloadReturnError("nextPendingConnection", methodInfo, result);
|
|
|
} else {
|
|
|
returnValue = *((QLocalSocket**)args[0]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QLocalServer::nextPendingConnection();
|
|
|
}
|
|
|
void PythonQtShell_QLocalServer::timerEvent(QTimerEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const char* argumentList[] ={"" , "QTimerEvent*"};
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QLocalServer::timerEvent(arg__1);
|
|
|
}
|
|
|
QLocalServer* PythonQtWrapper_QLocalServer::new_QLocalServer(QObject* parent)
|
|
|
{
|
|
|
return new PythonQtShell_QLocalServer(parent); }
|
|
|
|
|
|
void PythonQtWrapper_QLocalServer::incomingConnection(QLocalServer* theWrappedObject, quintptr socketDescriptor)
|
|
|
{
|
|
|
( ((PythonQtPublicPromoter_QLocalServer*)theWrappedObject)->promoted_incomingConnection(socketDescriptor));
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QLocalServer::waitForNewConnection(QLocalServer* theWrappedObject, int msec, bool* timedOut)
|
|
|
{
|
|
|
return ( theWrappedObject->waitForNewConnection(msec, timedOut));
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QLocalServer::serverName(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->serverName());
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QLocalServer::listen(QLocalServer* theWrappedObject, const QString& name)
|
|
|
{
|
|
|
return ( theWrappedObject->listen(name));
|
|
|
}
|
|
|
|
|
|
int PythonQtWrapper_QLocalServer::maxPendingConnections(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->maxPendingConnections());
|
|
|
}
|
|
|
|
|
|
QLocalSocket* PythonQtWrapper_QLocalServer::nextPendingConnection(QLocalServer* theWrappedObject)
|
|
|
{
|
|
|
return ( ((PythonQtPublicPromoter_QLocalServer*)theWrappedObject)->promoted_nextPendingConnection());
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QLocalServer::close(QLocalServer* theWrappedObject)
|
|
|
{
|
|
|
( theWrappedObject->close());
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QLocalServer::errorString(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->errorString());
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QLocalServer::setMaxPendingConnections(QLocalServer* theWrappedObject, int numConnections)
|
|
|
{
|
|
|
( theWrappedObject->setMaxPendingConnections(numConnections));
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QLocalServer::hasPendingConnections(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( ((PythonQtPublicPromoter_QLocalServer*)theWrappedObject)->promoted_hasPendingConnections());
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QLocalServer::isListening(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->isListening());
|
|
|
}
|
|
|
|
|
|
QAbstractSocket::SocketError PythonQtWrapper_QLocalServer::serverError(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->serverError());
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QLocalServer::fullServerName(QLocalServer* theWrappedObject) const
|
|
|
{
|
|
|
return ( theWrappedObject->fullServerName());
|
|
|
}
|
|
|
|
|
|
|