1// qwebengineurlrequestinfo.sip generated by MetaSIP 2// 3// This file is part of the QtWebEngineCore Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQtWebEngine. 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 23%If (QtWebEngine_5_6_0 -) 24 25class QWebEngineUrlRequestInfo 26{ 27%TypeHeaderCode 28#include <qwebengineurlrequestinfo.h> 29%End 30 31public: 32 enum ResourceType 33 { 34 ResourceTypeMainFrame, 35 ResourceTypeSubFrame, 36 ResourceTypeStylesheet, 37 ResourceTypeScript, 38 ResourceTypeImage, 39 ResourceTypeFontResource, 40 ResourceTypeSubResource, 41 ResourceTypeObject, 42 ResourceTypeMedia, 43 ResourceTypeWorker, 44 ResourceTypeSharedWorker, 45 ResourceTypePrefetch, 46 ResourceTypeFavicon, 47 ResourceTypeXhr, 48 ResourceTypePing, 49 ResourceTypeServiceWorker, 50 ResourceTypeUnknown, 51%If (QtWebEngine_5_7_0 -) 52 ResourceTypeCspReport, 53%End 54%If (QtWebEngine_5_7_0 -) 55 ResourceTypePluginResource, 56%End 57%If (QtWebEngine_5_14_0 -) 58 ResourceTypeNavigationPreloadMainFrame, 59%End 60%If (QtWebEngine_5_14_0 -) 61 ResourceTypeNavigationPreloadSubFrame, 62%End 63 }; 64 65 enum NavigationType 66 { 67 NavigationTypeLink, 68 NavigationTypeTyped, 69 NavigationTypeFormSubmitted, 70 NavigationTypeBackForward, 71 NavigationTypeReload, 72%If (QtWebEngine_5_14_0 -) 73 NavigationTypeRedirect, 74%End 75 NavigationTypeOther, 76 }; 77 78 QWebEngineUrlRequestInfo::ResourceType resourceType() const; 79 QWebEngineUrlRequestInfo::NavigationType navigationType() const; 80 QUrl requestUrl() const; 81 QUrl firstPartyUrl() const; 82 QByteArray requestMethod() const; 83 void block(bool shouldBlock); 84 void redirect(const QUrl &url); 85 void setHttpHeader(const QByteArray &name, const QByteArray &value); 86%If (QtWebEngine_5_14_0 -) 87 QUrl initiator() const; 88%End 89 90private: 91%If (QtWebEngine_5_14_0 -) 92 QWebEngineUrlRequestInfo(); 93%End 94 QWebEngineUrlRequestInfo(const QWebEngineUrlRequestInfo &); 95 ~QWebEngineUrlRequestInfo(); 96}; 97 98%End 99