1// qxmlquery.sip generated by MetaSIP 2// 3// This file is part of the QtXmlPatterns Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QXmlQuery 24{ 25%TypeHeaderCode 26#include <qxmlquery.h> 27%End 28 29%TypeCode 30// Needed by the evaluateToStringList() %MethodCode. 31#include <qstringlist.h> 32%End 33 34public: 35 enum QueryLanguage 36 { 37 XQuery10, 38 XSLT20, 39 }; 40 41 QXmlQuery(); 42 QXmlQuery(const QXmlQuery &other); 43 QXmlQuery(const QXmlNamePool &np); 44 QXmlQuery(QXmlQuery::QueryLanguage queryLanguage, const QXmlNamePool &pool = QXmlNamePool()); 45 ~QXmlQuery(); 46 void setMessageHandler(QAbstractMessageHandler *messageHandler /KeepReference/); 47 QAbstractMessageHandler *messageHandler() const; 48 void setQuery(const QString &sourceCode, const QUrl &documentUri = QUrl()); 49 void setQuery(QIODevice *sourceCode, const QUrl &documentUri = QUrl()); 50 void setQuery(const QUrl &queryURI, const QUrl &baseUri = QUrl()); 51 QXmlNamePool namePool() const; 52 void bindVariable(const QXmlName &name, const QXmlItem &value); 53 void bindVariable(const QXmlName &name, QIODevice *); 54 void bindVariable(const QXmlName &name, const QXmlQuery &query); 55 void bindVariable(const QString &localName, const QXmlItem &value); 56 void bindVariable(const QString &localName, QIODevice *); 57 void bindVariable(const QString &localName, const QXmlQuery &query); 58 bool isValid() const; 59 void evaluateTo(QXmlResultItems *result) const; 60 bool evaluateTo(QAbstractXmlReceiver *callback) const; 61 SIP_PYOBJECT evaluateToStringList() const /TypeHint="QStringList"/; 62%MethodCode 63 static const sipTypeDef *sipType_QStringList = 0; 64 65 if (!sipType_QStringList) 66 sipType_QStringList = sipFindType("QStringList"); 67 68 bool ok; 69 QStringList *result = new QStringList; 70 71 Py_BEGIN_ALLOW_THREADS 72 ok = sipCpp->evaluateTo(result); 73 Py_END_ALLOW_THREADS 74 75 if (ok) 76 { 77 sipRes = sipConvertFromNewType(result, sipType_QStringList, NULL); 78 } 79 else 80 { 81 delete result; 82 sipRes = Py_None; 83 Py_INCREF(Py_None); 84 } 85%End 86 87 bool evaluateTo(QIODevice *target) const; 88 SIP_PYOBJECT evaluateToString() const /TypeHint="QString"/; 89%MethodCode 90 static const sipTypeDef *sipType_QStringList = 0; 91 92 if (!sipType_QStringList) 93 sipType_QStringList = sipFindType("QStringList"); 94 95 bool ok; 96 QString *result = new QString; 97 98 Py_BEGIN_ALLOW_THREADS 99 ok = sipCpp->evaluateTo(result); 100 Py_END_ALLOW_THREADS 101 102 if (ok) 103 { 104 sipRes = sipConvertFromNewType(result, sipType_QString, NULL); 105 } 106 else 107 { 108 delete result; 109 sipRes = Py_None; 110 Py_INCREF(Py_None); 111 } 112%End 113 114 void setUriResolver(const QAbstractUriResolver *resolver /KeepReference/); 115 const QAbstractUriResolver *uriResolver() const; 116 void setFocus(const QXmlItem &item); 117 bool setFocus(const QUrl &documentURI); 118 bool setFocus(QIODevice *document); 119 bool setFocus(const QString &focus); 120 void setInitialTemplateName(const QXmlName &name); 121 void setInitialTemplateName(const QString &name); 122 QXmlName initialTemplateName() const; 123 void setNetworkAccessManager(QNetworkAccessManager *newManager /KeepReference/); 124 QNetworkAccessManager *networkAccessManager() const; 125 QXmlQuery::QueryLanguage queryLanguage() const; 126}; 127