/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 "sipAPIQtSerialPort.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSerialPort/qserialportinfo.sip"
#include <qserialportinfo.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSerialPort/sipQtSerialPortQSerialPortInfo.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtSerialPort/qserialport.sip"
#include <qserialport.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSerialPort/sipQtSerialPortQSerialPortInfo.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSerialPort/sipQtSerialPortQSerialPortInfo.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSerialPort/sipQtSerialPortQSerialPortInfo.cpp"
#line 646 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtSerialPort/sipQtSerialPortQSerialPortInfo.cpp"


PyDoc_STRVAR(doc_QSerialPortInfo_swap, "swap(self, QSerialPortInfo)");

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

    {
         ::QSerialPortInfo* a0;
         ::QSerialPortInfo *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_swap, doc_QSerialPortInfo_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_portName, "portName(self) -> str");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_portName, doc_QSerialPortInfo_portName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_systemLocation, "systemLocation(self) -> str");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_systemLocation, doc_QSerialPortInfo_systemLocation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_description, "description(self) -> str");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_description, doc_QSerialPortInfo_description);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_manufacturer, "manufacturer(self) -> str");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_manufacturer, doc_QSerialPortInfo_manufacturer);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_vendorIdentifier, "vendorIdentifier(self) -> int");

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

    {
        const  ::QSerialPortInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPortInfo, &sipCpp))
        {
             ::quint16 sipRes;

            sipRes = sipCpp->vendorIdentifier();

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_vendorIdentifier, doc_QSerialPortInfo_vendorIdentifier);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_productIdentifier, "productIdentifier(self) -> int");

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

    {
        const  ::QSerialPortInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPortInfo, &sipCpp))
        {
             ::quint16 sipRes;

            sipRes = sipCpp->productIdentifier();

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_productIdentifier, doc_QSerialPortInfo_productIdentifier);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_hasVendorIdentifier, "hasVendorIdentifier(self) -> bool");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

            sipRes = sipCpp->hasVendorIdentifier();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_hasVendorIdentifier, doc_QSerialPortInfo_hasVendorIdentifier);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_hasProductIdentifier, "hasProductIdentifier(self) -> bool");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

            sipRes = sipCpp->hasProductIdentifier();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_hasProductIdentifier, doc_QSerialPortInfo_hasProductIdentifier);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_isBusy, "isBusy(self) -> bool");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

            sipRes = sipCpp->isBusy();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_isBusy, doc_QSerialPortInfo_isBusy);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_isValid, doc_QSerialPortInfo_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_standardBaudRates, "standardBaudRates() -> List[int]");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
             ::QList<int>*sipRes;

            sipRes = new  ::QList<int>( ::QSerialPortInfo::standardBaudRates());

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_standardBaudRates, doc_QSerialPortInfo_standardBaudRates);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_availablePorts, "availablePorts() -> List[QSerialPortInfo]");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            QList< ::QSerialPortInfo>*sipRes;

            sipRes = new QList< ::QSerialPortInfo>( ::QSerialPortInfo::availablePorts());

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_availablePorts, doc_QSerialPortInfo_availablePorts);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_isNull, "isNull(self) -> bool");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_isNull, doc_QSerialPortInfo_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPortInfo_serialNumber, "serialNumber(self) -> str");

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

    {
        const  ::QSerialPortInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSerialPortInfo, sipName_serialNumber, doc_QSerialPortInfo_serialNumber);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QSerialPort* a0;

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

            return sipCpp;
        }
    }

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

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

            return sipCpp;
        }
    }

    {
        const  ::QSerialPortInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSerialPortInfo[] = {
    {sipName_availablePorts, meth_QSerialPortInfo_availablePorts, METH_VARARGS, doc_QSerialPortInfo_availablePorts},
    {sipName_description, meth_QSerialPortInfo_description, METH_VARARGS, doc_QSerialPortInfo_description},
    {sipName_hasProductIdentifier, meth_QSerialPortInfo_hasProductIdentifier, METH_VARARGS, doc_QSerialPortInfo_hasProductIdentifier},
    {sipName_hasVendorIdentifier, meth_QSerialPortInfo_hasVendorIdentifier, METH_VARARGS, doc_QSerialPortInfo_hasVendorIdentifier},
    {sipName_isBusy, meth_QSerialPortInfo_isBusy, METH_VARARGS, doc_QSerialPortInfo_isBusy},
    {sipName_isNull, meth_QSerialPortInfo_isNull, METH_VARARGS, doc_QSerialPortInfo_isNull},
    {sipName_isValid, meth_QSerialPortInfo_isValid, METH_VARARGS, doc_QSerialPortInfo_isValid},
    {sipName_manufacturer, meth_QSerialPortInfo_manufacturer, METH_VARARGS, doc_QSerialPortInfo_manufacturer},
    {sipName_portName, meth_QSerialPortInfo_portName, METH_VARARGS, doc_QSerialPortInfo_portName},
    {sipName_productIdentifier, meth_QSerialPortInfo_productIdentifier, METH_VARARGS, doc_QSerialPortInfo_productIdentifier},
    {sipName_serialNumber, meth_QSerialPortInfo_serialNumber, METH_VARARGS, doc_QSerialPortInfo_serialNumber},
    {sipName_standardBaudRates, meth_QSerialPortInfo_standardBaudRates, METH_VARARGS, doc_QSerialPortInfo_standardBaudRates},
    {sipName_swap, meth_QSerialPortInfo_swap, METH_VARARGS, doc_QSerialPortInfo_swap},
    {sipName_systemLocation, meth_QSerialPortInfo_systemLocation, METH_VARARGS, doc_QSerialPortInfo_systemLocation},
    {sipName_vendorIdentifier, meth_QSerialPortInfo_vendorIdentifier, METH_VARARGS, doc_QSerialPortInfo_vendorIdentifier}
};

PyDoc_STRVAR(doc_QSerialPortInfo, "\1QSerialPortInfo()\n"
"QSerialPortInfo(QSerialPort)\n"
"QSerialPortInfo(str)\n"
"QSerialPortInfo(QSerialPortInfo)");


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


sipClassTypeDef sipTypeDef_QtSerialPort_QSerialPortInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSerialPortInfo,
        SIP_NULLPTR,
        &plugin_QSerialPortInfo
    },
    {
        sipNameNr_QSerialPortInfo,
        {0, 0, 1},
        15, methods_QSerialPortInfo,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSerialPortInfo,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSerialPortInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSerialPortInfo,
    assign_QSerialPortInfo,
    array_QSerialPortInfo,
    copy_QSerialPortInfo,
    release_QSerialPortInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSerialPortInfo,
    sizeof ( ::QSerialPortInfo),
};
