/*
 * 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 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmediacontent.sip"
#include <qmediacontent.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"

#line 109 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtNetwork/qnetworkrequest.sip"
#include <qnetworkrequest.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmediaresource.sip"
#include <qmediaresource.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmediaplaylist.sip"
#include <qmediaplaylist.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaContent.cpp"


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

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_isNull, doc_QMediaContent_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_canonicalUrl, "canonicalUrl(self) -> QUrl");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = new ::QUrl(sipCpp->canonicalUrl());

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_canonicalUrl, doc_QMediaContent_canonicalUrl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_canonicalRequest, "canonicalRequest(self) -> QNetworkRequest");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = new ::QNetworkRequest(sipCpp->canonicalRequest());

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_canonicalRequest, doc_QMediaContent_canonicalRequest);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_canonicalResource, "canonicalResource(self) -> QMediaResource");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = new ::QMediaResource(sipCpp->canonicalResource());

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_canonicalResource, doc_QMediaContent_canonicalResource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_resources, "resources(self) -> list[QMediaResource]");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = new ::QMediaResourceList(sipCpp->resources());

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_resources, doc_QMediaContent_resources);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_playlist, "playlist(self) -> Optional[QMediaPlaylist]");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = sipCpp->playlist();

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_playlist, doc_QMediaContent_playlist);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaContent_request, "request(self) -> QNetworkRequest");

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

    {
        const ::QMediaContent *sipCpp;

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

            sipRes = new ::QNetworkRequest(sipCpp->request());

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

    sipNoMethod(sipParseErr, sipName_QMediaContent, sipName_request, doc_QMediaContent_request);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QMediaContent___ne__(PyObject *, PyObject *);}
static PyObject *slot_QMediaContent___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QMediaContent *sipCpp = reinterpret_cast< ::QMediaContent *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QMediaContent));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QMediaContent* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

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


extern "C" {static PyObject *slot_QMediaContent___eq__(PyObject *, PyObject *);}
static PyObject *slot_QMediaContent___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QMediaContent *sipCpp = reinterpret_cast< ::QMediaContent *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QMediaContent));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QMediaContent* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

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


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QUrl* a0;

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

            return sipCpp;
        }
    }

    {
        const ::QNetworkRequest* a0;

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

            return sipCpp;
        }
    }

    {
        const ::QMediaResource* a0;

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

            return sipCpp;
        }
    }

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

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

            return sipCpp;
        }
    }

    {
        const ::QMediaContent* a0;

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

            return sipCpp;
        }
    }

    {
        ::QMediaPlaylist* a0;
        const ::QUrl& a1def = QUrl();
        const ::QUrl* a1 = &a1def;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8|J9", sipType_QMediaPlaylist, &a0, sipType_QUrl, &a1))
        {
            sipCpp = new ::QMediaContent(a0, *a1);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QMediaContent[] = {
    {sipName_canonicalRequest, meth_QMediaContent_canonicalRequest, METH_VARARGS, doc_QMediaContent_canonicalRequest},
    {sipName_canonicalResource, meth_QMediaContent_canonicalResource, METH_VARARGS, doc_QMediaContent_canonicalResource},
    {sipName_canonicalUrl, meth_QMediaContent_canonicalUrl, METH_VARARGS, doc_QMediaContent_canonicalUrl},
    {sipName_isNull, meth_QMediaContent_isNull, METH_VARARGS, doc_QMediaContent_isNull},
    {sipName_playlist, meth_QMediaContent_playlist, METH_VARARGS, doc_QMediaContent_playlist},
    {sipName_request, meth_QMediaContent_request, METH_VARARGS, doc_QMediaContent_request},
    {sipName_resources, meth_QMediaContent_resources, METH_VARARGS, doc_QMediaContent_resources}
};

PyDoc_STRVAR(doc_QMediaContent, "\1QMediaContent()\n"
"QMediaContent(contentUrl: QUrl)\n"
"QMediaContent(contentRequest: QNetworkRequest)\n"
"QMediaContent(contentResource: QMediaResource)\n"
"QMediaContent(resources: Iterable[QMediaResource])\n"
"QMediaContent(other: QMediaContent)\n"
"QMediaContent(playlist: Optional[QMediaPlaylist], contentUrl: QUrl = QUrl())");


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


sipClassTypeDef sipTypeDef_QtMultimedia_QMediaContent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QMediaContent,
        SIP_NULLPTR,
        &plugin_QMediaContent,
    },
    {
        sipNameNr_QMediaContent,
        {0, 0, 1},
        7, methods_QMediaContent,
        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_QMediaContent,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QMediaContent,
    init_type_QMediaContent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QMediaContent,
    assign_QMediaContent,
    array_QMediaContent,
    copy_QMediaContent,
    release_QMediaContent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QMediaContent,
    sizeof (::QMediaContent),
};
