<?xml version="1.0" encoding="UTF-8"?>
<!--
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
-->

<typesystem package="PySide6.QtNetworkAuth">
    <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
    <object-type name="QAbstractOAuth">
        <enum-type name="ContentType"/>
        <enum-type name="Error"/>
        <enum-type name="Stage"/>
        <enum-type name="Status"/>
        <modify-function signature="setReplyHandler(QAbstractOAuthReplyHandler*)">
            <modify-argument index="1">
                <define-ownership class="target" owner="c++"/>
            </modify-argument>
        </modify-function>
        <add-function signature="setModifyParametersFunction(PyObject* @modifyParametersFunction@)">
            <inject-code class="target" position="beginning" file="../glue/qtnetworkauth.cpp" snippet="qabstractoauth-setmodifyparametersfunction"/>
        </add-function>
    </object-type>
    <object-type name="QAbstractOAuth2">
        <modify-function signature="head(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="get(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="post(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="post(const QUrl&amp;,const QByteArray&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="post(const QUrl&amp;,QHttpMultiPart*)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="put(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="put(const QUrl&amp;,const QByteArray&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="put(const QUrl&amp;,QHttpMultiPart*)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="deleteResource(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
    </object-type>
    <object-type name="QAbstractOAuthReplyHandler"/>
    <object-type name="QOAuth1">
        <enum-type name="SignatureMethod"/>
        <modify-function signature="head(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="get(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="post(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="put(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="deleteResource(const QUrl&amp;,const QMap&lt;QString,QVariant&gt;&amp;)">
            <modify-argument index="return">
                <define-ownership class="target" owner="default"/>
            </modify-argument>
        </modify-function>
    </object-type>
    <value-type name="QOAuth1Signature">
        <enum-type name="HttpRequestMethod"/>
    </value-type>
    <object-type name="QOAuth2AuthorizationCodeFlow"/>
    <object-type name="QOAuthHttpServerReplyHandler"/>
    <object-type name="QOAuthOobReplyHandler"/>

    <suppress-warning text="^.*Typedef used on signal QAbstractOAuth.*$"/>
</typesystem>
