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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtMultimedia/qmediabindableinterface.sip"
#include <qmediabindableinterface.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtMultimedia/sipQtMultimediaQMediaBindableInterface.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtMultimedia/qmediaobject.sip"
#include <qmediaobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtMultimedia/sipQtMultimediaQMediaBindableInterface.cpp"


class sipQMediaBindableInterface : public  ::QMediaBindableInterface
{
public:
    sipQMediaBindableInterface();
    sipQMediaBindableInterface(const  ::QMediaBindableInterface&);
    virtual ~sipQMediaBindableInterface();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool setMediaObject( ::QMediaObject*) SIP_OVERRIDE;
     ::QMediaObject* mediaObject() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQMediaBindableInterface(const sipQMediaBindableInterface &);
    sipQMediaBindableInterface &operator = (const sipQMediaBindableInterface &);

    char sipPyMethods[2];
};

sipQMediaBindableInterface::sipQMediaBindableInterface():  ::QMediaBindableInterface(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQMediaBindableInterface::sipQMediaBindableInterface(const  ::QMediaBindableInterface& a0):  ::QMediaBindableInterface(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQMediaBindableInterface::~sipQMediaBindableInterface()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

bool sipQMediaBindableInterface::setMediaObject( ::QMediaObject*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QMediaBindableInterface, sipName_setMediaObject);

    if (!sipMeth)
        return 0;

    extern bool sipVH_QtMultimedia_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QMediaObject*);

    return sipVH_QtMultimedia_37(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QMediaObject* sipQMediaBindableInterface::mediaObject() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_QMediaBindableInterface, sipName_mediaObject);

    if (!sipMeth)
        return 0;

    extern  ::QMediaObject* sipVH_QtMultimedia_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtMultimedia_36(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QMediaBindableInterface_mediaObject, "mediaObject(self) -> QMediaObject");

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

    {
        const  ::QMediaBindableInterface *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QMediaBindableInterface, sipName_mediaObject);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->mediaObject();

            return sipConvertFromType(sipRes,sipType_QMediaObject,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaBindableInterface, sipName_mediaObject, doc_QMediaBindableInterface_mediaObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaBindableInterface_setMediaObject, "setMediaObject(self, QMediaObject) -> bool");

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

    {
         ::QMediaObject* a0;
         ::QMediaBindableInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ8", &sipSelf, sipType_QMediaBindableInterface, &sipCpp, sipType_QMediaObject, &a0))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QMediaBindableInterface, sipName_setMediaObject);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->setMediaObject(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaBindableInterface, sipName_setMediaObject, doc_QMediaBindableInterface_setMediaObject);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QMediaBindableInterface(void *, int);}
static void release_QMediaBindableInterface(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQMediaBindableInterface *>(sipCppV);
    else
        delete reinterpret_cast< ::QMediaBindableInterface *>(sipCppV);
}


extern "C" {static void dealloc_QMediaBindableInterface(sipSimpleWrapper *);}
static void dealloc_QMediaBindableInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQMediaBindableInterface *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QMediaBindableInterface(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QMediaBindableInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QMediaBindableInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQMediaBindableInterface *sipCpp = SIP_NULLPTR;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QMediaBindableInterface* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QMediaBindableInterface[] = {
    {sipName_mediaObject, meth_QMediaBindableInterface_mediaObject, METH_VARARGS, doc_QMediaBindableInterface_mediaObject},
    {sipName_setMediaObject, meth_QMediaBindableInterface_setMediaObject, METH_VARARGS, doc_QMediaBindableInterface_setMediaObject}
};

PyDoc_STRVAR(doc_QMediaBindableInterface, "\1QMediaBindableInterface()\n"
"QMediaBindableInterface(QMediaBindableInterface)");


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


sipClassTypeDef sipTypeDef_QtMultimedia_QMediaBindableInterface = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QMediaBindableInterface,
        SIP_NULLPTR,
        &plugin_QMediaBindableInterface
    },
    {
        sipNameNr_QMediaBindableInterface,
        {0, 0, 1},
        2, methods_QMediaBindableInterface,
        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_QMediaBindableInterface,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QMediaBindableInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QMediaBindableInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QMediaBindableInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QMediaBindableInterface),
};
