/*
 * 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 "sipAPIQtWebSockets.h"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtWebSockets/qwebsockethandshakeoptions.sip"
#include <qwebsockethandshakeoptions.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWebSockets/sipQtWebSocketsQWebSocketHandshakeOptions.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWebSockets/sipQtWebSocketsQWebSocketHandshakeOptions.cpp"


PyDoc_STRVAR(doc_QWebSocketHandshakeOptions_swap, "swap(self, other: QWebSocketHandshakeOptions)");

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

    {
        ::QWebSocketHandshakeOptions* a0;
        ::QWebSocketHandshakeOptions *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebSocketHandshakeOptions, sipName_swap, doc_QWebSocketHandshakeOptions_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebSocketHandshakeOptions_subprotocols, "subprotocols(self) -> list[str]");

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

    {
        const ::QWebSocketHandshakeOptions *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebSocketHandshakeOptions, &sipCpp))
        {
            ::QStringList*sipRes;

            sipRes = new ::QStringList(sipCpp->subprotocols());

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

    sipNoMethod(sipParseErr, sipName_QWebSocketHandshakeOptions, sipName_subprotocols, doc_QWebSocketHandshakeOptions_subprotocols);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebSocketHandshakeOptions_setSubprotocols, "setSubprotocols(self, protocols: Iterable[str|None])");

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

    {
        const ::QStringList* a0;
        int a0State = 0;
        ::QWebSocketHandshakeOptions *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebSocketHandshakeOptions, &sipCpp, sipType_QStringList, &a0, &a0State))
        {
            sipCpp->setSubprotocols(*a0);
            sipReleaseType(const_cast< ::QStringList *>(a0), sipType_QStringList, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebSocketHandshakeOptions, sipName_setSubprotocols, doc_QWebSocketHandshakeOptions_setSubprotocols);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QWebSocketHandshakeOptions___eq__(PyObject *, PyObject *);}
static PyObject *slot_QWebSocketHandshakeOptions___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebSocketHandshakeOptions *sipCpp = reinterpret_cast< ::QWebSocketHandshakeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebSocketHandshakeOptions));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebSocketHandshakeOptions* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QWebSocketHandshakeOptions, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebSockets, eq_slot, sipType_QWebSocketHandshakeOptions, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QWebSocketHandshakeOptions___ne__(PyObject *, PyObject *);}
static PyObject *slot_QWebSocketHandshakeOptions___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebSocketHandshakeOptions *sipCpp = reinterpret_cast< ::QWebSocketHandshakeOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebSocketHandshakeOptions));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebSocketHandshakeOptions* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QWebSocketHandshakeOptions, &a0))
        {
            bool sipRes;

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebSockets, ne_slot, sipType_QWebSocketHandshakeOptions, sipSelf, sipArg);
}


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


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


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


extern "C" {static void assign_QWebSocketHandshakeOptions(void *, Py_ssize_t, void *);}
static void assign_QWebSocketHandshakeOptions(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QWebSocketHandshakeOptions *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QWebSocketHandshakeOptions *>(sipSrc);
}


extern "C" {static void *copy_QWebSocketHandshakeOptions(const void *, Py_ssize_t);}
static void *copy_QWebSocketHandshakeOptions(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QWebSocketHandshakeOptions(reinterpret_cast<const ::QWebSocketHandshakeOptions *>(sipSrc)[sipSrcIdx]);
}


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QWebSocketHandshakeOptions* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QWebSocketHandshakeOptions, &a0))
        {
            sipCpp = new ::QWebSocketHandshakeOptions(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QWebSocketHandshakeOptions[] = {
    {(void *)slot_QWebSocketHandshakeOptions___eq__, eq_slot},
    {(void *)slot_QWebSocketHandshakeOptions___ne__, ne_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QWebSocketHandshakeOptions[] = {
    {sipName_setSubprotocols, meth_QWebSocketHandshakeOptions_setSubprotocols, METH_VARARGS, doc_QWebSocketHandshakeOptions_setSubprotocols},
    {sipName_subprotocols, meth_QWebSocketHandshakeOptions_subprotocols, METH_VARARGS, doc_QWebSocketHandshakeOptions_subprotocols},
    {sipName_swap, meth_QWebSocketHandshakeOptions_swap, METH_VARARGS, doc_QWebSocketHandshakeOptions_swap}
};

PyDoc_STRVAR(doc_QWebSocketHandshakeOptions, "\1QWebSocketHandshakeOptions()\n"
"QWebSocketHandshakeOptions(other: QWebSocketHandshakeOptions)");


sipClassTypeDef sipTypeDef_QtWebSockets_QWebSocketHandshakeOptions = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebSocketHandshakeOptions,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QWebSocketHandshakeOptions,
        {0, 0, 1},
        3, methods_QWebSocketHandshakeOptions,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebSocketHandshakeOptions,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QWebSocketHandshakeOptions,
    init_type_QWebSocketHandshakeOptions,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebSocketHandshakeOptions,
    assign_QWebSocketHandshakeOptions,
    array_QWebSocketHandshakeOptions,
    copy_QWebSocketHandshakeOptions,
    release_QWebSocketHandshakeOptions,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QWebSocketHandshakeOptions,
    sizeof (::QWebSocketHandshakeOptions),
};
