/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtNetwork.h"

#line 45 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qformdatabuilder.sip"
#include <qformdatabuilder.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"

#line 45 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qhttpmultipart.sip"
#include <qhttpmultipart.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qformdatabuilder.sip"
#include <qformdatabuilder.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qanystringview.sip"
#include <qanystringview.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"


PyDoc_STRVAR(doc_QFormDataBuilder_swap, "swap(self, other: QFormDataBuilder)");

extern "C" {static PyObject *meth_QFormDataBuilder_swap(PyObject *, PyObject *);}
static PyObject *meth_QFormDataBuilder_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QFormDataBuilder* a0;
        ::QFormDataBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QFormDataBuilder, &sipCpp, sipType_QFormDataBuilder, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormDataBuilder, sipName_swap, doc_QFormDataBuilder_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormDataBuilder_part, "part(self, name: QByteArray|bytes|bytearray|memoryview|str|None) -> QFormDataPartBuilder");

extern "C" {static PyObject *meth_QFormDataBuilder_part(PyObject *, PyObject *);}
static PyObject *meth_QFormDataBuilder_part(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QAnyStringView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;
        ::QFormDataBuilder *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QFormDataBuilder, &sipCpp, sipType_QAnyStringView, &a0, &a0State, &a0UserState))
        {
            ::QFormDataPartBuilder*sipRes;

            sipRes = new ::QFormDataPartBuilder(sipCpp->part(*a0));
            sipReleaseTypeUS(a0, sipType_QAnyStringView, a0State, a0UserState);

            return sipConvertFromNewType(sipRes, sipType_QFormDataPartBuilder, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormDataBuilder, sipName_part, doc_QFormDataBuilder_part);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFormDataBuilder_buildMultiPart, "buildMultiPart(self, options: QFormDataBuilder.Option = {}) -> QHttpMultiPart|None");

extern "C" {static PyObject *meth_QFormDataBuilder_buildMultiPart(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QFormDataBuilder_buildMultiPart(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QFormDataBuilder::Options a0def = {};
        ::QFormDataBuilder::Options* a0 = &a0def;
        int a0State = 0;
        ::QFormDataBuilder *sipCpp;

        static const char *sipKwdList[] = {
            sipName_options,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QFormDataBuilder, &sipCpp, sipType_QFlags_0100QFormDataBuilder_Option, &a0, &a0State))
        {
            ::QHttpMultiPart*sipRes = 0;

#line 65 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNetwork/qformdatabuilder.sip"
        sipRes = sipCpp->buildMultiPart(*a0).release();
#line 124 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkQFormDataBuilder.cpp"
            sipReleaseType(a0, sipType_QFlags_0100QFormDataBuilder_Option, a0State);

            return sipConvertFromType(sipRes, sipType_QHttpMultiPart, Py_None);
        }
    }

    sipNoMethod(sipParseErr, sipName_QFormDataBuilder, sipName_buildMultiPart, doc_QFormDataBuilder_buildMultiPart);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QFormDataBuilder(void *, int);}
static void release_QFormDataBuilder(void *sipCppV, int)
{
    delete reinterpret_cast< ::QFormDataBuilder *>(sipCppV);
}


extern "C" {static void *array_QFormDataBuilder(Py_ssize_t);}
static void *array_QFormDataBuilder(Py_ssize_t sipNrElem)
{
    return new ::QFormDataBuilder[sipNrElem];
}


extern "C" {static void array_delete_QFormDataBuilder(void *);}
static void array_delete_QFormDataBuilder(void *sipCpp)
{
    delete[] reinterpret_cast< ::QFormDataBuilder *>(sipCpp);
}


extern "C" {static void dealloc_QFormDataBuilder(sipSimpleWrapper *);}
static void dealloc_QFormDataBuilder(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QFormDataBuilder(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QFormDataBuilder(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QFormDataBuilder(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QFormDataBuilder *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new ::QFormDataBuilder();

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QFormDataBuilder[] = {
    {sipName_buildMultiPart, SIP_MLMETH_CAST(meth_QFormDataBuilder_buildMultiPart), METH_VARARGS|METH_KEYWORDS, doc_QFormDataBuilder_buildMultiPart},
    {sipName_part, meth_QFormDataBuilder_part, METH_VARARGS, doc_QFormDataBuilder_part},
    {sipName_swap, meth_QFormDataBuilder_swap, METH_VARARGS, doc_QFormDataBuilder_swap}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QFormDataBuilder[] = {
    {sipName_Default, static_cast<int>(::QFormDataBuilder::Option::Default)},
    {sipName_OmitRfc8187EncodedFilename, static_cast<int>(::QFormDataBuilder::Option::OmitRfc8187EncodedFilename)},
    {sipName_UseRfc7578PercentEncodedFilename, static_cast<int>(::QFormDataBuilder::Option::UseRfc7578PercentEncodedFilename)},
    {sipName_PreferLatin1EncodedFilename, static_cast<int>(::QFormDataBuilder::Option::PreferLatin1EncodedFilename)},
    {sipName_StrictRfc7578, static_cast<int>(::QFormDataBuilder::Option::StrictRfc7578)},
    {0, 0}
};

PyDoc_STRVAR(doc_QFormDataBuilder, "\1QFormDataBuilder()");


sipClassTypeDef sipTypeDef_QtNetwork_QFormDataBuilder = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QFormDataBuilder,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QFormDataBuilder,
        {0, 0, 1},
        3, methods_QFormDataBuilder,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QFormDataBuilder, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QFormDataBuilder,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QFormDataBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QFormDataBuilder,
    SIP_NULLPTR,
    array_QFormDataBuilder,
    SIP_NULLPTR,
    release_QFormDataBuilder,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QFormDataBuilder,
    sizeof (::QFormDataBuilder),
};
