/*
 * 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/qwebsocketcorsauthenticator.sip"
#include <qwebsocketcorsauthenticator.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWebSockets/sipQtWebSocketsQWebSocketCorsAuthenticator.cpp"

#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtWebSockets/sipQtWebSocketsQWebSocketCorsAuthenticator.cpp"


PyDoc_STRVAR(doc_QWebSocketCorsAuthenticator_swap, "swap(self, other: QWebSocketCorsAuthenticator)");

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

    {
        ::QWebSocketCorsAuthenticator* a0;
        ::QWebSocketCorsAuthenticator *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebSocketCorsAuthenticator, sipName_swap, doc_QWebSocketCorsAuthenticator_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebSocketCorsAuthenticator_origin, "origin(self) -> str");

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

    {
        const ::QWebSocketCorsAuthenticator *sipCpp;

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

            sipRes = new ::QString(sipCpp->origin());

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

    sipNoMethod(sipParseErr, sipName_QWebSocketCorsAuthenticator, sipName_origin, doc_QWebSocketCorsAuthenticator_origin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebSocketCorsAuthenticator_setAllowed, "setAllowed(self, allowed: bool)");

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

    {
        bool a0;
        ::QWebSocketCorsAuthenticator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QWebSocketCorsAuthenticator, &sipCpp, &a0))
        {
            sipCpp->setAllowed(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebSocketCorsAuthenticator, sipName_setAllowed, doc_QWebSocketCorsAuthenticator_setAllowed);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebSocketCorsAuthenticator_allowed, "allowed(self) -> bool");

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

    {
        const ::QWebSocketCorsAuthenticator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebSocketCorsAuthenticator, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->allowed();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebSocketCorsAuthenticator, sipName_allowed, doc_QWebSocketCorsAuthenticator_allowed);

    return SIP_NULLPTR;
}


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


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


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


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


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

    {
        const ::QString* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QString, &a0, &a0State))
        {
            sipCpp = new ::QWebSocketCorsAuthenticator(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipCpp;
        }
    }

    {
        const ::QWebSocketCorsAuthenticator* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QWebSocketCorsAuthenticator[] = {
    {sipName_allowed, meth_QWebSocketCorsAuthenticator_allowed, METH_VARARGS, doc_QWebSocketCorsAuthenticator_allowed},
    {sipName_origin, meth_QWebSocketCorsAuthenticator_origin, METH_VARARGS, doc_QWebSocketCorsAuthenticator_origin},
    {sipName_setAllowed, meth_QWebSocketCorsAuthenticator_setAllowed, METH_VARARGS, doc_QWebSocketCorsAuthenticator_setAllowed},
    {sipName_swap, meth_QWebSocketCorsAuthenticator_swap, METH_VARARGS, doc_QWebSocketCorsAuthenticator_swap}
};

PyDoc_STRVAR(doc_QWebSocketCorsAuthenticator, "\1QWebSocketCorsAuthenticator(origin: str|None)\n"
"QWebSocketCorsAuthenticator(other: QWebSocketCorsAuthenticator)");


sipClassTypeDef sipTypeDef_QtWebSockets_QWebSocketCorsAuthenticator = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebSocketCorsAuthenticator,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QWebSocketCorsAuthenticator,
        {0, 0, 1},
        4, methods_QWebSocketCorsAuthenticator,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebSocketCorsAuthenticator,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QWebSocketCorsAuthenticator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebSocketCorsAuthenticator,
    assign_QWebSocketCorsAuthenticator,
    SIP_NULLPTR,
    copy_QWebSocketCorsAuthenticator,
    release_QWebSocketCorsAuthenticator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QWebSocketCorsAuthenticator),
};
