/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6-WebEngine.
 * 
 * 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 "sipAPIQtWebEngineCore.h"

#line 28 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/sip/QtWebEngineCore/qwebenginepermission.sip"
#include <qwebenginepermission.h>
#line 29 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEnginePermission.cpp"

#line 26 "/usr/lib/python3.14/site-packages/PyQt6/bindings/QtCore/qurl.sip"
#include <qurl.h>
#line 33 "/build/pyqt6-webengine/src/pyqt6_webengine-6.11.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEnginePermission.cpp"


PyDoc_STRVAR(doc_QWebEnginePermission_swap, "swap(self, other: QWebEnginePermission)");

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

    {
        ::QWebEnginePermission* a0;
        ::QWebEnginePermission *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_swap, doc_QWebEnginePermission_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_origin, "origin(self) -> QUrl");

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

    {
        const ::QWebEnginePermission *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_origin, doc_QWebEnginePermission_origin);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_permissionType, "permissionType(self) -> QWebEnginePermission.PermissionType");

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

    {
        const ::QWebEnginePermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEnginePermission, &sipCpp))
        {
            ::QWebEnginePermission::PermissionType sipRes;

            sipRes = sipCpp->permissionType();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QWebEnginePermission_PermissionType);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_permissionType, doc_QWebEnginePermission_permissionType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_state, "state(self) -> QWebEnginePermission.State");

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

    {
        const ::QWebEnginePermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEnginePermission, &sipCpp))
        {
            ::QWebEnginePermission::State sipRes;

            sipRes = sipCpp->state();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QWebEnginePermission_State);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_state, doc_QWebEnginePermission_state);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_isValid, "isValid(self) -> bool");

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

    {
        const ::QWebEnginePermission *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_isValid, doc_QWebEnginePermission_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_grant, "grant(self)");

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

    {
        const ::QWebEnginePermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEnginePermission, &sipCpp))
        {
            sipCpp->grant();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_grant, doc_QWebEnginePermission_grant);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_deny, "deny(self)");

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

    {
        const ::QWebEnginePermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEnginePermission, &sipCpp))
        {
            sipCpp->deny();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_deny, doc_QWebEnginePermission_deny);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_reset, "reset(self)");

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

    {
        const ::QWebEnginePermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEnginePermission, &sipCpp))
        {
            sipCpp->reset();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_reset, doc_QWebEnginePermission_reset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEnginePermission_isPersistent, "isPersistent(permissionType: QWebEnginePermission.PermissionType) -> bool");

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

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "CE", &sipSelf, sipType_QWebEnginePermission_PermissionType, &a0))
        {
            bool sipRes;

            sipRes = ::QWebEnginePermission::isPersistent(static_cast< ::QWebEnginePermission::PermissionType>(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEnginePermission, sipName_isPersistent, doc_QWebEnginePermission_isPersistent);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QWebEnginePermission___eq__(PyObject *, PyObject *);}
static PyObject *slot_QWebEnginePermission___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebEnginePermission *sipCpp = reinterpret_cast< ::QWebEnginePermission *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebEnginePermission));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebEnginePermission* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineCore, eq_slot, sipType_QWebEnginePermission, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QWebEnginePermission___ne__(PyObject *, PyObject *);}
static PyObject *slot_QWebEnginePermission___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QWebEnginePermission *sipCpp = reinterpret_cast< ::QWebEnginePermission *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QWebEnginePermission));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QWebEnginePermission* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtWebEngineCore, ne_slot, sipType_QWebEnginePermission, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QWebEnginePermission* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QWebEnginePermission[] = {
    {sipName_deny, meth_QWebEnginePermission_deny, METH_VARARGS, doc_QWebEnginePermission_deny},
    {sipName_grant, meth_QWebEnginePermission_grant, METH_VARARGS, doc_QWebEnginePermission_grant},
    {sipName_isPersistent, meth_QWebEnginePermission_isPersistent, METH_VARARGS, doc_QWebEnginePermission_isPersistent},
    {sipName_isValid, meth_QWebEnginePermission_isValid, METH_VARARGS, doc_QWebEnginePermission_isValid},
    {sipName_origin, meth_QWebEnginePermission_origin, METH_VARARGS, doc_QWebEnginePermission_origin},
    {sipName_permissionType, meth_QWebEnginePermission_permissionType, METH_VARARGS, doc_QWebEnginePermission_permissionType},
    {sipName_reset, meth_QWebEnginePermission_reset, METH_VARARGS, doc_QWebEnginePermission_reset},
    {sipName_state, meth_QWebEnginePermission_state, METH_VARARGS, doc_QWebEnginePermission_state},
    {sipName_swap, meth_QWebEnginePermission_swap, METH_VARARGS, doc_QWebEnginePermission_swap}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QWebEnginePermission[] = {
    {sipName_Unsupported, static_cast<int>(::QWebEnginePermission::PermissionType::Unsupported)},
    {sipName_MediaAudioCapture, static_cast<int>(::QWebEnginePermission::PermissionType::MediaAudioCapture)},
    {sipName_MediaVideoCapture, static_cast<int>(::QWebEnginePermission::PermissionType::MediaVideoCapture)},
    {sipName_MediaAudioVideoCapture, static_cast<int>(::QWebEnginePermission::PermissionType::MediaAudioVideoCapture)},
    {sipName_DesktopVideoCapture, static_cast<int>(::QWebEnginePermission::PermissionType::DesktopVideoCapture)},
    {sipName_DesktopAudioVideoCapture, static_cast<int>(::QWebEnginePermission::PermissionType::DesktopAudioVideoCapture)},
    {sipName_MouseLock, static_cast<int>(::QWebEnginePermission::PermissionType::MouseLock)},
    {sipName_Notifications, static_cast<int>(::QWebEnginePermission::PermissionType::Notifications)},
    {sipName_Geolocation, static_cast<int>(::QWebEnginePermission::PermissionType::Geolocation)},
    {sipName_ClipboardReadWrite, static_cast<int>(::QWebEnginePermission::PermissionType::ClipboardReadWrite)},
    {sipName_LocalFontsAccess, static_cast<int>(::QWebEnginePermission::PermissionType::LocalFontsAccess)},
    {sipName_Invalid, static_cast<int>(::QWebEnginePermission::State::Invalid)},
    {sipName_Ask, static_cast<int>(::QWebEnginePermission::State::Ask)},
    {sipName_Granted, static_cast<int>(::QWebEnginePermission::State::Granted)},
    {sipName_Denied, static_cast<int>(::QWebEnginePermission::State::Denied)},
    {0, 0}
};

PyDoc_STRVAR(doc_QWebEnginePermission, "\1QWebEnginePermission()\n"
"QWebEnginePermission(other: QWebEnginePermission)");


sipClassTypeDef sipTypeDef_QtWebEngineCore_QWebEnginePermission = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEnginePermission,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QWebEnginePermission,
        {0, 0, 1},
        9, methods_QWebEnginePermission,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QWebEnginePermission, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebEnginePermission,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QWebEnginePermission,
    init_type_QWebEnginePermission,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebEnginePermission,
    assign_QWebEnginePermission,
    array_QWebEnginePermission,
    copy_QWebEnginePermission,
    release_QWebEnginePermission,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QWebEnginePermission,
    sizeof (::QWebEnginePermission),
};
