/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.23
 *
 * Copyright (c) 2020 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 26 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtCore/qsystemsemaphore.sip"
#include <qsystemsemaphore.h>
#line 29 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtCore/sipQtCoreQSystemSemaphore.cpp"

#line 27 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_k26_smk_kv_full/build/tmp/work/cortexa72-cortexa53-xilinx-linux/python3-pyqt5/5.15.1-r0/PyQt5-5.15.1/QtCore/sipQtCoreQSystemSemaphore.cpp"


PyDoc_STRVAR(doc_QSystemSemaphore_setKey, "setKey(self, str, initialValue: int = 0, mode: QSystemSemaphore.AccessMode = QSystemSemaphore.Open)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
        int a1 = 0;
         ::QSystemSemaphore::AccessMode a2 = QSystemSemaphore::Open;
         ::QSystemSemaphore *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_initialValue,
            sipName_mode,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|iE", &sipSelf, sipType_QSystemSemaphore, &sipCpp, sipType_QString,&a0, &a0State, &a1, sipType_QSystemSemaphore_AccessMode, &a2))
        {
            sipCpp->setKey(*a0,a1,a2);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_setKey, doc_QSystemSemaphore_setKey);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSystemSemaphore_key, "key(self) -> str");

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

    {
        const  ::QSystemSemaphore *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_key, doc_QSystemSemaphore_key);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSystemSemaphore_acquire, "acquire(self) -> bool");

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

    {
         ::QSystemSemaphore *sipCpp;

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

            sipRes = sipCpp->acquire();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_acquire, doc_QSystemSemaphore_acquire);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSystemSemaphore_release, "release(self, n: int = 1) -> bool");

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

    {
        int a0 = 1;
         ::QSystemSemaphore *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QSystemSemaphore, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->release(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_release, doc_QSystemSemaphore_release);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSystemSemaphore_error, "error(self) -> QSystemSemaphore.SystemSemaphoreError");

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

    {
        const  ::QSystemSemaphore *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSystemSemaphore, &sipCpp))
        {
             ::QSystemSemaphore::SystemSemaphoreError sipRes;

            sipRes = sipCpp->error();

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

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_error, doc_QSystemSemaphore_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSystemSemaphore_errorString, "errorString(self) -> str");

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

    {
        const  ::QSystemSemaphore *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSystemSemaphore, sipName_errorString, doc_QSystemSemaphore_errorString);

    return SIP_NULLPTR;
}


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


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


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

    {
        const  ::QString* a0;
        int a0State = 0;
        int a1 = 0;
         ::QSystemSemaphore::AccessMode a2 = QSystemSemaphore::Open;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_initialValue,
            sipName_mode,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1|iE", sipType_QString,&a0, &a0State, &a1, sipType_QSystemSemaphore_AccessMode, &a2))
        {
            sipCpp = new  ::QSystemSemaphore(*a0,a1,a2);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSystemSemaphore[] = {
    {SIP_MLNAME_CAST(sipName_acquire), meth_QSystemSemaphore_acquire, METH_VARARGS, SIP_MLDOC_CAST(doc_QSystemSemaphore_acquire)},
    {SIP_MLNAME_CAST(sipName_error), meth_QSystemSemaphore_error, METH_VARARGS, SIP_MLDOC_CAST(doc_QSystemSemaphore_error)},
    {SIP_MLNAME_CAST(sipName_errorString), meth_QSystemSemaphore_errorString, METH_VARARGS, SIP_MLDOC_CAST(doc_QSystemSemaphore_errorString)},
    {SIP_MLNAME_CAST(sipName_key), meth_QSystemSemaphore_key, METH_VARARGS, SIP_MLDOC_CAST(doc_QSystemSemaphore_key)},
    {SIP_MLNAME_CAST(sipName_release), SIP_MLMETH_CAST(meth_QSystemSemaphore_release), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QSystemSemaphore_release)},
    {SIP_MLNAME_CAST(sipName_setKey), SIP_MLMETH_CAST(meth_QSystemSemaphore_setKey), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_QSystemSemaphore_setKey)}
};

static sipEnumMemberDef enummembers_QSystemSemaphore[] = {
    {sipName_AlreadyExists, static_cast<int>( ::QSystemSemaphore::AlreadyExists), 274},
    {sipName_Create, static_cast<int>( ::QSystemSemaphore::Create), 273},
    {sipName_KeyError, static_cast<int>( ::QSystemSemaphore::KeyError), 274},
    {sipName_NoError, static_cast<int>( ::QSystemSemaphore::NoError), 274},
    {sipName_NotFound, static_cast<int>( ::QSystemSemaphore::NotFound), 274},
    {sipName_Open, static_cast<int>( ::QSystemSemaphore::Open), 273},
    {sipName_OutOfResources, static_cast<int>( ::QSystemSemaphore::OutOfResources), 274},
    {sipName_PermissionDenied, static_cast<int>( ::QSystemSemaphore::PermissionDenied), 274},
    {sipName_UnknownError, static_cast<int>( ::QSystemSemaphore::UnknownError), 274},
};

PyDoc_STRVAR(doc_QSystemSemaphore, "\1QSystemSemaphore(str, initialValue: int = 0, mode: QSystemSemaphore.AccessMode = QSystemSemaphore.Open)");


static pyqt5ClassPluginDef plugin_QSystemSemaphore = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtCore_QSystemSemaphore = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSystemSemaphore,
        {SIP_NULLPTR},
        &plugin_QSystemSemaphore
    },
    {
        sipNameNr_QSystemSemaphore,
        {0, 0, 1},
        6, methods_QSystemSemaphore,
        9, enummembers_QSystemSemaphore,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSystemSemaphore,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSystemSemaphore,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_QSystemSemaphore,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QSystemSemaphore,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
