PythonQtWrapper_QHttpHeader.cpp
227 lines
| 7.4 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QHttpHeader.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qlist.h> | ||||
#include <qpair.h> | ||||
#include <qstringlist.h> | ||||
florianlink
|
r24 | int PythonQtShell_QHttpHeader::majorVersion() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "majorVersion"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("majorVersion", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
florianlink
|
r73 | int result; | ||
florianlink
|
r24 | return result; | ||
} | ||||
int PythonQtShell_QHttpHeader::minorVersion() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "minorVersion"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("minorVersion", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
florianlink
|
r73 | int result; | ||
florianlink
|
r24 | return result; | ||
} | ||||
bool PythonQtShell_QHttpHeader::parseLine(const QString& line, int number) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "parseLine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "const QString&" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | void* args[3] = {NULL, (void*)&line, (void*)&number}; | ||
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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("parseLine", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QHttpHeader::parseLine(line, number); | ||||
} | ||||
QString PythonQtShell_QHttpHeader::toString() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "toString"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QString"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QString returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("toString", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QString*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QHttpHeader::toString(); | ||||
} | ||||
QHttpHeader* PythonQtWrapper_QHttpHeader::new_QHttpHeader() | ||||
{ | ||||
return new PythonQtShell_QHttpHeader(); } | ||||
QHttpHeader* PythonQtWrapper_QHttpHeader::new_QHttpHeader(const QString& str) | ||||
{ | ||||
return new PythonQtShell_QHttpHeader(str); } | ||||
florianlink
|
r13 | |||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::removeAllValues(QHttpHeader* theWrappedObject, const QString& key) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->removeAllValues(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::setValue(QHttpHeader* theWrappedObject, const QString& key, const QString& value) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setValue(key, value)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QHttpHeader::isValid(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isValid()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::removeValue(QHttpHeader* theWrappedObject, const QString& key) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->removeValue(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QHttpHeader::toString(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QHttpHeader*)theWrappedObject)->promoted_toString()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QHttpHeader::setContentType(QHttpHeader* theWrappedObject, const QString& type) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setContentType(type)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QHttpHeader::contentType(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->contentType()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QHttpHeader::hasContentLength(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->hasContentLength()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QHttpHeader::hasContentType(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->hasContentType()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::setContentLength(QHttpHeader* theWrappedObject, int len) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setContentLength(len)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::addValue(QHttpHeader* theWrappedObject, const QString& key, const QString& value) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->addValue(key, value)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QList<QPair<QString , QString > > PythonQtWrapper_QHttpHeader::values(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->values()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | uint PythonQtWrapper_QHttpHeader::contentLength(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->contentLength()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QHttpHeader::hasKey(QHttpHeader* theWrappedObject, const QString& key) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->hasKey(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QHttpHeader::value(QHttpHeader* theWrappedObject, const QString& key) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->value(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QHttpHeader::allValues(QHttpHeader* theWrappedObject, const QString& key) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->allValues(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QHttpHeader::setValues(QHttpHeader* theWrappedObject, const QList<QPair<QString , QString > >& values) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setValues(values)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QHttpHeader::keys(QHttpHeader* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->keys()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QHttpHeader::parseLine(QHttpHeader* theWrappedObject, const QString& line, int number) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QHttpHeader*)theWrappedObject)->promoted_parseLine(line, number)); | ||
florianlink
|
r13 | } | ||