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

#line 222 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpermissions.sip"
#include <qpermissions.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQContactsPermission.cpp"



PyDoc_STRVAR(doc_QContactsPermission_setAccessMode, "setAccessMode(self, mode: QContactsPermission.AccessMode)");

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

    {
        ::QContactsPermission::AccessMode a0;
        ::QContactsPermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QContactsPermission, &sipCpp, sipType_QContactsPermission_AccessMode, &a0))
        {
            sipCpp->setAccessMode(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QContactsPermission, sipName_setAccessMode, doc_QContactsPermission_setAccessMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QContactsPermission_accessMode, "accessMode(self) -> QContactsPermission.AccessMode");

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

    {
        const ::QContactsPermission *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QContactsPermission, &sipCpp))
        {
            ::QContactsPermission::AccessMode sipRes;

            sipRes = sipCpp->accessMode();

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

    sipNoMethod(sipParseErr, sipName_QContactsPermission, sipName_accessMode, doc_QContactsPermission_accessMode);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QContactsPermission* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QContactsPermission[] = {
    {sipName_accessMode, meth_QContactsPermission_accessMode, METH_VARARGS, doc_QContactsPermission_accessMode},
    {sipName_setAccessMode, meth_QContactsPermission_setAccessMode, METH_VARARGS, doc_QContactsPermission_setAccessMode}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QContactsPermission[] = {
    {sipName_ReadOnly, static_cast<int>(::QContactsPermission::ReadOnly)},
    {sipName_ReadWrite, static_cast<int>(::QContactsPermission::ReadWrite)},
    {0, 0}
};

PyDoc_STRVAR(doc_QContactsPermission, "\1QContactsPermission()\n"
"QContactsPermission(other: QContactsPermission)");


sipClassTypeDef sipTypeDef_QtCore_QContactsPermission = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QContactsPermission,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QContactsPermission,
        {0, 0, 1},
        2, methods_QContactsPermission,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QContactsPermission, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QContactsPermission,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QContactsPermission,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QContactsPermission,
    assign_QContactsPermission,
    array_QContactsPermission,
    copy_QContactsPermission,
    release_QContactsPermission,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QContactsPermission,
    sizeof (::QContactsPermission),
};
