/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 "sipAPIQtMultimedia.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qcamerainfo.sip"
#include <qcamerainfo.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQCameraInfo.cpp"

#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQCameraInfo.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qcamera.sip"
#include <qcamera.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQCameraInfo.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQCameraInfo.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQCameraInfo.cpp"


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

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

    {
        const ::QCameraInfo *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_isNull, doc_QCameraInfo_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCameraInfo_deviceName, "deviceName(self) -> str");

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

    {
        const ::QCameraInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_deviceName, doc_QCameraInfo_deviceName);

    return SIP_NULLPTR;
}


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

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

    {
        const ::QCameraInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_description, doc_QCameraInfo_description);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCameraInfo_position, "position(self) -> QCamera.Position");

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

    {
        const ::QCameraInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCameraInfo, &sipCpp))
        {
            ::QCamera::Position sipRes;

            sipRes = sipCpp->position();

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

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_position, doc_QCameraInfo_position);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCameraInfo_orientation, "orientation(self) -> int");

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

    {
        const ::QCameraInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCameraInfo, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->orientation();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_orientation, doc_QCameraInfo_orientation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCameraInfo_defaultCamera, "defaultCamera() -> QCameraInfo");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            ::QCameraInfo*sipRes;

            sipRes = new ::QCameraInfo(::QCameraInfo::defaultCamera());

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

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_defaultCamera, doc_QCameraInfo_defaultCamera);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCameraInfo_availableCameras, "availableCameras(position: QCamera.Position = QCamera.UnspecifiedPosition) -> list[QCameraInfo]");

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

    {
        ::QCamera::Position a0 = QCamera::UnspecifiedPosition;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "|E", sipType_QCamera_Position, &a0))
        {
            QList< ::QCameraInfo>*sipRes;

            sipRes = new QList< ::QCameraInfo>(::QCameraInfo::availableCameras(a0));

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

    sipNoMethod(sipParseErr, sipName_QCameraInfo, sipName_availableCameras, doc_QCameraInfo_availableCameras);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QCameraInfo___ne__(PyObject *, PyObject *);}
static PyObject *slot_QCameraInfo___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QCameraInfo *sipCpp = reinterpret_cast< ::QCameraInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QCameraInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QCameraInfo* a0;

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

            sipRes = sipCpp->::QCameraInfo::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, ne_slot, sipType_QCameraInfo, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QCameraInfo___eq__(PyObject *, PyObject *);}
static PyObject *slot_QCameraInfo___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QCameraInfo *sipCpp = reinterpret_cast< ::QCameraInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QCameraInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QCameraInfo* a0;

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

            sipRes = sipCpp->::QCameraInfo::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, eq_slot, sipType_QCameraInfo, sipSelf, sipArg);
}


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


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


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


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


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


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


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

    {
        const ::QByteArray& a0def = QByteArray();
        const ::QByteArray* a0 = &a0def;
        int a0State = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1", sipType_QByteArray, &a0, &a0State))
        {
            sipCpp = new ::QCameraInfo(*a0);
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            return sipCpp;
        }
    }

    {
        const ::QCamera* a0;

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

            return sipCpp;
        }
    }

    {
        const ::QCameraInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QCameraInfo[] = {
    {sipName_availableCameras, SIP_MLMETH_CAST(meth_QCameraInfo_availableCameras), METH_VARARGS|METH_KEYWORDS, doc_QCameraInfo_availableCameras},
    {sipName_defaultCamera, meth_QCameraInfo_defaultCamera, METH_VARARGS, doc_QCameraInfo_defaultCamera},
    {sipName_description, meth_QCameraInfo_description, METH_VARARGS, doc_QCameraInfo_description},
    {sipName_deviceName, meth_QCameraInfo_deviceName, METH_VARARGS, doc_QCameraInfo_deviceName},
    {sipName_isNull, meth_QCameraInfo_isNull, METH_VARARGS, doc_QCameraInfo_isNull},
    {sipName_orientation, meth_QCameraInfo_orientation, METH_VARARGS, doc_QCameraInfo_orientation},
    {sipName_position, meth_QCameraInfo_position, METH_VARARGS, doc_QCameraInfo_position}
};

PyDoc_STRVAR(doc_QCameraInfo, "\1QCameraInfo(name: Union[QByteArray, bytes, bytearray] = QByteArray())\n"
"QCameraInfo(camera: QCamera)\n"
"QCameraInfo(other: QCameraInfo)");


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


sipClassTypeDef sipTypeDef_QtMultimedia_QCameraInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QCameraInfo,
        SIP_NULLPTR,
        &plugin_QCameraInfo,
    },
    {
        sipNameNr_QCameraInfo,
        {0, 0, 1},
        7, methods_QCameraInfo,
        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_QCameraInfo,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QCameraInfo,
    init_type_QCameraInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QCameraInfo,
    assign_QCameraInfo,
    array_QCameraInfo,
    copy_QCameraInfo,
    release_QCameraInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QCameraInfo,
    sizeof (::QCameraInfo),
};
